Monday, March 19, 2012

Copy database from MSDE to SqlServer

Is there any easy way to copy a database from MSDE to SQLServer. MSDE is on
the test server and we would like to copy the whole database, table data,
structure and stored procedures."Chris Kennedy" <nospam@.nospam.co.uk> wrote in message
news:OM4$mapQEHA.1160@.TK2MSFTNGP09.phx.gbl...
> Is there any easy way to copy a database from MSDE to SQLServer. MSDE is
on
> the test server and we would like to copy the whole database, table data,
> structure and stored procedures.
>
Use the copy objects wizard in DTS within Enterprise Manager (if they can
see each other over the network
or
Stop the MSDE services. Copy the mdb file to the SQL Server. Use the
SP_attache_single_file_db stored procedure to attch it to the new database.
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.690 / Virus Database: 451 - Release Date: 22/05/2004|||Hi,
There are 2 options:-
1. Detach and Attach database
2. Backup and Restore the database
1. Detach and Attach
a. Use SP_DETACH_DB to detach the MDF and LDF files
b. Copy the files to Destination server
c. Use SP_ATTACH_DB to attach the databases
(Refer books online for information)
2. Backup and Restore
a. Backup the source databases using BACKUP DATABASE command
b. Copy the .BAK files to destination
c. Restore the database using RESTORE DATABASE command
If you have only 1 or 2 users to syncronize then use the procedure
sp_change_users_login (Refer books online)
If you have more users then; Have a look into the below link for
information.
http://www.databasejournal.com/feat...cle.php/2228611
Thanks
Hari
MCDBA
"Chris Kennedy" <nospam@.nospam.co.uk> wrote in message
news:OM4$mapQEHA.1160@.TK2MSFTNGP09.phx.gbl...
> Is there any easy way to copy a database from MSDE to SQLServer. MSDE is
on
> the test server and we would like to copy the whole database, table data,
> structure and stored procedures.
>

No comments:

Post a Comment