Tuesday, January 22, 2008

How to Attach (or Reattach) a Database Missing the LDF

SQL Server 2005: How to Attach (or Reattach) a Database Missing the LDF
Home -> Database
3902 views

From the computer of: shamanstears (592 recipes)
Created: Nov 20, 2006 Updated: Nov 28, 2006

If you need to attach a database that has no log file (.LDF), or have deleted the log file because it was too big and need to reattach the database, SQL Server 2005 does allow you to do this. You can attach the database by following this Tech-Recipe:

1. Open the SQL Server Management Studio and connect to the desired server.

2. Right-click on Databases and select Attach.

3. Click the Add button and select the database file to be attached.

4. Under database details, select the .LDF file and click the Remove button.

5. Click OK.

The database will be attached with a new logfile.

Tuesday, January 15, 2008

SQL Server Version and SP Serveice Pack Level

SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')