restore database from a data file

  • I have a database and I can't access the database and it doesn't have the backup. BUt I have the database file available. How can I restore the database by using the datafile.

     

    Thanks.

  • It might be possible to make the database operational again as long as the database server the database was attached to previously was shut down normally.  The command to do that is:

    sp_attach_db

    I won't cut/paste the Transact-SQL help in my reply as I'm sure you are probably capable of looking this command up.

  • I have already solved my problem by using the above command .

     

    Thank you very much for your quick response.

Viewing 3 posts - 1 through 2 (of 2 total)

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