Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

Remove cloning of ldf files Expand / Collapse
Posted Friday, March 8, 2013 6:43 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, February 22, 2016 11:38 PM
Points: 5, Visits: 109
Hi Experts,
PLease help me in my task where i have to remove cloning of ldf files on SQL Server 2012.
I am a novice in such activities.
I have tried some of the below methods but all in vain.

ON (FILENAME=<path and mdf file name>)

EXEC sp_attach_single_file_db @dbname='AConfig_Test1',

( FILENAME = 'path\filename.mdf)

All these threw the below error:

Msg 5120, Level 16, State 101, Line 1
Unable to open the physical file "<path>\AppConfig_Test1.LDF". Operating system error 5: "5(Access is denied.)".
File activation failure. The physical file name "<path>\\AppConfig_Log.LDF" may be incorrect.
The log cannot be rebuilt when the primary file is read-only.
Msg 1813, Level 16, State 2, Line 1
Could not open new database 'AppConfig_Test1'. CREATE DATABASE is aborted.

Post #1428557
Posted Friday, March 8, 2013 6:48 AM



Group: General Forum Members
Last Login: Thursday, September 1, 2016 2:56 AM
Points: 5,969, Visits: 6,067
You need the original LDF, the DB was detached read_only so it will not allow you to create a new LDF for that DB, you need the one it was using when it was set to read only and detached.

Also error 5 is access denied ensure you have the right permissions assigned to your service accounts.

Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
When a question, really isn't a question - Jeff Smith
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1428559
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse