Attaching database

  • How can i attach a database that has no log file? When i try it refuses.

    Thanks

  • Dennis - you don't say what syntax you're using - but here's an example from BOL to attach a single file...

    EXEC sp_attach_single_file_db @dbname = 'pubs',

    @physname = 'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs.mdf'







    **ASCII stupid question, get a stupid ANSI !!!**

  • Sushila-thanks for your response. I am trying to attach using enterprise manager as well as the sp_attach_single_file_db in vain. My dilemma is my sql server crashed and i had to re-install, i did not have the log file, i only have the mdf file.

    Thanks

  • what error msg are you getting ?!







    **ASCII stupid question, get a stupid ANSI !!!**

  • Well, if you did not sucessfully detach the database, prior to copy/moving /attaching to a different server youre gonna have some issues.

    Basically the database was not Properly detached.

    Search google I remember seeing like a 12 step process you have to go thru to get the db back online. It can be done, but Pain, OMG Pain.

    1 Word Backups.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply