January 7, 2011 at 6:54 am
Hello,
I need to find out how can I read the database name from a excel file instead of writing in in T -sql.
I am writing a tsql job, could be a ssis package too and in that the job needs to read the database it has to run against from a excel file instead me writing it in the code??
Any help in this matter is appreciated.
January 7, 2011 at 8:10 am
Why are you storing the database name in an Excel file?
What is your set-up? What are your requirements?
What are you trying to accomplish?
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
January 7, 2011 at 10:05 am
well we have a database mirroring disabale job that we run on demand..and since we have 25 databases we have 25 different jobs for each database.
i want to have a ssis package that reads the name of the databases from a file and than just run the job and disable mirroring.
January 8, 2011 at 11:00 am
qur7 (1/7/2011)
well we have a database mirroring disabale job that we run on demand..and since we have 25 databases we have 25 different jobs for each database.i want to have a ssis package that reads the name of the databases from a file and than just run the job and disable mirroring.
Wouldn't it be easier if you stored the names of the databases in a table. You can read it with a simple SQL statement, store the results in a resultset. With a for each loop you can loop over this resultset and execute the necessary statement for each database.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply