


NSRSYBRC(8)                                           NSRSYBRC(8)


NNAAMMEE
       nsrsybrc - recover Sybase database(s) from NetWorker.

SSYYNNOOPPSSIISS
       nnssrrssyybbrrcc [ --hhkkqqvv??  ] [ --UU _u_s_e_r_-_n_a_m_e ] [ --PP _p_a_s_s_w_o_r_d ] [ --dd
       _S_Y_B_A_S_E_:_/_s_q_l_-_s_e_r_v_e_r_-_n_a_m_e_[ _/_d_a_t_a_b_a_s_e_-_n_a_m_e _] ] [ --ss _s_e_r_v_e_r  ]
       [  --cc  _c_l_i_e_n_t_-_n_a_m_e  ]  [  --tt  _d_a_t_e  ] [ --DD _d_e_b_u_g_-_l_e_v_e_l ] {
       SSYYBBAASSEE:://ssqqll--sseerrvveerr--nnaammee       ||        SSYYBBAASSEE:://ssqqll--sseerrvveerr--
       nnaammee//ddaattaabbaassee--nnaammee [ SYBASE:/sql-server-name/database-name
       ...  ] }

DDEESSCCRRIIPPTTIIOONN
       nnssrrssyybbrrcc  restores  Sybase  SQL  Server  11.0  and   later
       databases  from NetWorker.  The progress of a nsrsybrc can
       be monitored using the X Window  System  based  nnwwaaddmmiinn(8)
       program  or  the  ccuurrsseess(3X) based nnssrrwwaattcchh(8) program for
       other terminal types.

       The database(s)  to  be  restored  are  specified  by  the
       SYBASE:/sql-server-name[/database-name]     value.     The
       _d_a_t_a_b_a_s_e_-_n_a_m_e is optional; if omitted,  all  databases  on
       the   SQL  Server  will  be  restored  except  the  master
       database.

       This command should be issued from the same operating sys-
       tem  userid  that launched the Sybase Backup Server.  That
       is the userid that owns the backups, and it should be used
       to  restore  them.   Other operating system userids may be
       unable to see the savesets that the Sybase  Backup  Server
       created.

       Note  that the master database must be restored before the
       other system and user databases.  The order for  restoring
       a  complete SQL Server system is to first restore the mas-
       ter database and then to  restore  the  remainder  of  the
       databases.   In  order to restore the master database, you
       must restart the SQL Server in master recovery  mode  (the
       -m  option  of  startserver.)   Using  nsrsybrc, you would
       first issue the command:
        nsrsybrc -U sa -P password SYBASE:/sql-server-name/master
       Once  this  successfully restores the master database, the
       SQL Server will automatically shut itself down.  You  will
       need to restart the SQL server and restore the rest of the
       databases with the
        nsrsybrc -U sa -P password  SYBASE:/sql-server-name  com-
       mand.  This  will restore the rest of the system databases
       and the user databases.

       Exercise  extreme  caution  when  restoring   the   master
       database.   If  you  are  restoring  it to a new database,
       remember that it has path names to the device  files.   If
       you  restore  the master database to another SQL Server on
       the same machine, the new SQL Server will attempt  to  use
       the same device files as the old SQL Server.



NetWorker rt_1998_4Q.Build.MMaJrFcehra0l8_,0021000                        1





NSRSYBRC(8)                                           NSRSYBRC(8)


       The  _u_s_e_r_-_n_a_m_e and _p_a_s_s_w_o_r_d provide the information neces-
       sary to log in to the SQL  Server  to  be  restored.   The
       user-name  must  have  sufficient  permissions  to perform
       database loads on the databases to be restored.


