Import databases

Single-click script execution on multiple SQL Servers.

Moderators: JonathanWatts, Anu Deshpande, dlkj, Colin Millerchip, Michelle Taylor

Import databases

Postby Kidde82 » Tue Sep 27, 2011 9:08 am

Hi,

I have seen a post about this topic back from 2010 without any answer.

My problem is that I have a sql-script that gives me all database names of every database server where the customer has a certain release version.

Then I have to manually per database server select these databases in Multi Script.

It would be awesome and save me alot of time if I somehow can import the names of all databases I want to select instead of doing this manually every time.

Thanks in advance!

Regards,

Christian Persson
Kidde82
 
Posts: 3
Joined: Tue Sep 27, 2011 9:00 am

Postby Brian Donahue » Wed Sep 28, 2011 3:28 pm

Hello,

MultiScript won't do this but you may be interested in a utility to import all reachable servers and databases from your network:
http://labs.red-gate.com/Tools/Details/MultiScriptLM
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby Kidde82 » Wed Sep 28, 2011 3:44 pm

Hi Brian and thanks for your reply.

Adding our servers is no problem since we just have 5 servers. It is adding 50 out of 500 databases on each of the 5 servers that is time consuming.

But it would be a nice feature in the future which would save me and perhaps many others a lots of working hours.. :)
Kidde82
 
Posts: 3
Joined: Tue Sep 27, 2011 9:00 am

Postby Brian Donahue » Wed Sep 28, 2011 4:57 pm

Just to clarify, List Exporter will add all databases on all of the servers it detects.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby spivey24 » Mon Nov 14, 2011 5:00 pm

We have about 180 databases across 6 servers now, and they are constantly changing with new databases and servers being added! The utility mentioned is not nearly enough to keep up with this.

I ended up writing a .NET application that builds the distribution list XML file that Multi Script uses each time it runs. Gives me exact control over building the lists I need in different ways. Also allows me to order the database list based on server so it will execute all scripts on all servers at once (since Multi Script seriosly lacks the option for parallel execution across servers instead of databases)

I posted the code to generate the list at:
http://spivey24.blogspot.com/2011/11/sq ... dgate.html
Last edited by spivey24 on Mon Nov 14, 2011 6:18 pm, edited 1 time in total.
spivey24
 
Posts: 18
Joined: Tue Oct 17, 2006 3:16 am

Postby Kidde82 » Mon Nov 14, 2011 5:25 pm

Spivery24: Thank you, great idea!
I have a sql-script that I run on each server manually which gives me all databases with a certain version. With that result I should pretty easily be able to create a distribution list. Where can I find the xml-file? Dont find it in the install dir or in my documents folder.
/Christian
Kidde82
 
Posts: 3
Joined: Tue Sep 27, 2011 9:00 am

Postby spivey24 » Mon Nov 14, 2011 6:18 pm

Depending on OS, the filepath should be something like: C:\\Users\\XXXX\\AppData\\Roaming\\Red Gate\\SQL Multi Script\\Application.dat

I posted the code to generate the list at:
http://spivey24.blogspot.com/2011/11/sq ... dgate.html
spivey24
 
Posts: 18
Joined: Tue Oct 17, 2006 3:16 am


Return to SQL Multi Script 1

Who is online

Users browsing this forum: No registered users and 1 guest