Advertisement

01.25.2008 at 05:33AM PST, ID: 23110928
[x]
Attachment Details

sp_attach_single_file_db problem       SQL7

Asked by robberbaron in MS SQL Server

Tags: Server: Msg 945, Level 14, State 2... Database 'MailArchiver_200609_IN' cannot be opened because some of the files could not be activated.

exec sp_attach_single_file_db @dbname='MailArchiver_200609_IN',
   @physname='X:\MailArc\MailArchiver_200609_in_Data.MDF'

generates------------
Server: Msg 945, Level 14, State 2, Line 1
Database 'MailArchiver_200609_IN' cannot be opened because some of the files could not be activated.
Server: Msg 1813, Level 16, State 2, Line 1
Could not open new database 'MailArchiver_200609_IN'. CREATE DATABASE is aborted.
-----------------------------

http://support.microsoft.com/kb/271223 says this is by design when multiple logs files were used.
This was not the case. LDF's have been deleted.
database was dismounted using    exec sp_detach_db 'mailArchiver_YYYYMM_IN';

the MDF file was then renamed to be the month in question.

exec sp_attach_db @dbname='MailArchiver_200609_IN',
   @filename1='X:\MailArc\MailArchiver_200609_in_Data.MDF'

generates same error.  X drive has 130G spare. MDF is 1.5G.

I can reattach a DB detached yesterday using the singlefile sp.
Start Free Trial
[+][-]01.25.2008 at 07:11AM PST, ID: 20743096

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.25.2008 at 02:13PM PST, ID: 20746832

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.26.2008 at 12:58AM PST, ID: 20748959

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.27.2008 at 10:33PM PST, ID: 20757196

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.09.2008 at 02:30PM PST, ID: 20859035

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: MS SQL Server
Tags: Server: Msg 945, Level 14, State 2... Database 'MailArchiver_200609_IN' cannot be opened because some of the files could not be activated.
Sign Up Now!
Solution Provided By: robberbaron
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628