Red Gate forums :: View topic - Create script for copying master database structure
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Multi Script 1
SQL Multi Script 1 forum

Create script for copying master database structure

Search in SQL Multi Script 1 forum
Post new topic   Reply to topic
Jump to:  
Author Message
apisano



Joined: 08 Sep 2012
Posts: 2

PostPosted: Mon Sep 10, 2012 5:34 pm    Post subject: Create script for copying master database structure Reply with quote

I'm new to Multi Script. I've been using SQL Compare to update several databases from a master copy. I was hoping to be able to speed this process up by using Multi Script. As a source script I created a script file for my master database from the SQL Management Studio. When I tried propagating this to another database using MultiScript I got an error and it did not propagate the changes.

"Msg 15023, Level 16, State 1, Line 2
User, group, or role 'BUILTIN\Administrators' already exists in the current database."

I'm not sure what this error is about and what I have to do to get this script to work properly. I also don't know whether it's safe to just ignore all error messages.

Any help would be appreciated.
Back to top
View user's profile Send private message
stanori



Joined: 23 Apr 2012
Posts: 84

PostPosted: Tue Sep 11, 2012 8:33 pm    Post subject: Reply with quote

Hi apisano,

Thanks for your post. It sounds like your script that you are specifying in Multiscript is attempting to add a new user object that already exists in the destination SQL Server database. This message is coming from the SQL Server itself as a result of the script.

To get the script working properly, you would need to manually edit the script to remove the entry that is making changes to this particular user object. Also, since this is the master database, this is a system DB, so you will need to be careful about what changes you are rolling into it.

Best Regards,
Steve
_________________
_________________
Steve Tanori
Product Support
Red Gate Software Ltd.
866-997-0378
Back to top
View user's profile Send private message
apisano



Joined: 08 Sep 2012
Posts: 2

PostPosted: Tue Sep 11, 2012 8:48 pm    Post subject: Reply with quote

Is there a better way of creating the script for propagating from a master db to several other databases when an update is made? If not, it seems to me that creating the script for this would become very time consuming for the database I am maintaining. It contains a combination of over 500 tables and views.
Back to top
View user's profile Send private message
stanori



Joined: 23 Apr 2012
Posts: 84

PostPosted: Tue Sep 11, 2012 8:59 pm    Post subject: Reply with quote

You could try using our SQL Compare tool to generate a deployment script and deploy to each of your remote servers. There is a command line version of SQL Compare that you can use to create a batch job to do this automatically.
_________________
_________________
Steve Tanori
Product Support
Red Gate Software Ltd.
866-997-0378
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group