SQL Server Performance

How to find the queries using xp-xmdshell in SLQ 2000

Discussion in 'SQL Server 2008 General DBA Questions' started by mohinidba, Oct 14, 2011.

  1. mohinidba New Member

    I'm doing sql upgrade from slq 2000 to sql 2008, i have to find out the queries or sp or batch statements which are using xp_cmdshell on sql 2000 machine and need to remove them from SQL 2008 and redirect them to different server.
  2. preethi Member

    Welcome to forums..
    I will go for server side trace on sp stmt completed and SQL stmt completed events and put a filter on Textdata like '%xp_cmdshell%" and monitor them.
    If you are using only stored queries (stored procedures, triggers etc.) you can search syscomments to see them.
    Hope this helps
  3. satya Moderator

    You can also run UPGRADE ADVISOR to see any additional warnings/errors are displayed during this operation, in any case do what Preethi suggested.
  4. mohinidba New Member

    But sql 2000 is critical production machine,they never allow me to run trace on the machine,This is side by side upgrade.Better to have any query or powershell script.Thanks for very quick reply...
  5. Luis Martin Moderator

  6. mohinidba New Member

    hello,the issue how to trace the queries or sp need xp_cmdshell to run
  7. Luis Martin Moderator

    Reading you first question and Preethi answer, I thought in the wrong way.
    Back to actual question, I have no idea.
  8. preethi Member

    I see a mismatch in these two answers. Can you explain more?
  9. satya Moderator

    ..if you are not able to run Profiler, setup a server side trace to capture the events. Thats a best practice and low contention activity when your production server is highly transactional.

Share This Page