Wednesday, March 28, 2012

Moving a SQL DB

Sorry for the remedial question...Newbie here...
I need to move a sql db from one sql machine to another, i do have access to
MMC...Can someone please provide me with detailed instructions?
I have experimented with exporting the data from one and importing to
another, but i haven't had much luck, primary keys seem to get messed up.
Any help would be greatly appreciated.
THanks!Hi, eye,
Simple method. Backup the database from one server, restore it to the
other.
You may wind up with some orphaned users. Look at topics in the BOL such
as:
Troubleshooting Orphaned Users
http://tinyurl.com/7yjwt
Also, the commands sp_validatelogins, sp_change_users_login,
sp_resolve_logins may be helpful for straightening things out.
Russell Fields
"eyespike1" <eyespike1@.discussions.microsoft.com> wrote in message
news:D4CE5D5F-798A-4645-BB29-7D85CBCF94A0@.microsoft.com...
> Sorry for the remedial question...Newbie here...
> I need to move a sql db from one sql machine to another, i do have access
to
> MMC...Can someone please provide me with detailed instructions?
> I have experimented with exporting the data from one and importing to
> another, but i haven't had much luck, primary keys seem to get messed up.
> Any help would be greatly appreciated.
> THanks!
>|||Use BACKUP and RESTORE commands.
For example:
--On the source server
BACKUP DATABASE YourDatabase TO
DISK='G:\MSSQL\Backup\YourDatabaseBackup
.BAK'
--Copy the backup file or share it, so that it is visible on the target
server
--Run the following command to restore it
RESTORE DATABASE YourDatabase FROM
DISK='G:\MSSQL\Backup\YourDatabaseBackup
.BAK'
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"eyespike1" <eyespike1@.discussions.microsoft.com> wrote in message
news:D4CE5D5F-798A-4645-BB29-7D85CBCF94A0@.microsoft.com...
Sorry for the remedial question...Newbie here...
I need to move a sql db from one sql machine to another, i do have access to
MMC...Can someone please provide me with detailed instructions?
I have experimented with exporting the data from one and importing to
another, but i haven't had much luck, primary keys seem to get messed up.
Any help would be greatly appreciated.
THanks!

No comments:

Post a Comment