How to create batch file to execute a query at a time to all instances...

  • I want to know that i need to create batch file to execute a query to all instances at a time.

    In my environment I have 10 instances. Plz give me navigation to create batch file execution.

  • you could use a central management server to execute the same query across multiple servers in one go, or if you want to do it in a batch file take a look at SQLCMD command line utility

  • thats fine but I want to execute one query in all the instance at a time so that I need to prepare a batch file. Plz give me senario to prepare batch file..

  • you want 1 query executed against 10 servers at the same time?

    so going back to my original post, use a central management server or create a batch file which uses SQLCMD using the -i paramater which passes in a .sql file which has your query

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply