How to copy a SQL Server 2005 database from a local server

I want to export a database from a local computer to a database server in SQL Server 2005.

How to restore a database without access to the database server file system

+1
source share
3 answers

You can use the built-in SQL Server backup and recovery features.
Make a backup copy of your local database and write it on some network resource (maybe somewhere on the network, not necessarily on the database server):

BACKUP DATABASE MyDatabase TO DISK = '\\Servername\Share\MyBackup.bak'

Then you can restore the database on the database server by reading the backup directly from the network share:

RESTORE DATABASE MyDatabase FROM DISK = '\\Servername\Share\MyBackup.bak'

, T-SQL, !
( SQL Server Management Studio, )

+2

, , , .

: script, . script, sql, . Sql Server 2008 , Sql Server 2005 Sql Publishing Wizard.

: ( )

http://www.codeplex.com/sqlhost/Wiki/View.aspx?title=Database%20Publishing%20Wizard

script, :

, : C:\Program Files\Microsoft SQL Server\90\Tools\Publishing\sqlpubwiz script -d AdventureWorks "C:\AdventureWorks.sql"

, : C:\Program Files\Microsoft SQL Server\90\Tools\Publishing\sqlpubwiz script -d AdventureWorks "C:\AdventureWorks.sql" -schemaonly

, : C:\Program Files\Microsoft SQL Server\90\Tools\Publishing\sqlpubwiz script -d AdventureWorks "C:\AdventureWorks.sql" -dataonly

... ( )

http://blog.sqlauthority.com/2007/11/16/sql-server-2005-generate- script -with-data-from-database-database-publishing-wizard/

.

+1

. , .mdf .ldf , SQL .

0
source

All Articles