i am accessing a SQL server db over a slow network. I have another machine with SQL server on it on a machine with a faster connection. Is there anyway i can easily get this database copied from one machine to another (both schema and data)
Share
A couple ways come to mind. In order of preference and likelihood of success:
Backup the existing database, copy the backup file to your new server, perform a restore. Then fix any user accounts that may need to be corrected. Ask another question for details on this.
Use a tool like SQL Compare and/or SQL Data Compare to make a copy on a new server.
Perform a detach on the original server, copy files, pray, and perform attach on new server.. Be sure to reattach them to the original server if necessary. Although this will usually work, it fails enough that I tend to stay away.
Use the Copy Database command. <- Note that I have never seen this work, and I give it a shot about once a quarter when I start working in a new environment.
Build an SSIS package to transfer schema and data.
Manually by scripting the database, running those scripts on the new server. Then add a linked server reference and run things like
INSERT INTO newdb.dbname.dbo.tablenameSELECT * FROM olddb.dbname.dbo.tablename..Incidentally before doing options 1, 3, 4, or 5 make sure that both servers have the exact same service pack and patching levels. That will increase the likelihood of everything working out.