Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Re-Attaching DB

Author  Topic 

silas2
Yak Posting Veteran

65 Posts

Posted - 2005-08-10 : 14:02:51
Forgive my ignorance, but I'm just working thru some examples, and I tried to reattach a db to another server, without the log file I created for the db. Having reattached it, it worked fine - without the log file??? Where does it make any log records? Why didn't it complain?

paulrandal
Yak with Vast SQL Skills

899 Posts

Posted - 2005-08-10 : 14:05:51
quote:
Originally posted by silas2

Forgive my ignorance, but I'm just working thru some examples, and I tried to reattach a db to another server, without the log file I created for the db. Having reattached it, it worked fine - without the log file??? Where does it make any log records? Why didn't it complain?



It created a new log file for you. If there was no active log when you detached the database, the attach will work fine.

Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
(Legalese: This posting is provided "AS IS" with no warranties, and confers no rights.)
Go to Top of Page

silas2
Yak Posting Veteran

65 Posts

Posted - 2005-08-10 : 14:23:19
Any idea where it puts it? What it calls it?
Go to Top of Page

paulrandal
Yak with Vast SQL Skills

899 Posts

Posted - 2005-08-10 : 14:42:13
quote:
Originally posted by silas2

Any idea where it puts it? What it calls it?



It should be in the Data directory. If you've done a regular install, that will be %SystemDrive%\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data

Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
(Legalese: This posting is provided "AS IS" with no warranties, and confers no rights.)
Go to Top of Page
   

- Advertisement -