PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > ms.sqlserver.server > Delete ABC log file for ABC database, affects XYZ log file XYZ dat
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Delete ABC log file for ABC database, affects XYZ log file XYZ dat

Réponse
 
LinkBack Outils de la discussion
Vieux 19/05/2008, 10h47   #1
Whiskey
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Delete ABC log file for ABC database, affects XYZ log file XYZ dat

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?
  Réponse avec citation
Vieux 19/05/2008, 10h53   #2
Uri Dimant
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Delete ABC log file for ABC database, affects XYZ log file XYZ dat

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?



  Réponse avec citation
Vieux 19/05/2008, 13h45   #3
Dan Guzman
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Delete ABC log file for ABC database, affects XYZ log file XYZ dat

> 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?


  Réponse avec citation
Vieux 19/05/2008, 14h11   #4
John Bell
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Delete ABC log file for ABC database, affects XYZ log file XYZ dat


"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

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 05h35.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09101 seconds with 12 queries