Posted on Leave a comment

apache2

Notes for managing vhosts on apache2 (Apache 2.2.16 Ubuntu)

Add new vhosts:
1. create folder for site in /var/www/vhosts/
2. create vhost file in /etc/apache2/sites-available
3. create ln to sites-available file from sites-enabled
4. Restart Apache
/etc/init.d/apache2 restart

To check version:

apache2ctl -v or apache2 -v 

Posted on Leave a comment

Steps to clean install new Mule ESB server version

  1. unregister old version in MMC
  2. mule stop
  3. mule remove
  4. archive old version folder
  5. remove old version folder
  6. unzip new version of mule
  7. Change %MULE_HOME% environmental variable to point to new version
  8. start new command shell
  9. check echo %MULE_HOME% to confirm value set to new version
  10. mule -installLicense licensefile.lic
  11. mule install
  12. mule start
  13. register new version in MMC
  14. deploy mule apps

Posted on Leave a comment

Find OS User for command shell spawn from SQL Server context

If the policy on the server allows execution of xp_cmdshell then can find out the windows user that owns the spawned shell to handle OS commands executed from within sql server context

   EXEC xp_cmdshell 'whoami'

to get the value into a variable can do following

   DECLARE @whoisit nvarchar(4000)
   CREATE TABLE #test ( output nvarchar(4000) null )

   INSERT INTO #test (output)
   EXEC xp_cmdshell 'whoami'

   SELECT top 1 @whoisit = output 
     FROM #test 
    WHERE output IS NOT NULL

   SELECT @whoisit "whoisit"

   DROP TABLE #test