Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2011
    Posts
    2

    Unanswered: Sybase Standby database

    Hi All,

    I am new to sybase ASE 15.0.1, can any body let me know how to create standby database. Please provide step by step guide as I already told I am very new in this field.

    Thanks in Advance

  2. #2
    Join Date
    Jan 2004
    Posts
    545
    Provided Answers: 4
    Have you tried the steps in the documentation? And if so, what problems did you encounter?
    I'm not crazy, I'm an aeroplane!

  3. #3
    Join Date
    Feb 2011
    Posts
    2
    Quote Originally Posted by Martijnvs View Post
    Have you tried the steps in the documentation? And if so, what problems did you encounter?
    Thank you for your Reply.

    I did not get any document which describes the standby database procedure. I am keen to have any document to related to standby database without replication server. Please provide link if you have any link to this topic.

    Thanks in advance.

  4. #4
    Join Date
    Jan 2004
    Posts
    545
    Provided Answers: 4
    Basic Googling/searching:
    http://www.sybase.com >> support >> Documentation & Manuals >> Sybase IQ
    I'm sure there's something about standby-databases in there
    Last edited by Martijnvs; 02-16-11 at 04:37.
    I'm not crazy, I'm an aeroplane!

  5. #5
    Join Date
    Aug 2010
    Posts
    19
    first define a "Standby Server" :-)

    What you can do without any special licence or version is to create a so called
    "cold standby Server (Oracle)", where you apply the transaction logs to the standby server.
    Lets assume you have a DB called "db01" (must be in full recovery mode !!),
    you want to have an other DB as a standby server DB, for test create on the same server another Db called "db02".

    Now you have to backup db01 and apply this to db02, afterwards you backup the transaction logs as often as you like and restore them to db02.
    When you take db02 online, you can not apply any tlogs to this DB.

    -- Script for testing Standby DB
    -- it assumes you have 2 dbs on the same server db01 and db02, db01 must be in
    -- full recovery mode
    --------------------------------------------------------------------------------
    -- drop table t2
    -- this table will prove, that the standby server worked
    --drop table t2


    -- Step 1.
    -- create some helper variable for testing
    declare @thisDay varchar(8)
    ,@fullDB varchar(200)
    ,@tlog varchar(250)


    Set @thisDay = convert(char(8),getdate(),112)
    Set @fullDB= 'C:\jwork\Tlog\db01_'+@thisDay+'.bck' -- eg. db01_201102015.bak

    -- for production something like this should be used
    --SET @tlog = 'C:\jwork\Tlog\db01'+convert(char(12),getdate(),20 )+'.tlog'

    dump database db01 to @fullDB
    dump transaction db01 to 'C:\jwork\Tlog\db01_01.tlog'-- for testing db01_01, concatinating a date is much better

    load database db02 from @fullDB
    load transaction db02 from 'C:\jwork\Tlog\db01_01.tlog'

    -- after loade the dump into db02, this db is not available which is ok as we want to restore the tlog files here

    -- create a test table, which should be available on the standby server, when it is taken online
    create table db01..t2 (a int)

    dump transaction db01 to 'C:\jwork\Tlog\db01_02.tlog'
    load transaction db02 from 'C:\jwork\Tlog\db01_02.tlog'

    insert into t2 values (1)
    -- just as an example an other tlog backup - restore

    dump transaction db01 to 'C:\jwork\Tlog\db01_03.tlog'
    load transaction db02 from 'C:\jwork\Tlog\db01_03.tlog' -- with until_time = '2011-02-19 12:15'

    -- now take db02 online to check if everything worked fine I did it in Sybase Central

    -- check if the table t2 is on db02
    select * from db02..t2
    --------------------------------------------------------------------------------

  6. #6
    Join Date
    Jan 2004
    Posts
    545
    Provided Answers: 4
    Something about teaching a man how to fish
    But I hope Farhy's advice helps too
    I'm not crazy, I'm an aeroplane!

Posting Permissions

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