May 18, 2012 at 7:48 pm
Right i installed this pretty quick and it has updated my version:
Microsoft SQL Server 2008 R2 (SP1) - 10.50.2500.0 (X64) Jun 17 2011 00:54:03 Copyright (c) Microsoft Corporation Developer Edition (64-bit) on Windows NT 6.0 <X64> (Build 6001: Service Pack 1)
Ive just tried to add the DB via the right click and attach method and im still gettin the following error:
CREATE FILE encountered operating system error 5(failed to retrieve text for this error. Reason: 15105) while attempting to open or create the physical file 'C:\Program Files\Microsoft SQL Server\100\Tools\Samples\AdventureWorksDW2008R2_log.LDF'.
Could not open new database 'AdventureWorksDW2008R2'. CREATE DATABASE is aborted.
File activation failure. The physical file name "C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\AdventureWorksDW2008R2_Log.LDF" may be incorrect. (Microsoft SQL Server, Error: 5123)
Does it matter where the .mdf file is saved? im running out of ideas haha
May 18, 2012 at 7:55 pm
OK. This error is different than the prior error for which I provided a script.
It appears you are now trying to attach the DW database.
What is the file path of the DW database?
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
May 18, 2012 at 8:03 pm
I have two sample databases:
AdventureWorks2008R2_Data.mdf
AdventureWorksDW2008R2_Data.mdf
Neither will attach
C:\Program Files\Microsoft SQL Server\100\Tools\Samples\ ..File name.
Ive even just tried right clicking on SSMS and running as administrator. Still doesnt work
May 18, 2012 at 8:13 pm
Could it be that i have not a defined admin account? Apart from the sole account i set it up with (Default settings) ?
Also in the SSCM should i have all the settings in the log on properties set to built account and then the same drop down for each one ie: Local Services. (some are set to local services and some are set to Network)
May 18, 2012 at 8:18 pm
Does your account and the SQL account have the necessary permissions to the Directory?
CREATE FILE encountered operating system error 5
OS Error 5 is a permissions error.
Verify your permissions on the share for your account and for the account running the SQL Server Service.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
May 18, 2012 at 8:22 pm
Here are two print screens again, the first with the log file still attached the second with the log file removed ...
And here is how it looks when i am locating the DB incase there is anything im missing:
May 18, 2012 at 8:24 pm
How do i verify the accounts? Basically i have just installed tonight and set only one user with default settings. How can i change this?
Basically i am the only user on the pc and the only admin if that helps
May 18, 2012 at 8:25 pm
And how about a screen shot of you executing that script I provided?
Again, OS error 5 is a permissions error on the location where SQL is trying to create the file.
Also, I don't know what you mean by SSCM. I wonder if you mean SCCM. In either way - I don't use that. I use services.msc direct.
Are you able to create any database at all?
Create database test;
GO
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
May 18, 2012 at 8:27 pm
To check OS permissions:
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
May 18, 2012 at 8:29 pm
Not sure if this is what you mean:
May 18, 2012 at 8:31 pm
The command
Create database test;
GO
Completed successfully ....
May 18, 2012 at 8:32 pm
After running the command you stated before this is the error:
File activation failure. The physical file name "C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\AdventureWorks2008R2_Log.ldf" may be incorrect.
Msg 5123, Level 16, State 1, Line 1
CREATE FILE encountered operating system error 5(failed to retrieve text for this error. Reason: 15105) while attempting to open or create the physical file 'C:\Program Files\Microsoft SQL Server\100\Tools\Samples\AdventureWorks2008R2_log.LDF'.
Msg 1813, Level 16, State 2, Line 1
Could not open new database 'AdventureWorks2008R2'. CREATE DATABASE is aborted.
May 18, 2012 at 8:50 pm
Where did the database files for the new "Test" database get placed?
What are your permissions for this directory?
C:\Program Files\Microsoft SQL Server\100\Tools\Samples
Are the test database files created in this directory?
C:\Program Files\Microsoft SQL Server\100\Tools\Samples
Are you running that attach script exactly as provided or did you modify it?
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
May 19, 2012 at 2:08 pm
SQLRNNR (5/18/2012)
You will need to remove the log file from the files to be attached windows.Highlight the log file and then click remove. The file should say not found. Just remove it from the list, then click ok. It should create a log file for you.
The last one answer should be same as this:
CREATE DATABASE AdventureWorks2008R2
ON ( FILENAME = 'C:\...FilePath...\AdventureWorks2008R2_Data.mdf')
FOR ATTACH_REBUILD_LOG
Regards
IgorMi
Igor Micev,My blog: www.igormicev.com
May 21, 2012 at 5:10 am
Hi,
Thanks for your help, the issue was the Permissions.
Eventually once i had updated my admin accounts on my desktop it allowed me to attach the DB after deleting the Log file.
Thanks again
(Hope this thread helps anyone else with the same issue)
Viewing 15 posts - 31 through 45 (of 48 total)
You must be logged in to reply to this topic. Login to reply