--=====================_142334776==_.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed

BOL has the following:

"The detached files remain and can be reattached using sp_attach_db or 
sp_attach_single_file_db. The files can also be moved to another server and 
attached."

So does this mean when I simply want to COPY a DB from Server A to Server 
B, I need to Detach from AND Attach to Server A, and then Attach to Server B.

Right?  Wrong?

best,  paul

At 09:57 AM 9/14/00 -0500, you wrote:
>|i have not had any luck using this method. it was really simple on SQL6,
>|however SQL7 seems to require that the backup file being restored must
>|have come from the same machine it's being restored to. i've even tried
>|to create a temp backup file, replace it with a new backup file that
>|includes the new data, and then try to restore that but somehow SQL7
>|knows that it's different and won't use it.
>
>This is definitely not the case. You can backup up and restore to different
>servers.
>
>|can you provide more information about "sp_attach_db"? i've never heard
>|of that...
>
>This is a stored procedure and can be found in BOL. An example is listed
>below
>with Listing 1 performing the detach and Listing 2 attaching. This is also
>used to
>move databse locations on the local file system.
>
>Listing 1:
>EXEC sp_detach_db MyDatabase,true
>
>Listing 2:
>EXEC sp_attach_db
>         @dbname = 'MyDatabase', @filename1 = 
> 'h:\sqldata\MyDatabase_data.mdf',
>         @filename2 = 'h:\sqldata\MyDatabase_log.ldf'
>
>------------------------------------------
>Dan O'Keefe
>TriPoint Technologies
>[EMAIL PROTECTED]
>954.675.3115
>
>
>
>------------------------------------------------------------------------------
>Archives: http://www.mail-archive.com/[email protected]/
>To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or 
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in 
>the body.

--=====================_142334776==_.ALT
Content-Type: text/html; charset="us-ascii"

<html>
BOL has the following:<br>
<br>
&quot;The detached files remain and can be reattached using
<b>sp_attach_db</b> or <b>sp_attach_single_file_db</b>. The files can
also be moved to another server and attached.&quot;<br>
<br>
So does this mean when I simply want to COPY a DB from Server A to Server
B, I need to Detach from AND Attach to Server A, and then Attach to
Server B.<br>
<br>
Right?&nbsp; Wrong?<br>
<br>
best,&nbsp; paul<br>
<br>
At 09:57 AM 9/14/00 -0500, you wrote:<br>
<blockquote type=cite class=cite cite>|i have not had any luck using this
method. it was really simple on SQL6,<br>
|however SQL7 seems to require that the backup file being restored
must<br>
|have come from the same machine it's being restored to. i've even
tried<br>
|to create a temp backup file, replace it with a new backup file
that<br>
|includes the new data, and then try to restore that but somehow
SQL7<br>
|knows that it's different and won't use it.<br>
<br>
This is definitely not the case. You can backup up and restore to
different<br>
servers.<br>
<br>
|can you provide more information about &quot;sp_attach_db&quot;? i've
never heard<br>
|of that...<br>
<br>
This is a stored procedure and can be found in BOL. An example is
listed<br>
below<br>
with Listing 1 performing the detach and Listing 2 attaching. This is
also<br>
used to<br>
move databse locations on the local file system.<br>
<br>
Listing 1:<br>
EXEC sp_detach_db MyDatabase,true<br>
<br>
Listing 2:<br>
EXEC sp_attach_db<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>@dbname =
'MyDatabase', @filename1 = 'h:\sqldata\MyDatabase_data.mdf',<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>@filename2
= 'h:\sqldata\MyDatabase_log.ldf'<br>
<br>
------------------------------------------<br>
Dan O'Keefe<br>
TriPoint Technologies<br>
[EMAIL PROTECTED]<br>
954.675.3115<br>
<br>
<br>
<br>
------------------------------------------------------------------------------<br>
Archives:
<a href="http://www.mail-archive.com/[email protected]/" 
eudora="autourl">http://www.mail-archive.com/[email protected]/</a><br>
To Unsubscribe visit
<a href="http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;body=lists/cf_talk" 
eudora="autourl">http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;body=lists/cf_talk</a>
or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. 
</blockquote></html>

--=====================_142334776==_.ALT--

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to