Copy Database on same machine

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Andy Visniewski

    Copy Database on same machine

    How would I copy an entire database to another (using a different
    name, of course) on the same server? I am new with working with
    databases, so any help would be appreciated. Thanks.
  • John Bell

    #2
    Re: Copy Database on same machine


    "Andy Visniewski" <andy@pepperell .net> wrote in message
    news:f66e2e34.0 309021046.4afef 731@posting.goo gle.com...[color=blue]
    > How would I copy an entire database to another (using a different
    > name, of course) on the same server? I am new with working with
    > databases, so any help would be appreciated. Thanks.[/color]


    Comment

    • John Bell

      #3
      Re: Copy Database on same machine

      Hi

      You could backup/restore or detach/attach



      With the backup/restore you will have to move the data files (WITH MOVE),
      with detach/attach they will have to be copied at OS level.

      As they are on the same machine you don't need to worry about
      logins/orphaned users.

      John

      "Andy Visniewski" <andy@pepperell .net> wrote in message
      news:f66e2e34.0 309021046.4afef 731@posting.goo gle.com...[color=blue]
      > How would I copy an entire database to another (using a different
      > name, of course) on the same server? I am new with working with
      > databases, so any help would be appreciated. Thanks.[/color]


      Comment

      • Trevor Best

        #4
        Re: Copy Database on same machine

        On 2 Sep 2003 11:46:11 -0700 in comp.databases. ms-sqlserver,
        andy@pepperell. net (Andy Visniewski) wrote:
        [color=blue]
        >How would I copy an entire database to another (using a different
        >name, of course) on the same server? I am new with working with
        >databases, so any help would be appreciated. Thanks.[/color]

        DTS (Enterprise Manager, highlight database, right click, all tasks,
        export) Create a new one when prompted on target, use same server.
        When you get to a page in the wizard with 3 radio buttons, choose the
        bottom one, copy SQL Server objects.

        or Again, in the same place, right click, all tasks, backup, backup to
        a file. Now in the same place again, choose Restore from the all tasks
        menu, the default is to show backups of the currently highlighted
        database, which is what you want, at the top of this dialog, type in a
        different name for "restore as database...".

        --
        A)bort, R)etry, I)nfluence with large hammer.

        (replace sithlord with trevor for email)

        Comment

        Working...