Options
Copying databases between sql servers
I just got a new sql box so I need to copy two databases over from our existing sql box. I've read ms documentation on using the stored procedures to attach/detach but cant I simply just right-click > detach, copy to new server, right-click > attach?
Comments
-
Optionsaordal Member Posts: 372Backup and restore! Do a SQL backup from the current database then on the new SQL server do a DB restore and point it to the backup files. Safest imo.
-
Optionsphoeneous Member Posts: 2,333 ■■■■■■■□□□Backup and restore! Do a SQL backup from the current database then on the new SQL server do a DB restore and point it to the backup files. Safest imo.
Wow, even easier. Thanks.
Whats a good way to copy sql logins to the new server? -
Optionsaordal Member Posts: 372Here's a blog on how to do that: How do I... Transfer logins from one SQL Server 2005 instance to another? | How Do I… | TechRepublic.com
I personally have not done this and it's my HIGH recommendation that you do this in a test environment first (not on your production servers!) just to make sure it does what you want it do. -
Optionsbrad- Member Posts: 1,218Here's a blog on how to do that: How do I... Transfer logins from one SQL Server 2005 instance to another? | How Do I… | TechRepublic.com
I personally have not done this and it's my HIGH recommendation that you do this in a test environment first (not on your production servers!) just to make sure it does what you want it do.
Thats a good one for the toolbox. -
Optionsphoeneous Member Posts: 2,333 ■■■■■■■□□□Here's a blog on how to do that: How do I... Transfer logins from one SQL Server 2005 instance to another? | How Do I… | TechRepublic.com
I personally have not done this and it's my HIGH recommendation that you do this in a test environment first (not on your production servers!) just to make sure it does what you want it do.
Perfect! Thank you. -
Optionsblargoe Member Posts: 4,174 ■■■■■■■■■□I've used that script before. Handy.IT guy since 12/00
Recent: 11/2019 - RHCSA (RHEL 7); 2/2019 - Updated VCP to 6.5 (just a few days before VMware discontinued the re-cert policy...)
Working on: RHCE/Ansible
Future: Probably continued Red Hat Immersion, Possibly VCAP Design, or maybe a completely different path. Depends on job demands... -
Optionsphoeneous Member Posts: 2,333 ■■■■■■■□□□Backup and restore! Do a SQL backup from the current database then on the new SQL server do a DB restore and point it to the backup files. Safest imo.
I did this this weekend and it worked perfectly, thank you.