Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Moving SQL Server db and associated classes


Moving SQL Server db and associated classes

Author
Message
svkroy
svkroy
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 6
Hi Guys,

This is my first thread and first of all let me ask you to pardon my ignorance as regards SQL Server. I have been using Ms Access all this time and now we have moved on...........Hence the post.

I have an existing SQL Server db on one of my machine's local disk (C:\), (that system would be taken away), I need to port that whole database to the local drive (C:\ or D:\) of my laptop. Along with the data, I need to transfer all jobs, Stored Procedures, and the linked server.

Both Servers are 2008R2, I have sa access on both.

How best do I do this ?
Hakan Forsberg
Hakan Forsberg
Forum Newbie
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: General Forum Members
Points: 9 Visits: 317
Easiest way to move the database with the data inside would be to take a backup and then restore the database on the new server. Another way to do the same thing would be to detach the database, move the files and then attach them on the new server (see BOL).

Stored Procedures are kept in the database and will therefore move with the options I mentioned above.

Agents jobs can be scripted by right clicking the job inside Management Studio and select "Script job as". Copy the script and execute it on the new server.

Don't forget to create the login for the moved database on the new SQL server.
pietlinden
pietlinden
SSCrazy
SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

Group: General Forum Members
Points: 2171 Visits: 12478
And don't forget MSDB. That's where all your jobs etc are stored.

Before the original server goes away, make sure you have a working SQL Server instance where you need it. Would be a shame to miss some pieces.
svkroy
svkroy
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 6
Thanks to you both, any idea about the Linked Server migration ?
anastke
anastke
SSC-Enthusiastic
SSC-Enthusiastic (182 reputation)SSC-Enthusiastic (182 reputation)SSC-Enthusiastic (182 reputation)SSC-Enthusiastic (182 reputation)SSC-Enthusiastic (182 reputation)SSC-Enthusiastic (182 reputation)SSC-Enthusiastic (182 reputation)SSC-Enthusiastic (182 reputation)

Group: General Forum Members
Points: 182 Visits: 2354
you can script out the linked server definition in ssms
'server objects' -> 'linked servers'.

you need to edit the scripts to insert the correct passwords
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search