Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Attachment Databse Expand / Collapse
Author
Message
Posted Monday, November 12, 2007 5:23 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, November 12, 2007 5:05 AM
Points: 1, Visits: 0
how to attach databse file in sql server 2000.
I have try code like this.....................

execute sp_attach_db @dbname='MyInsurance',
@filename1='G:\Insurance\App_Data\Database.mdf',
@filename2='G:\Insurance\App_Data\Database_log.ldf'

then error occurs like this.........................

Server: Msg 602, Level 21, State 50, Line 1
Could not find row in sysindexes for database ID 8, object ID 1, index ID 1. Run DBCC CHECKTABLE on sysindexes.

Connection Broken
---------------------------------------------
plz help me, for successful attachment database....waiting

Thanks:
Post #420997
Posted Monday, November 12, 2007 5:43 AM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 7:08 AM
Points: 4,427, Visits: 4,179
Your code lis fine, but it seems like you mdf file is corrupted.

Do you have any backup of the database? If yes try to restore it and run DBCC CHECKDB or DBCC CHECKTABLE (sysobjects) with ALL_ERRORMSGS

Markus


Markus Bohse
Post #421003
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse