Re: Creating a mirror image of a database

From: Allan Mitchell (allan_at_no-spam.sqldts.com)
Date: 11/04/04


Date: Thu, 4 Nov 2004 20:47:19 -0000

Forget DTS. By far the easiest way is to use BACKUP/RESTORE. You can
restore as a different name and place the files in a different location
using the WITH MOVE clause to RESTORE DATABASE

-- 
-- 
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.konesans.com - Consultancy from the people who know
"Mike Kron" <MikeKron@discussions.microsoft.com> wrote in message 
news:E491EADB-BAA1-4C8D-B2A5-BF7325A0BB10@microsoft.com...
> Hello,
>
> I have been learning DTS for a couple weeks now, and have been relatively
> successful with using the transformations and SQL queries to create
> statistics tables.
>
> However my current task requires that I essentially take one of our
> databases and make an exact copy of it on the same machine.  I have
> experimented with the import/export wizard, and with using 'generate SQL
> script' in a SQL query along with a transformation, but there is a problem
> with these options.  Our databases use ID's which are flagged as 
> Identities,
> so when I bring over the table data, SQL Server generates them itself 
> instead
> of using the values in the original database.  This is an issue because 
> any
> gaps in our ID's will offset the ID's in the new database, and if I ever
> import more than once it will just start the ID's at the next highest 
> number.
>
> Is there a way to copy over tables EXACTLY as they are, even if these 
> tables
> use columns set as Identities?  I considered looking into Replication, but
> that sounded like a way to synchronize databases in different geographic
> locations as opposed to making a simple copy on the same machine.
>
> Any help would be greatly appreciated
>
> Mike Kron 


Relevant Pages

  • Re: Migration ?
    ... I've tried every way I can think of trying to restore the master database. ... Will a restore on the SQL ... Install a SQL Server failover cluster instance ...
    (microsoft.public.sqlserver.clustering)
  • Re: Sybase Source. What "data flow source" to use?
    ... but could still use DTS to move data. ... when I right-click over a SQL 2005 database and select Import ... datasources defined in ODBC Datasources on my computer, ...
    (microsoft.public.sqlserver.dts)
  • Re: Restore leaves DB in Loading state
    ... state of loading after the database restore - rather than in read only. ... > leave SQL restore hanging until it could write to that file. ... > I support the Professional Association for SQL Server ...
    (microsoft.public.sqlserver.server)
  • Problem causing me to have to restore tlogs WITH MOVE
    ... I have a database i am m oving to another server, ... am moving the data and log files to another drive.(Which I have done ... The problem I am having is after I restore the database using the ... TO ?D:\Program Files\Microsoft SQL ...
    (comp.databases.ms-sqlserver)
  • RE: Restore a WSS 3.0 site from a raw SQL backup
    ... You can restore your sites from raw SQL back-up. ... database. ...
    (microsoft.public.sharepoint.windowsservices)