OOPPTTIIOONNSS
       --kk     Perform  a  database  consistency  check  on   each
              database  once  it is restored.  The results of the
              database consistency check are written  to  stdout.
              The  default  is  not to perform a database consis-
              tency check, and if this option  is  supplied,  the
              consistency  check is done with the default options
              described in the man page for nnssrrssyybbcccc(8)..

       --hh     Display usage.

       --vv     Verbose.  Cause the nnssrrssyybbrrcc program to tell you in
              great detail what it is doing as it proceeds.

       --??     Display usage.

       --qq     Quiet.   Display only summary information and error
              messages.

       --UU _u_s_e_r_-_n_a_m_e
              Specify the SQL Server user that will  perform  the
              backups.

       --PP _p_a_s_s_w_o_r_d
              Specifies the password for the SQL Server user that
              will perform the backups.

       --dd _S_Y_B_A_S_E_:_/_s_q_l_-_s_e_r_v_e_r_-_n_a_m_e_[ _/_d_a_t_a_b_a_s_e_-_n_a_m_e _]
              Specify a new destination for  this  database.   If
              this option is not set, the database is restored to
              its original SQL Server and database name.  If this
              option  is  specified,  the database is restored to
              this new destination.  This can be used to  restore
              a database to a new SQL Server and database name or
              a new database name in the same SQL Server.   If  a
              new destination is supplied, only one database name
              (or sql-server-name) can be specified on  the  com-
              mand   line  for  this  restore.   The  destination
              database(s) must already exist; nsrsybrc  does  not
              create  them  automatically.  For the fastest load-
              ing, new databases created to be restored to should
              be created with the "for load" option.

       --ss _s_e_r_v_e_r
              Specify  which  machine  to  use  as  the NetWorker
              server.  The default is the current machine  if  it
              is running a server, otherwise the machine with the
              logical name ``nsrhost'' in  the  host  table  (see



NetWorker rt_1998_4Q.Build.MMaJrFcehra0l8_,0021000                        2





NSRSYBRC(8)                                           NSRSYBRC(8)


              hhoossttss(5)) is used.

       --cc _c_l_i_e_n_t_-_n_a_m_e
              Specify  the  client  name for starting the restore
              session.  This is useful on clients  with  multiple
              network  interfaces, and hence multiple host names.
              It can be used to use multiple index databases  for
              the  same physical client.  Note that this does not
              specify the network  interface  to  use.   This  is
              specified in the sseerrvveerr nneettwwoorrkk iinntteerrffaaccee attribute
              of the client resource (see nnssrr__cclliieenntt(5)).

       --DD _d_e_b_u_g_-_l_e_v_e_l
              Set the NSR_DEBUG_LEVEL for  this  command.   Valid
              values  range  from  0 (no information) to 10 (much
              information.)  The default value is 2.

       --tt _d_a_t_e
              This specifies the date and  time  to  restore  to.
              The  default for this is the current date and time.
              If the SQL Server is Sybase Adaptive Server version
              11.5  or  later, and the database supports transac-
              tion log backups, this time will  be  used  as  the
              "until_time" that the database will be restored to.
              In Sybase SQL  Server  11.x  Systems  earlier  than
              11.5,  the  database will be restored to the latest
              time possible that is not after the date  supplied.


EEXXAAMMPPLLEESS
       _R_e_s_t_o_r_i_n_g _a _d_a_t_a_b_a_s_e:
              To  restore  the model database in SQL Server "pro-
              duction" to the current  time  from  the  NetWorker
              Server  called  "networker", use the following com-
              mand:
                 nsrsybrc  -U  sa  -P   password   -s   networker
                 SYBASE:productionmodel

       _R_e_s_t_o_r_i_n_g _t_h_e _m_a_s_t_e_r _d_a_t_a_b_a_s_e:
              To  restore  the master database in server "produc-
              tion" to the current time, restart "production"  in
              master  recover  mode  (with  the  "-m" option) and
              issue the command
                 nsrsybrc  -U  sa  -P   password   -s   networker
                 SYBASE:productionmaster

              Once  the  master  database  is  restored,  the SQL
              Server will shut itself down.  To restore the  rest
              of  the databases, restart the SQL Server and issue
              the command
                 nsrsybrc  -U  sa  -P   password   -s   networker
                 SYBASE:production

              This  will restore the rest of the databases on the



