Attach a MDF file without the LDF

December 7, 2006 11:29 by rclarkson

A friend asked me about this and here where two answers.  We used the first one listed first time around.  You should see the differences between the solutions.

 

 

The stored procedure is under the Master database. -RDC

A single-file database is a database that have only one data file. When a database comprises only one data file, the database can be attached to an instance of SQL Server 2000 without using the transaction log file. When the data file will be attached, SQL Server will create a new transaction log file automatically.

To attach a single-file database, you can use the sp_attach_single_file_db system stored procedure. The syntax for sp_attach_single_file_db system stored procedure is as follows:

sp_attach_single_file_db [ @dbname = ] 'dbname' 
    , [ @physname = ] 'physical_name'

      
      
      • [@dbname =] 'dbname' is the database name. 'dbname' is nvarchar(128), a default value is NULL.
      • [@physname =] 'phsyical_name' is the database file name. 'phsyical_name' is nvarchar(260), a default value is NULL.

      This is the example to attach only one data file of the pubs database from the C:\MSSQL\Data directory:

      EXEC sp_attach_single_file_db @dbname = 'pubs',
           @physname = 'C:\MSSQL\Data\pubs.mdf'
      
      
      >
      
    1. Link to How to attach a MDF file without the LDF ยป ServerTastic Blog

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

ctfmon and negative performance

December 4, 2006 07:10 by rclarkson

I am following up on my blog about ctfmon.  I did a performance analysis and my visual studio worked and responded better without ctfmon running.  Features like hitting F4 then typing the text for a control would not work with ctfmon running.  So, I kicked the ctfmon and got going faster and better without it.  You need ctfmon if you are going to use handwriting and language to text, etc.  How many people are using these features?  None that I am aware.  Follow this link http://support.microsoft.com/kb/326526.  I used only removing from the Office Installation.  The other steps were not necessary for me.


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5