


NSRSYBCC(8)                                           NSRSYBCC(8)


NNAAMMEE
       nsrsybcc - consistency check Sybase database(s)

SSYYNNOOPPSSIISS
       nnssrrssyybbcccc [ --hhqqvv??  ] [ --oo _c_k_d_b ] [ --oo _c_k_d_b_n_o_i_d_x ] [ --oo _c_k_a_l
       ] [ --oo _c_k_c_a_t ] [ --oo _c_k_s_t_o_r ] [ --UU _u_s_e_r_-_n_a_m_e ] [  --PP  _p_a_s_s_-
       _w_o_r_d  ] [ --gg _g_r_o_u_p ] [ --cc _c_l_i_e_n_t_-_n_a_m_e ] [ --ss _s_e_r_v_e_r ] [ --DD
       _d_e_b_u_g_-_l_e_v_e_l ] SSYYBBAASSEE:://ssqqll--sseerrvveerr--nnaammee[[//ddaattaabbaassee--nnaammee]]

DDEESSCCRRIIPPTTIIOONN
       nnssrrssyybbcccc consistency checks Sybase SQL Server databases by
       running  SQL  Server  "dbcc"  consistency  checks  on  the
       database.

       The  database(s)  to  be  checked  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 except the tempdb database will be checked.

       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 backed up.  The
       user-name must have sufficient permissions to run the dbcc
       command  on the databases to be checked.  If the user-name
       and password are not supplied, the  SQL  Server  name  and
       database  name, _c_l_i_e_n_t_-_n_a_m_e_, _g_r_o_u_p_, and _s_e_r_v_e_r are used to
       query the client resource defined on the  server  for  the
       user-name and password.

       If  no  checking  options  are  supplied,  the default for
       Sybase Adaptive Server 11.5 and later  is  the  _-_o  _c_k_s_t_o_r
       option.   For  earlier  versions of Sybase SQL Server, the
       default is a combination of the _-_o _c_k_d_b_n_o_i_d_x, _-_o _c_k_a_l, and
       _-_o _c_k_c_a_t options.

       The  _-_o  _c_k_s_t_o_r option is available only with Sybase Adap-
       tive Server version 11.5 or later.  The _-_o  _c_k_s_t_o_r  option
       is  preferable  to  the  other options because it provides
       higher concurrency.  The _-_o _c_k_a_l option  may  occasionally
       cause errors 2540 or 2546 to occur when no real error con-
       ditions exist.  Running SQL Server  in  single  user  mode
       will   prevent  these  condition  from  being  incorrectly
       reported.  See  the  SQL  Server(TM)  Troubleshooting  and
       Error  Messages Guide for more information on interpreting
       these and other consistency check errors.

       The results of the consistency check are written  to  std-
       out.   There may be a large quantity of informational mes-
       sages, and these informational messages may be  suppressed
       by using the --qq flag.


OOPPTTIIOONNSS
       --hh     Display usage.




NetWorker rt_1998_4Q.Build.MMaJrFcehra0l8_,0021000                        1





NSRSYBCC(8)                                           NSRSYBCC(8)


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

       --qq     Quiet.  Display only error messages.

       --oo _c_k_d_b
              This performs a dbcc checkdb  check  on  the  given
              database(s).  This checks index and data pages, the
              sorting of indices, pointers,  and  data  rows  for
              each table in the database.

       --oo _c_k_d_b_n_o_i_d_x
              This  performs  a  dbcc  checkdb check on the given
              database(s)  with  the  skip  non  clustered  index
              option.    Non  clustered  indices  may  be  easily
              (although not necessarily speedily) recreated,  and
              this  option  only  checks  clustered  indices.  It
              causes a faster consistency check at  the  cost  of
              possible  greater  recovery  time if one of the non
              clustered indices were corrupt.

       --oo _c_k_a_l
              This performs a dbcc checkalloc check on the  given
              database(s).  The checkalloc option checks the page
              allocations of the database for inconsistency.

       --oo _c_k_c_a_t
              This performs a  dbcc  checkcatalog  check  on  the
              given  database(s).   This checks the system tables
              in the database for consistency.

       --oo _c_k_s_t_o_r
              This performs a  dbcc  checkstorage  check  on  the
              given  database(s).   This  option is available for
              Sybase Adaptive Server version 11.5 and later.   It
              performs  a faster consistency check than the other
              options, and it has greater  concurrency  capabili-
              ties than the _-_o ckal option.

       --UU _u_s_e_r_-_n_a_m_e
              Specify  the  SQL  Server  user that will check the
              databases.

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

       --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
              hhoossttss(5)) is used.




NetWorker rt_1998_4Q.Build.MMaJrFcehra0l8_,0021000                        2





NSRSYBCC(8)                                           NSRSYBCC(8)


       --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.

       --cc _c_l_i_e_n_t_-_n_a_m_e
              Specify  the client name for querying the user-name
              and password.  This is useful on clients with  mul-
              tiple  network  interfaces, and hence multiple host
              names.  It can be used  to  create  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)).

       --gg _g_r_o_u_p
              This  option is used by ssaavveeggrrpp(8) and ssaavveeffss(8) to
              denote the group to  query  for  the  username  and
              password (see nnssrr__cclliieenntt(5) and nnssrr__ggrroouupp(5)).

EEXXAAMMPPLLEESS
       _C_o_n_s_i_s_t_e_n_c_y _c_h_e_c_k_i_n_g _a _d_a_t_a_b_a_s_e:
              To  consistency  check database "accounting" on SQL
              Server "production", enter the following command:
                 nsrsybcc -U sa -P password  SYBASE:productionac-
                 counting

              This  will  issue  the  default consistency checks,
              which will be a _-_o _c_k_a_l, _-_o _c_k_d_b_n_o_i_d_x, and _-_o _c_k_c_a_t
              for  Sybase  SQL  Servers  prior to 11.5.  For 11.5
              systems, this will perform a _-_o _c_k_s_t_o_r check.



       _C_o_n_s_i_s_t_e_n_c_y _c_h_e_c_k_i_n_g _a_l_l _d_a_t_a_b_a_s_e _i_n _a _S_Q_L _S_e_r_v_e_r:
              To consistency check all databases  on  SQL  Server
              "production",  with the _-_o _c_k_d_b and _-_o _c_k_a_l options
              enter the following command:
                 nsrsybcc -U sa  -P  password  -o  ckdb  -o  ckal
                 SYBASE:production

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),   nnssrrssyybbrrcc(8),   nnssrr--
       wwaattcchh(8), rreeccoovveerr(8), ssaavveeffss(8), ssaavveeggrrpp(8)

DDIIAAGGNNOOSSTTIICCSS
   EExxiitt CCooddeess
       00      Normal exit.  This means the consistency check com-
              pleted without error.
       11      Abnormal exit.  There may be consistency errors  in



NetWorker rt_1998_4Q.Build.MMaJrFcehra0l8_,0021000                        3





NSRSYBCC(8)                                           NSRSYBCC(8)


              the checked databases.

   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  nnssrrssyybbcccc 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 nnssrrssyybbcccc to run.

       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                        4