NetWorker rt_1998_4Q.Build.MMaJrFcehra0l8_,0021000                        3





NSRSYBRC(8)                                           NSRSYBRC(8)


              production SQL Server.

       _R_e_s_t_o_r_i_n_g _a _d_a_t_a_b_a_s_e _t_o _a _n_e_w _s_e_r_v_e_r:
              To restore a database to a new server, use the "-d"
              option  to specify the new server name.  To restore
              the  database  "accounting"  from  "production"  to
              "test", issue the command
                 nsrsybrc  -U  sa  -P  password  -s  networker -d
                 SYBASE:testaccounting  SYBASE:productionaccount-
                 ing

              The  destination database must already exist in the
              server, and the user name  and  password  are  ones
              that apply to the test server.

SSEEEE AALLSSOO
       ccuurrsseess(3X),  nnssrr__ggeettddaattee(3), hhoossttss(5), nnwwaaddmmiinn(8), nnssrr(5),
       nnssrr(8),   nnssrr__cclliieenntt(5),   nnssrr__ddeevviiccee(5),    nnssrr__ggrroouupp(5),
       nnssrr__sseerrvviiccee(5), nnssrrdd(8), nnssrriimm(8), nnssrriinnddeexxdd(8), nnssrrmmmm(8),
       nnssrrmmmmdd(8),  nnssrrssyybb(8),  nnssrrssyybbcccc(8),   nnssrrssyybbssvv(8),   nnssrr--
       wwaattcchh(8), rreeccoovveerr(8), ssaavveeffss(8), ssaavveeggrrpp(8)

DDIIAAGGNNOOSSTTIICCSS
   EExxiitt CCooddeess
       00      Normal  exit.  This means that the database(s) were
              correctly restored.
       11      Abnormal  exit.   The  database(s)  were  not   all
              restored.

   MMeessssaaggeess
       This is a partial listing of common error messages.  Refer
       to the Administrator's Guide for more complete listing  of
       error messages and how to resolve them.

       TThhee ccoonntteexxtt aallllooccaattiioonn rroouuttiinnee ffaaiilleedd......
              CCaannnnoott aacccceessss ffiillee _/_s_y_b_a_s_e_/ccoonnffiigg//oobbjjeeccttiidd..ddaatt

              This message indicates that the $SYBASE environment
              variable was not set.   This  environment  variable
              needs  to  be  set  so  that  nnssrrssyybbrrcc can find the
              Sybase localization files required at runtime.  The
              $SYBASE  environment  variable should be set to the
              directory where Sybase was installed (the one where
              the  iinntteerrffaacceess  file  is.)   This  error  may also
              appear if the Sybase Open Client  software  is  not
              installed.   Sybase  Open  Client must be installed
              for nnssrrssyybbrrcc to run.

       AArrcchhiivvee AAPPII eerrrroorr......UUnnaabbllee ttoo ooppeenn AAPPII lliibbrraarryy ffoorr
       ddeevviiccee......
              LLiibbrraarryy ppaatthh iiss _/_s_y_b_a_s_e_/lliibb//lliibbbbmmss_._e_x_t

              This  message  indicates  that the symbolic link to
              the  libbms._e_x_t  library  is   missing   from   the



NetWorker rt_1998_4Q.Build.MMaJrFcehra0l8_,0021000                        4





