Move SQL Database to another Server

I have been tasked to move SQL databases for Websense to another SQL server. I have directions however, I'm not a DBA and have very little experience with this type of situation. My question is... If I stop the required services on the current SQL server, Detach the databases from the current server then move them to the exact location on a different machine and then attach them will that be enough?

Managing Active Directory does not always have to be complicated. If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Are the database servers of the same version? will both be running at the same time?

First transfer logins from the current to the new
Use below to add the two stored procedures, and then when you run, copy the non SA entries and paste them into the query for the new DB.http://support.microsoft.com/kb/246133

If so, look into DB mirroring (backup and restore the database you want to transfer on the new server, make sure under options do not bring the DATAbase online.
Once the DB is restored, go through the SSMS and establish mirroring without a witness.
Once this is going, you control when/how the transition will and it should be seamless.

Coordinate the change at which point within the SSMS mirror properties for the database, you can trigger the failover from the old to the new.
30 seconds-minute transition. If anything goes wrong, you can always fail it back.

No they will not. I'm taking off the current server and moving it to a virual server. I will disable the origional SQL databases on the origional server. - The database servers are the same Windows 2008 r2 64 bit with SQL 2008.

Real or Virtual, they only need to be running at the same time for a short duration until you transition. Once transitioned, you would use the system where the databases are active to break the mirroring setup. and that is it.

With mirroring, you can transition an application/database at a time with a way back without adverse impact on the users. If the application is SQL server mirror aware, you can configure the application to handle the transition with minimal impact on the users/transparant.

If you do it backup/restore you would have to make sure that no one writes into the old DB while you are restoring on the new server or you could lose data. i.e. while you restore, a new record is added, another data is updated, etc.

What is the outage window for the transition? Is it for each DB/application or for all?

0

WellingtonISAuthor Commented: 2015-02-12

There's not many people right now using this so it's minimal. that's not my concern if I miss 10 mins. I can stop the origional database. I was able to restore the databases from the backups and I've added them to the correct location. I have other issues and I think I'm going to have to get techinical support involved. I know I'm missing steps for this.

If you can do the migration when no one is using the database then it will be better. Then you can even stop the SQL Server and copy the data and log file to the new server (no need for backup & restore or detach & attach). Just keep in mind that you shouldn't start the SQL Server again so you be sure that everyone is connecting to the new server and not to the older one.

As I mentioned above, I find suggestions to copy/paste or move Db/log files especially to a person who says upfront that they are not a DBA highly risky given one need not be a DBA to handle such a transition.

a DPA deals with structure/performance adjustment of the database.

The other is that the person needs to rely on someone else to tell them whether the transition/move is successful ( I hear a broken phone situtaion) where the person who knows how to test the DB functionality is unable to connect if the logins were not transferred, and the person doing the transfer, says that the databases are online on the new server.

To the asker, what is the timeframe for completing this transition?

0

WellingtonISAuthor Commented: 2015-02-12

ok will check it out. Thanks.

0

WellingtonISAuthor Commented: 2015-02-12

ok I'm transfering from SQL 2008 to SQL 2008. That script. Just create it in the source machine? I'm sorry I've never done this before. These are for server 2000 and 2005 I have 2008???

Covering all the possibilities. There have to be logins referencing create login [olderserver\groupname for sql instances user, ....]

The important ones are the sql login users, passwords and SID.
The SID is what is set in the security section of each database and the rights this SID has on this database.
Without the transfer of logins, the security section of the DB will reflect a user, but will not have a matching Login Security. Creating one yourself will not do as the SIDs will not match .......
reseting/reattaching the newly created user to the restrored DB will mean you would need to know which role/permissions this user had or needs there.

0

WellingtonISAuthor Commented: 2015-03-04

Basically what I did was a backup and a restore to the new virual server. I created the same user name and password for the login account. Everything went smoothly. Thanks. There was no need for any logs or passwords to be copied.

Featured Post

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.