SQL Server conection with AttachDBFilename
- From: "Johnny E. Jensen" <johnny@xxxxxxxxx>
- Date: Mon, 22 Oct 2007 15:54:39 +0200
Hello
Using SQL SERVER 2005
I have a database - this database I detached and the made a copy, copyed to
another location.
Then attaching the original database.
Then renamed the copy to MyCopyDatabase.mdf and the logfile to
MyCopyDatabase_log.LDF
Then i want to attach the copy database using this connection string:
Provider=SQLOLEDB;Server=.\SQLExpress;AttachDbFilename=C:\Kunder\NFB\MyCopyDatabase.mdf;
Database=NFBWinnerCRM;Trusted_Connection=Yes;
I recieve an error:
Unable to open the physical file "C:\Aware Development\WinnerCRM7_log.ldf".
Operating system error 32: "32(The process cannot access the file because it
is being used by another process.)"
I am aware that event when i renamed the databasefile (mdf) the original
name and the original path to logfile is still stored within the file.
Therefore the error. But can I specify the log file, just a i am specifying
the database file with the AttachDbFilename?
When doing this with the MS SQL Server management, i still get the error for
the original log file, but here i can alter the path to the "new" logfile.
Kind regards
Johnny Jensen
.
- Prev by Date: error: odbc in vista (with asp)
- Next by Date: MS SQL Read-Only?
- Previous by thread: error: odbc in vista (with asp)
- Next by thread: MS SQL Read-Only?
- Index(es):
Relevant Pages
|
Loading