NSRSYBRC(8)                                           NSRSYBRC(8)


              $SYBASE/lib  directory.  Make sure the link exists.
              The libbms._e_x_t file to  link  to  is  in  the  same
              directory as the NetWorker binary files.

       AArrcchhiivvee AAPPII eerrrroorr......AAtttteemmppttiinngg ttoo ooppeenn bbyyttee ssttrreeaamm
       ddeevviiccee......
              nneettwwoorrkk eerrrroorr  ((SSeevveerriittyy  55  NNuummbbeerr  1122))::  BBuussiinneessss
              SSuuiittee  MMoodduullee  ffoorr  SSyybbaassee  hhaass  nnoott  bbeeeenn pprrooppeerrllyy
              eennaabblleedd..

              This message indicates that the server  from  which
              you  are  restoring  is  not  enabled  for  Sybase.
              Install an enabler for the  Sybase  module  on  the
              server and retry the operation.

       AArrcchhiivvee AAPPII eerrrroorr......AAtttteemmppttiinngg ttoo ooppeenn bbyyttee ssttrreeaamm
       ddeevviiccee......
              nneettwwoorrkk eerrrroorr ((SSeevveerriittyy 55 NNuummbbeerr 1133)):: _c_l_i_e_n_t iiss nnoott
              aa rreeggiisstteerreedd cclliieenntt

              This  message  indicates  that  the client on which
              nnssrrssyybbrrcc is being run is not a registered client of
              the server from which the backup is to be restored.
              Create a client resource for  this  client  on  the
              server and retry the operation.

       EErrrroorr:: nnoo bbaacckkuupp wwaass ffoouunndd ffoorr ddaattaabbaassee _d_a_t_a_b_a_s_e_-_n_a_m_e

              This  message  indicates  that there are no backups
              found for the database requested.  Make  sure  that
              the Operating System user used to restore the back-
              ups is the same as the one that created  the  back-
              ups.   Use nnssrriinnffoo to see the objectowner field for
              each backup.  The objectowner is the Operating Sys-
              tem user that must restore the data.

       EErrrroorr ffrroomm sseerrvveerr:: MMssgg 33110088,, LLeevveell 1166,, SSttaattee 11
              LLOOAADD  DDAATTAABBAASSEE  mmuusstt bbee uusseedd iinn ssiinnggllee uusseerr mmooddee iiff
              ttrryyiinngg ttoo rreessttoorree tthhee MMaasstteerr ddaattaabbaassee..

              In order to restore the master  database,  the  SQL
              Server  needs  to be restarted in single user mode.
              Shut down the SQL Server and restart it with the --mm
              option.

       CCTT__LLIIBBRRAARRYY eerrrroorr:: ......ooppeerraattiioonn tteerrmmiinnaatteedd dduuee ttoo ddiissccoonn--
       nneecctt
              CCTT__LLIIBBRRAARRYY eerrrroorr:: ......TThhee ccoonnnneeccttiioonn hhaass bbeeeenn mmaarrkkeedd
              ddeeaadd..

              These   messages   are  expected  when  the  master
              database is recovered.  They indicate that the  SQL
              Server  has shut down on the successful restoration
              of the master database.  The SQL Server  will  need



NetWorker rt_1998_4Q.Build.MMaJrFcehra0l8_,0021000                        5





NSRSYBRC(8)                                           NSRSYBRC(8)


              to  be  restarted  in  order  to  restore  the user
              databases or in  order  to  make  it  available  to
              users.

       NNoott rreessttoorriinngg ddaattaabbaassee mmaasstteerr..  IItt nneeeeddss ttoo bbee llooaaddeedd
              sseeppaarraatteellyy  bbeeffoorree  tthhee  rreesstt  ooff  tthhee  iinnssttaannccee iiss
              llooaaddeedd..

              This message indicates that the entire  SQL  server
              is  being  restored  (because  no _d_a_t_a_b_a_s_e_-_n_a_m_e was
              specified on the command line), and that the master
              database will not be restored.  The master database
              must be restored before all of the other databases,
              and  it  will  shut  down the SQL Server once it is
              restored.  Therefore, no  other  databases  can  be
              restored at the same time as master.

       EErrrroorr ffrroomm sseerrvveerr:: MMssgg _n_u_m_b_e_r,, LLeevveell _n_u_m_b_e_r,, SSttaattee _n_u_m_b_e_r
              _E_r_r_o_r _t_e_x_t

              This message indicates that there was an error mes-
              sage returned from Sybase.   Refer  to  the  Sybase
              Troubleshooting and Errors Guide for an explanation
              of the error and its resolution.

































NetWorker rt_1998_4Q.Build.MMaJrFcehra0l8_,0021000                        6


