help needed for Recovring database
- From: Farhan <Farhan@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 30 Apr 2005 07:23:03 -0700
I wanted to move my database log file to another drive, but unfortunately I
executed wrong command .
alter database ABC modify file
(name = 'ABC_log',filename= 'D:\Program Files\Microsoft SQL
Server\MSSQL\data\ABC_log.LDF')
instead of
alter database ABC2 modify file
(name = 'ABC2_log',filename= 'D:\Program Files\Microsoft SQL
Server\MSSQL\data\ABC2_log.LDF')
After this, I found my database in Suspect mode, so I executed these commands
sp_configure 'allow updates', 1
GO
RECONFIGURE WITH OVERRIDE
GO
EXEC sp_resetstatus 'ABC2'
And restarted DB services, but database was still in suspect mode, after
checking every possibility, I detached that database, I don’t know why I did
this.
But now I am not able to attach database back. When I try doing this it’s
give me following error
Error 5173: Cannot associate files with different databases.
By the way when I attach this mdf file, it changes the logical file name to
ABC_Data.mdf
But when I execute following query, it displays different logical file name
with ABC.mdf
dbcc checkprimaryfile (N'D:\Program Files\Microsoft SQL
Server\MSSQL\Data\ABC2.mdf', 3)
I believe if I change this logical file name I’ll be able to attach database
back.
Kindly help me the recovering database.
Note: I do not have the transaction log backup & current DB backup.
Farhan Iqbal
.
- Prev by Date: Re: SQL Server 2000 Client
- Next by Date: Re: SQL Server 2000 Client
- Previous by thread: SQL Server 2000 Client
- Index(es):
Relevant Pages
|