Results 1 to 4 of 4

Thread: sp_detach_db

  1. #1
    Joe Fawcett Guest

    sp_detach_db

    I wanted to move a database from our test server to live. I ran the above sp and then copied the mdf and ldf files to the new server and ran sp_attach_db, <name>, <path1>, <path2>.
    The new database showed up in MMC after a refresh but the tables have been changed, the name is the same but the fields are named differently and of different types and a new table is showing unlike any from the original.
    Any help appreciated.

  2. #2
    Paul Guest

    sp_detach_db (reply)


    is the new table dtproperties ? If so, don&#39;t worry about it.

    don&#39;t worry about the ldf file as it&#39;ll create itself when you attach the mdf file.

    Are they the same version of SQL Server ?

    ------------
    Joe Fawcett at 3/13/01 3:34:08 AM

    I wanted to move a database from our test server to live. I ran the above sp and then copied the mdf and ldf files to the new server and ran sp_attach_db, <name>, <path1>, <path2>.
    The new database showed up in MMC after a refresh but the tables have been changed, the name is the same but the fields are named differently and of different types and a new table is showing unlike any from the original.
    Any help appreciated.

  3. #3
    Joe Fawcett Guest

    sp_detach_db (reply)

    Yes, they&#39;re both the same. They are two new installs of SQL 7, I&#39;ll try again without the LDF.


    ------------
    Paul at 3/13/01 8:31:26 AM


    is the new table dtproperties ? If so, don&#39;t worry about it.

    don&#39;t worry about the ldf file as it&#39;ll create itself when you attach the mdf file.

    Are they the same version of SQL Server ?

    ------------
    Joe Fawcett at 3/13/01 3:34:08 AM

    I wanted to move a database from our test server to live. I ran the above sp and then copied the mdf and ldf files to the new server and ran sp_attach_db, <name>, <path1>, <path2>.
    The new database showed up in MMC after a refresh but the tables have been changed, the name is the same but the fields are named differently and of different types and a new table is showing unlike any from the original.
    Any help appreciated.

  4. #4
    Dale Shaw Guest

    sp_detach_db (reply)

    Hi

    I do this all the time ... taking backups from clients sites and connecting to my development and test systems.

    I have never encountered an issue.

    Try again ...


    Dale Shaw

    P.S. See www.sourcecode.co.nz/attachdb is this is a common task.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •