What to do with ldf file when downloading SQL Server Database Sample code?
-
23 Agustus 2012 22:20
I found the following instructions work when I run it in administrator mode:
CREATE DATABASE AdventureWorks2008 ON (FILENAME = 'c:\SQL Server 2000 Sample Databases\AdventureWorks2008R2_Data.mdf') FOR ATTACH_REBUILD_LOG ;
Now when I download the code at http://examples.oreilly.com/9780735658226-files/ I see these files:
AdventureWorksDW2012_Data.mdf
AdventureWorksDW2012_log.ldf
What am I supposed to do with the LDF file? What happens if I ignore it?
Thanks
Siegfried
siegfried heintze
Semua Balasan
-
23 Agustus 2012 23:02Moderator
The Log Database File (LDF) file holds the database transaction log, and is important for the proper function of the database. You do not want to delete it. Once you attach a database mdf file, you cannot delete it since SQL Server holds a lock on the file.
Did you get the AdventureWorks file attached? If not, this link might help: http://social.technet.microsoft.com/wiki/contents/articles/3735.sql-server-samples-readme-en-us.aspx#Readme_for_Adventure_Works_Sample_Databases.
Please let us know if you need any additional help.
- Disarankan sebagai Jawaban oleh Mr. WhartyMicrosoft Community Contributor, Moderator 23 Agustus 2012 23:30
- Ditandai sebagai Jawaban oleh Mr. WhartyMicrosoft Community Contributor, Moderator 29 Agustus 2012 23:42