Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2004
    Location
    Ottawa, Canada
    Posts
    3

    Question Unanswered: Requirement for creating/loading a new database from the dump.

    What are the steps to create a new database and load it with a dump from an existing database?

    1) do I have to create the database first?
    2) do I have to create the same devices (name and size)?
    3) do I have to create the segments?

    Thanks.

  2. #2
    Join Date
    Jan 2004
    Posts
    545
    Provided Answers: 4
    create the devices, create the database in the exact same order as the dump.
    For example, if you created te dumped database with 100mb data and 50 mb log, and later extended it with 100mb more data, do it the same way in the new database.
    Then you can load the dump.

  3. #3
    Join Date
    Nov 2002
    Posts
    207
    Run the following query to get the order of creation of system, default and log segments.

    select dbid, db_name(dbid), segmap, size/512 from sysusages

    like in this case...

    6 db01 3 600
    6 db01 4 100
    6 db01 3 600
    6 db01 4 50
    6 db01 3 900

    I will create a DB with data size of 600 MB and log size of 100 MB. Then I will alter the DB to add 600 MB of data, then 50 MB of log and finally 900 MB of data.

    HTH.

  4. #4
    Join Date
    Apr 2004
    Location
    Ottawa, Canada
    Posts
    3
    Originally posted by Martijnvs
    create the devices, create the database in the exact same order as the dump.
    For example, if you created te dumped database with 100mb data and 50 mb log, and later extended it with 100mb more data, do it the same way in the new database.
    Then you can load the dump.

    Any reason that I cannot change the size of the device:
    1) make a single device insteads of many small ones (in your example, can I create the new database with 200mb data device and 50mb log device.)

    OR
    2) if I know the database is only being used 50%. Can I create the new database 50% less than the orginials? (in your example, can I create the new database with 75mb data device and 50mb log device).

    Would the load cause problem with either case?

    Thanks.

  5. #5
    Join Date
    Jan 2004
    Posts
    32
    If you create one big device for data and one for log, when you load the database, the data and log will get mixed up.

    Then you can use following procedures to separate the data and log.

    http://info.sybase.com/resolution/de...umber=10953399
    http://www.sybase.com/detail?id=20466

Posting Permissions

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