Re: how to restore



Hi,

There was typo error in Jens post. The procedure name is sp_attach_db.

Usage is:-

sp_attach_db 'PMS','D:\mssql\data\pms_bak.mdf 'D:\mssql\data\pms_bak.ldf'

Change the directtory to the actual one.

Thanks
Hari
SQL Server MVP

"hui" <gary1971_cn@xxxxxxx> wrote in message
news:ewxtECrZFHA.1456@xxxxxxxxxxxxxxxxxxxxxxx
> Really, I have been annoyed by it so much. here thank u very much. I am
> going to check sp_attachdb right now.
>
> thank u again
> "Jens Süßmeyer" <Jens@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote
> in
> message news:OQbf99qZFHA.3488@xxxxxxxxxxxxxxxxxxxxxxx
>> Easy, look for SP_attachDB in the BOL, everything explained there along
> with
>> samples.
>>
>> --
>> HTH, Jens Suessmeyer.
>>
>> ---
>> http://www.sqlserver2005.de
>> ---
>> "hui" <gary1971_cn@xxxxxxx> schrieb im Newsbeitrag
>> news:%23WKLI6qZFHA.1152@xxxxxxxxxxxxxxxxxxxxxxx
>> >I have a copy of Data File and Log File, named pms_bak.mdf and
> pms_bak.ldf.
>> > May I restore them into my new sql server? How can I do?
>> >
>> > thank u
>> >
>> >
>> >
>> >
>>
>>
>
>


.



Relevant Pages

  • Re: master db
    ... > In this case you can have a common database user and keep a application ... >>> It is always better to create SQL Server Logins rather than ... >>> Hari ... >>> SQL Server MVP ...
    (microsoft.public.sqlserver.clients)
  • Re: Error 5123 Cannot Attach DB
    ... I will try the stopping of SQL Server and do the file move/renames after ... "Hari Prasad" wrote: ... >> I cannot copy the files as I get the same lock error. ... >>> SQL Server MVP ...
    (microsoft.public.sqlserver.connect)
  • Re: master db
    ... In this case you can have a common database user and keep a application ... Hari ... SQL Server Mvp ... >> SQL Server MVP ...
    (microsoft.public.sqlserver.clients)
  • Re: prompt for parameter in a view
    ... SQL Server will not prompt for a user input. ... Hari ... SQL Server MVP ...
    (microsoft.public.sqlserver.mseq)
  • Re: Return Key (identity) on INSERT operation (SQL/ASP)
    ... hopefully he can expedite processing your full subscription. ... SQL Server MVP ... Columnist, SQL Server Professional ... Please reply to the newsgroup. ...
    (microsoft.public.inetserver.asp.general)