Your database would probably be marked 'suspect' since the LSN numbers wouldn't match.
Kevin Martin
Database Engineer
Multimedia Games, Inc.
-----Original Message-----
From: Aaron [mailto:[Email Address Removed] Monday, March 22, 2004 2:36 PM
To: Kevin Martin; 'LazyDBA.com Discussion'
Subject: RE: Attach Database
No such luck. What about restoring from a backup, stopping sql, deleting
the restored .mdf and replacing it with the current copy?
-----Original Message-----
From: Kevin Martin [mailto:kevin.[Email Address Removed]
Sent: March 22, 2004 3:08 PM
To: LazyDBA.com Discussion
Subject: RE: Attach Database
I'm beginning to suspect that you may have a mismatch in your datafile name.
Is the name of the datafile really 'db1.mdf'? The default file name for a
database named 'db1' would be 'db1_data.mdf'.
Try this:
EXEC sp_attach_single_file_db @dbname = 'db1',
@physname = 'D:\sqldata\db1_data.mdf'
Kevin Martin
Database Engineer
Multimedia Games, Inc.
-----Original Message-----
From: Aaron [mailto:[Email Address Removed] Monday, March 22, 2004 12:59 PM
To: Kevin Martin; 'LazyDBA.com Discussion'
Subject: RE: Attach Database
1st try:
EXEC sp_attach_single_file_db @dbname = 'db1',
@physname = 'D:\sqldata\db1.mdf'
2nd try:
EXEC sp_attach_db @dbname = N'db1',
@filename1 = N'D:\sqldata\db1.mdf'
-----Original Message-----
From: Kevin Martin [mailto:kevin.[Email Address Removed] March 22, 2004 1:52 PM
To: LazyDBA.com Discussion
Subject: RE: Attach Database
Can you post the exact command you are using to reattach the DB?
-----Original Message-----
From: Aaron [mailto:[Email Address Removed] Monday, March 22, 2004 12:35 PM
To: LazyDBA.com Discussion
Subject: RE: Attach Database
It's on a local drive.
I detached the db to remove the transaction log - but now I can't seem to
re-attach it.
-----Original Message-----
From: Horton, Joe (LNI) [mailto:[Email Address Removed] March 22, 2004 1:33 PM
To: 'Aaron'; LazyDBA.com Discussion
Subject: RE: Attach Database
Is it a local drive? If not use the UNC
__________________________
Joe Horton
Database Developer / Software Engineer
WISHA/Legal Services Software Development Department of Labor and Industries
Voice (360) 902-5928 fax (360) 902-6200
-----Original Message-----
From: Aaron [mailto:[Email Address Removed] Monday, March 22, 2004 10:30 AM
To: LazyDBA.com Discussion
Subject: RE: Attach Database
Everything there is correct. The BOL was just an example. I copied & pasted
the path from Windows Explorer
-----Original Message-----
From: Herrera, Jorge [mailto:[Email Address Removed] March 22, 2004 1:25 PM
To: LazyDBA.com Discussion
Subject: RE: Attach Database
Aaron,
Check the Path and DB name for correct spelling.
Jorge A. Herrera
MSSQL DBA
Chevy Chase Bank
6200 Chevy Chase Drive
Laurel, MD. 20707
[Email Address Removed] Message-----
From: Aaron [mailto:[Email Address Removed] Monday, March 22, 2004 1:04 PM
To: LazyDBA.com Discussion
Subject: Attach Database
From BOL I have used this example to attempt to re-attach a .mdf
EXEC sp_attach_single_file_db @dbname = 'pubs',
@physname = 'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs.mdf'
But, I'm getting this error all the time:
Server: Msg 1813, Level 16, State 2, Line 1 Could not open new database
'db1'. CREATE DATABASE is aborted.
Device activation error. The physical file name 'D:\sqldata\db1_log.ldf' may
be incorrect.
---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY Get today's
cartoon: http://www.LazyDBA.com To unsubscribe, e-mail:
mssqldba-[Email Address Removed] For additional commands, e-mail:
mssqldba-[Email Address Removed] mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.583 / Virus Database: 369 - Release Date: 2/10/2004
---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY Get today's
cartoon: http://www.LazyDBA.com To unsubscribe, e-mail:
mssqldba-[Email Address Removed] For additional commands, e-mail:
mssqldba-[Email Address Removed] mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.583 / Virus Database: 369 - Release Date: 2/10/2004
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.583 / Virus Database: 369 - Release Date: 2/10/2004
---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY Get today's
cartoon: http://www.LazyDBA.com To unsubscribe, e-mail:
mssqldba-[Email Address Removed] For additional commands, e-mail:
mssqldba-[Email Address Removed] mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.583 / Virus Database: 369 - Release Date: 2/10/2004
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.583 / Virus Database: 369 - Release Date: 2/10/2004
MS Sql Server LazyDBA home page