NSRSYBCC(8)

NAME
nsrsybcc - consistency check Sybase database(s)

SYNOPSIS
nsrsybcc [ -hqv? ] [ -o ckdb ] [ -o ckdbnoidx ] [ -o ckal ] [ -o ckcat ] [ -o ckstor ] [ -U user-name ] [ -P password ] [ -g group ] [ -c client-name ] [ -s server ] [ -D debug-level ] SYBASE:/sql-server-name[/database-name]

DESCRIPTION
nsrsybcc 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 database-name is optional; if omitted, all databases on the SQL Server except the tempdb database will be checked.

The user-name and password provide the information necessary 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, client-name, group, and server 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 ckstor option. For earlier versions of Sybase SQL Server, the default is a combination of the -o ckdbnoidx, -o ckal, and -o ckcat options.

The -o ckstor option is available only with Sybase Adaptive Server version 11.5 or later. The -o ckstor option is preferable to the other options because it provides higher concurrency. The -o ckal option may occasionally cause errors 2540 or 2546 to occur when no real error conditions 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 stdout. There may be a large quantity of informational messages, and these informational messages may be suppressed by using the -q flag.

OPTIONS

-h  Display usage.

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

-q  Quiet. Display only error messages.

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

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

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

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

-o ckstor
    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 capabilities than the -o ckal option.

-U user-name
    Specify the SQL Server user that will check the databases.

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

-s server
    Specify which machine to use as the NetWorker server.

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

-c client-name
    Specify the client name for querying the user-name and password. This is useful on clients with multiple 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 server network interface attribute of the client resource (see nsr_client(5)).

-g group
    This option is used by savegrp(8) and savefs(8) to denote the group to query for the username and password (see nsr_client(5) and nsr_group(5)).

EXAMPLES

Consistency checking a database:
    To consistency check database "accounting" on SQL Server "production", enter the following command:
    nsrsybcc -U sa -P password SYBASE:productionaccounting

    This will issue the default consistency checks, which will be a -o ckal, -o ckdbnoidx, and -o ckcat for Sybase SQL Servers prior to 11.5. For 11.5 systems, this will perform a -o ckstor check.

Consistency checking all database in a SQL Server:
    To consistency check all databases on SQL Server "production", with the -o ckdb and -o ckal options enter the following command:
    nsrsybcc -U sa -P password -o ckdb -o ckal SYBASE:production

SEE ALSO
curses(3X), nsr_getdate(3), nwadmin(8), nsr(5), nsr(8), nsr_client(5), nsr_device(5), nsr_group(5), nsr_service(5), nsrd(8), nsrim(8), nsrindexd(8), nsrmm(8), nsrmmd(8), nsrsyb(8), nsrsybcc(8), nsrsybrc(8), nsrwatch(8), recover(8), savefs(8), savegrp(8)

DIAGNOSTICS

  Exit Codes
0   Normal exit. This means the consistency check completed without error.
1   Abnormal exit. There may be consistency errors in the checked databases.

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

The context allocation routine failed...
    Cannot access file /sybase/config/objectid.dat This message indicates that the $SYBASE environment variable was not set. This environment variable needs to be set so that nsrsybcc 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 interfaces file is.) This error may also appear if the Sybase Open Client software is not installed. Sybase Open Client must be installed for nsrsybcc to run.

Error from server: Msg number, Level number, State number
    Error text This message indicates that there was an error message returned from Sybase. Refer to the Sybase Troubleshooting and Errors Guide for an explanation of the error and its resolution.