Re: Copying a database between servers



Edward Diener wrote:
Is backup and restore the best way to simply copy a database from one
SQL Server 7.0 database with 'select' access to another SQL Server 7.0
database on another machine with 'all' access ? Or is there another
easier way with the SQL Server 7.0 tools ?

You could try detaching and reattaching the database using sp_detach_db and sp_attach_db / sp_attach_single_file_db. You would need to stop the server and copy the data and log files and attach the copy. You wouldn't need to detach in this case. When you attach the copy, you'll likely get an error related to the log file since the data file points to a log file in use by the original database. SQL Server 2000 will create a new log file and attach. I'm not sure if SQL 7 will do the same, but it likely will.


--
David Gugick
Imceda Software
www.imceda.com


.



Relevant Pages

  • Re: sp_attach_single_file_db
    ... Being that Rob has access to the database and can still ... Stop sql server and rename the existing MDF to a new one and copy the ... Now execute the undocumented DBCC to create a log file ...
    (microsoft.public.sqlserver.server)
  • Re: HELP on How to move database files
    ... http://www.support.microsoft.com/?id=314546 Moving DB's between Servers ... Issues When a Database Is Moved Between SQL Servers ... for SQL Server ... > What I want to do is to move the transaction log file to a different> location or even better get rid of it and create a new log file in its new ...
    (microsoft.public.sqlserver.server)
  • Re: SPS - SQL Server - LOG FILES.
    ... Detach the database _site. ... move the log file to another drive. ... >> We Deleted these .LDF files after stopping the SQL Server ON TEST ...
    (microsoft.public.sharepoint.portalserver)
  • Re: MS Access DAO -> ADO.NET Migration
    ... William Vaughn ... Microsoft MVP ... Hitchhiker's Guide to Visual Studio and SQL Server ... My migration app works building a SSCE database file with imported data ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: sp_attach_single_file_db
    ... Anyone worked a bit with SQL Server know that SQL Server does recovery at startup. ... SQL Server go through the transaction log and "synchronizes" the database with what happened since ... Stop sql server and rename the existing MDF to a new one and copy the ... Now execute the undocumented DBCC to create a log file ...
    (microsoft.public.sqlserver.server)

Loading