Results 1 to 13 of 13
  1. #1
    Join Date
    Dec 2004
    Location
    London, England
    Posts
    3

    Unanswered: Duplicating a Database

    Hi

    What i am trying to do is duplicate a database on my server without the data contained within it. Is there a way to do this and if so, how?

    Thanks

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Script out the entire database, except the database creation part (just tables, views, procs, functions, whatnot), then execute it against your new blank database.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  3. #3
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Do you know what Enterprise Manager is?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  4. #4
    Join Date
    Dec 2004
    Location
    London, England
    Posts
    3
    Yeah, can i do this in enterprise manager?

  5. #5
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Yup.

    Go to the database you want, right click on the database

    In the menu items look for AllTasks>Generate SQL Scripts

    There are 3 tabs, make sure you select ALL of the appropriate options

    Then script to 1 File.

    Save the file (I would use Windows ANSI Text option)

    Then run the script in QA

    viola
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  6. #6
    Join Date
    Dec 2004
    Location
    London, England
    Posts
    3
    Thank you both for your help

  7. #7
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    uhhh...your welcome..

    Did it work?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  8. #8
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    ...or through the Data Transformation utility within EM, just copy the objects and not the data.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  9. #9
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    again with the DTS thingy??????
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  10. #10
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    You REALLY hate DTS, don't you?

    Its a pretty convenient way for ad-hoc data transfers and copying schemas. I just think that the implementation of the packages is clunky. It's too much of a hodge-podge of different technologies for my taste, and thus violates the KISS principle.

    But from the ER menu system copying databases through DTS is just point-and-click...so I use it frequently.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  11. #11
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    I'm thinking about creating a database application that uses dynamic SQL to call DTS packages that import GUIDs.

    Just to drive you crazy.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  12. #12
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401
    Yo blind dude !!!

    Just go ahead with it ... do send a copy of the script to me too ...

    Anyone has any idea how to go on implementing Type 1 ETL logic using DTS Package ... the source tables cannot be modified (i mean cannot create triggers or anything on the source tables)
    Get yourself a copy of the The Holy Book

    order has no physical Brett in The meaning of a Kaiser . -database data

  13. #13
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Logic in a DTS package?

    Not something I would do...

    Load it all into staging tables and let TSQL handle it from there. That's my standard method.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

Posting Permissions

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