|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I backup and detach a database ABC , then delete ABC log file for ABC
database, then attach database ABC . This affects the XYZ log file and XYZ database. The datestamp for XYZ database and XYZ log file is then the same as for the ABC database. I am definitely detaching and attaching the correct databases. Why does the one affect the other? |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Hi
http://www.sqlcommunity.com/default....abid=77&id=222 "Whiskey" <Whiskey@discussions.microsoft.com> wrote in message news:F203FC75-1A1E-4388-BA3C-29207362F8E4@microsoft.com... >I backup and detach a database ABC , then delete ABC log file for ABC > database, then attach database ABC . > This affects the XYZ log file and XYZ database. The datestamp for XYZ > database and XYZ log file is then the same as for the ABC database. > I am definitely detaching and attaching the correct databases. > Why does the one affect the other? |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
> Why does the one affect the other?
I couldn't recreate your symptoms under SQL 2005 SP2 with the script below. Is your situation different (e.g. different SQL version, replication)? CREATE DATABASE Test ON ( NAME='Test', FILENAME='C:\DataFiles\Test.mdf', SIZE=5MB ) LOG ON ( NAME='Test_log', FILENAME='C:\DataFiles\Test_Log.ldf', SIZE=5MB ); GO EXEC sp_detach_db 'Test'; GO EXEC xp_cmdshell 'DEL C:\DataFiles\Test_Log.ldf'; GO CREATE DATABASE Test ON ( NAME='Test', FILENAME='C:\DataFiles\Test.mdf', SIZE=5MB ) FOR ATTACH_REBUILD_LOG; -- Hope this s. Dan Guzman SQL Server MVP http://weblogs.sqlteam.com/dang/ "Whiskey" <Whiskey@discussions.microsoft.com> wrote in message news:F203FC75-1A1E-4388-BA3C-29207362F8E4@microsoft.com... >I backup and detach a database ABC , then delete ABC log file for ABC > database, then attach database ABC . > This affects the XYZ log file and XYZ database. The datestamp for XYZ > database and XYZ log file is then the same as for the ABC database. > I am definitely detaching and attaching the correct databases. > Why does the one affect the other? |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
"Whiskey" <Whiskey@discussions.microsoft.com> wrote in message news:F203FC75-1A1E-4388-BA3C-29207362F8E4@microsoft.com... >I backup and detach a database ABC , then delete ABC log file for ABC > database, then attach database ABC . > This affects the XYZ log file and XYZ database. The datestamp for XYZ > database and XYZ log file is then the same as for the ABC database. > I am definitely detaching and attaching the correct databases. > Why does the one affect the other? Have you got autoclose set on XYZ? John |
|
![]() |
| Outils de la discussion | |
|
|