help needed for Recovring database



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

.



Relevant Pages

  • Re: Cross-database execution permissions with certificates and sch
    ... activated user cannot access objects in other schemas in this database. ... injection is defended against, however, the threat exists anywhere EXECUTE ... CREATE USER dispatcher ... the certificate is a trusted authenticator because you granted AUTHENTICATE ...
    (microsoft.public.sqlserver.security)
  • Re: SQLCE performance from .NET CF v2.0
    ... Please remember when bulk inserting is being executed against SQL CE, ... > local database functionality. ... > database technology and I am considering switching to SQLCE at the same ... > execute the prepared statement again. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: CFS: some bad numbers with Java/database threading
    ... execute multiple queries on the same data, ... workload is "pathological". ... lock-less algorithms (like variations on optimistic locking) because ... if the locking is implemented using database ...
    (Linux-Kernel)
  • Re: Execute Persmission denied on object sp_OACreate
    ... SQL Server doesn't check permissions on indirectly referenced objects as ... You can prevent ad-hoc execution of powerful master database procs while ... >I have a user who has execute permissions on a store procedure in a>database> which in turns executes 4 stored procedures in the master database. ...
    (microsoft.public.sqlserver.security)
  • Re: Business objects, subset of collection
    ... SQL only works when the statements are ... all items (invoices) are subscribing for events. ... all items and all items has to execute the criteria evaluation, ... The features of a OO database is basically the same as of a network ...
    (comp.object)