Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Speeding up dbcheck/dbfix 1

Status
Not open for further replies.

cstein

Technical User
Aug 29, 2002
1
0
0
US
I recently had problems with ArcServe 2K (database engine was crashing after each backup). After much tedious searching (I hadn't found this forum yet!), I found the ArcServe article mentioning "Oh...BTW, you should run dbfix biweekely on your databases to prevent corruption". So I run the utilities, and now everything seems to be OK.

Anyway, I'm trying to setup a batch process to automate the dbcheck/dbfix commands, and I'm wondering if it's possible to speed them up. There's a -p switch which sets the size of the database cache...settign this to 512 (default is 64) seemed to increase the speed of dbckeck on the asobject database from 5 minutes to about 1:14, but then running again w/o the -p switch showed the same improvement (looks like the DB file was getting cached by the OS).

So...anyone know *ANYTHING* about the many command-line switches for the database maintainence utilities other than what prints on the abbreviated help screen? I really wish there was a decent GNU/open-source backup package that could handle tape libraries and GFS tape rotations...there's never enough docs with open-source SW (but then have you checked out the ArcServe "manuals" lately), but at least you can crawl through the source, and it's usually pretty easy to figure out something like "what does that wierd command-line switch really do?".

Thanks in advance!
 
Hi Cstein,

Found this in the installation directory of Arcserve 2000:RAIMA VLDB Utilities

NOTE: You will be prompted to enter a username and password when running these utilites. The username is admin and the password is secret.

1) dbcheck.exe - Database consistency check utility

Command Syntax
dbcheck [-s [SETNAME]] [-k] [-dk] [-db] [-kd] [-a] [-t] [-c] dbname [dbfile[dbfile]...]

Command Options
s [SETNAME] Runs a complete consistency check of sets when the name of a set (SETNAME) is not specified,. Using this option, dbcheck verifies set membership consistency by ensuring that member and owner record types are valid, membership count is correct, and doubly linked lists are properly formed. When the name of a set is specified, -s runs a set consistency check for the named set(s) only.

-k Runs a B-tree structure consistency check that ensures the key file adheres to all the rules for a B-tree index. This check ensures that each node (except the root node) is at least half full, the number of filled slots is correct, the key slots on each node are properly sorted, and each leaf node is at the correct level in the B-tree index. Note that if the -dk option does not result in any errors, it is unlikely that the -k option will result in any inconsistencies.

-dk Checks the existence of each key from each record and key field in the data files. While the utility scans a data file, it runs the d_keyfind function for each key to ensure the key exists. It only checks optional keys if they have been stored.

-db Checks the existence of each blob from each record and blob ID field in the data files. While the utility scans a file, it runs the d_blobseek function for each blob to ensure that the blob exists. It only checks blobs if they are stored.

-kd Checks the existence of each record from each key in a key file. While the processor scans a key file, it runs the d_recread function. It reads the record and ensures the data field contents for the key matches that stored in the key file. If the key is optional, the utility also checks the "key stored" bit in the record header.

-a Runs the consistency checks specified by the -s, -dk, -db, and -kd options.

-t Prints a traceback of the B-tree index when dbcheck detects a key file inconsistency.

-c Prints a count of items scanned in a consistency check.

dbname Specifies a database name.

dbfile Specifies a database file.

Description
The dbcheck utility examines the consistency of all files in the physical database specified by dbname. If any database files (dbfile) are specified, the utility checks only these files. Using the options with the processor allows more complete consistency checks, but will slow down processing.

Note: If a client opens a database in 'x' (exclusive) mode, this utility cannot check it because dbcheck opens databases in 's' (normal shared) mode, which is incompatible. Also, a client cannot open a database in 'x' mode while dbcheck has it open.

To check database consistency, dbcheck scans the specified database to be sure the record headers (containing record ID, database address, etc.) are correct, the key files are correct and consistent with the data files, and the set linkages are correct. During its scan, dbcheck validates the position of each record occurrence and verifies the integrity of the delete chains. The processor reports each inconsistency with a message indicating the nature of the inconsistency and the file and location of the offending record or key.

2.00_97.09 Copyright © 1992-1997 Raima Corp.

2) dbdefrag.exe - Database compression utility

usage: dbdefrag [-?] [-a] [-n] [-r [r1[;r2]...]] [-b [b1[;b2]...]] [-i #]
[-m #] [-p #] [-f optfile] [-L server;user;password] dbname

-? = Display this usage information
-a = Same as -r -b
-n = Do not actually perform defragmentation (simulation mode)
-r = Perform defragmentation for files containing record types with names
r1, r2, ...
-b = Perform defragmentation for files containing blobs with names b1, b2,
...
-i = Set period for report polling to # seconds (default is 10)
-m = User and system report type (# can be from 1 to 4, default is 4)
-p = Set number of pages in the dbrepair server cache to # (between 8 and
1000, default is 64)
-f = Read -r and -b options from 'optfile' (in place of command line flags)
-L = Use values server;user;password to login to a server (if not specified,
will attempt to use contents of RDSLOGIN env. variable and, failing
that, will prompt on the command line)

NOTE: multiple -r and -b flags can be specified

3) dbfix.exe - Database fix utility

usage: dbfix [-?] [-a] [-n] [-r [r1[;r2]...]] [-s [s1[;s2]...]]
[-k [k1[;k2]...]] [-b [b1[;b2]...]] [-i #] [-m #] [-p #]
[-f optfile] [-d dumpfile] [-L server;user;password] dbname

-? = Display this usage information
-a = Same as -r -s -k -b
-n = Do not actually perform repair operations (simulation mode)
-r = Perform repair operations for record types with names r1, r2, ...
-s = Perform repair operations for sets with names s1, s2, ...
-k = Perform repair operations for keys with names k1, k2, ...
-b = Perform repair operations for blobs with names b1, b2, ...
-i = Set period for report polling to # seconds (default is 10)
-m = User and system report type (# can be from 1 to 4, default is 4)
-p = Set number of pages in the dbrepair server cache to # (between 8 and
1000, default is 64)
-f = Read -r, -s, -k, and -b options from 'optfile' (in place of command
line flags)
-d = Specify the dump file name
-L = Use values server;user;password to login to a server (if not specified,
will attempt to use contents of RDSLOGIN env. variable and, failing
that, will prompt on the command line)

NOTE: multiple -r, -s, -k, and -b flags can be specified

4) dbimp.exe - Database import utility

Command Syntax
dbimp [-n] [-s ch] [-e ch] [-L [server;user;password]] impspec

Command Options
n Prevents dbimp from echoing its input data to standard output.

s ch Changes the field separator character from a comma to the character ch.

e ch Changes the escape from a backslash ('\') to the character ch.

-L Login parameters in the form connectname;username;password, where connectname is an alias as specified in connect.ini. If not specified, the program uses the value of the RDSLOGIN environment variable, if defined. Otherwise, it prompts for the login parameters.

impspec Specifies the import specification file which contains the commands used to import data into Velocis.

Description
This utility imports data to a Velocis database from ASCII text files according to commands contained in an import specification file, impspec. It logs in to the server and opens the database in exclusive mode with no transactions ("xn").
The dbimp error message format is

filename line col : message
which is interpreted by some text editors.
Limitations on the ASCII input file are listed below.
· Maximum line length 4300 bytes
· Maximum field length 1024 bytes
· Maximum fields per line 128
The Language Summary section below describes the commands that can be used with the dbimp utility.

Language Summary

Import Specification:
database dbname {
for_loop
...
}
for_loop:
foreach [ascii | unicode] input_file {
import_statement
...
}
import_statement:
for_loop | record_statement | connect_statement
record_statement:
record recname {
[handling | field_statement]
...
}
handling:
{create | update | find} on fldnum;

field_statement:
field fldname = [input_file.]fldnum;
connect_statement:
connect setname;

Language Parameters

dbname Specifies the name of the database that is the target of the import. The database must be initialized and registered in the catalog.

input_file Specifies the full name, optionally including a full path, of an ASCII or Unicode text file to be used as input. The name of the file must be enclosed in quotation marks. Note that one input file may be opened more than once during an import. By default, input_file is opened as an ASCII file.

recname Specifies a record type as defined in the DDL schema for the dbname database.

fldnum Specifies an integer that identifies a field within input_file. The first input field is number 1, the second is 2, etc.

fldname Specifies a field type as defined in the DDL schema for database
dbname, within the record type created by the record_statement enclosing this statement.

setname Specifies a set type as defined in the DDL schema for dbname.

2.00_97.09 Copyright © 1992-1997 Raima Corp.

5) dbstat.exe - Displays the current status of the database

usage: dbstat [-?] [-v] [-b #] [-k #] [-nb] [-nk] [-nd]
[-L server;user;password] dbname

-? = Display this usage information
-v = Verbose (reads from data key, and blob files)
-b = Maximum block size in bytes (default 8192)
-k = Blocksize of the OS in bytes (default 1024)
-nb = Skip blob files
-nk = Skip key files
-nd = Skip data files
-L = Use values server;user;password to login to a server (if not
specified, will attempt to use contents of RDSLOGIN env. variable and,
failing that, will prompt on the command line)


6) keybuild.exe - Key file build utility

Command Syntax
keybuild [-L [server;user;password]] dbname


Command Options

-L Logs into the named Velocis server using the specified user name and password. If not specified, keybuild will first check for the RDSLOGIN environment variable defined as "server;user;password", and use the specified values, if present. If not present, keybuild will prompt you for the login information.

dbname Specifies the database name.

Description
The keybuild utility rebuilds all key files for the dbname database. Rebuilding key files is a two-step process. First, the utility reinitializes the file. Then it sequentially reads each record from each data file, recreating the key file from the record contents. This utility logs into the server and opens the dbname database in exclusive mode with no transactions ("xn").

The keybuild utility can be used to recreate the key files when dbcheck reports a database inconsistency. The keybuild utility can also construct new key files after you have added or removed key attributes from fields in your database schema. For example, if you make an existing key field a non-key field and change a non-key field to a key field in the schema, you can run keybuild to rebuild the key files for the new schema. The utility can also be used to reassign key fields to different key files.

2.00_97.09 Copyright © 1992-1997 Raima Corp.

7) rdsadm.exe - Command line administration utility

Command Syntax
rdsadm
or
rdsadms

Command Options
None

Description
The rdsadm utility is an administration utility to use as an alternative to admin on a DOS, OS/2, or UNIX platform. This utility basically provides the same functions as admin, but for a non-Windows environment. The functions are accessible from a simple user interface consisting of several menus.

2.00_97.09 Copyright © 1992-1997 Raima Corp

8) vping.exe - Velocis testing utility

Command Syntax
vping servername

Command Options
servername Specifies the name of the server to test.


Description
The vping utility determines if the specified server is "listening" on the network by issuing a "ping". When you run vping without any command options, it lists the names of all Velocis servers (that is, servers with "rds" aliases).

2.00_97.09 Copyright © 1992-1997 Raima Corp.
 
One other question on this subject.

CA recommend running DBCHECK once every week and DBFIX every two weeks.
Since they both take ages to run, why not just run DBFIX as it does the checking anyway?
In other words, what's the point of running DBCHECK when you need to run DBFIX anyway to fix any problems.

Any ideas on this?
[idea]
 
If the database is of substantial size (>1GB), then use SQL Server. You have the full suite of SQL tools to work with, and most maintenance jobs do not require stopping services.

And did I mention it's considerably more stable?
 
I saw this message for searching for batch operation of ArcServe for NT, can someone tell me is there a command line interface to a restore command ?
 
I've also had problems in ArcServe 2000 with the VLDB being unstable and too big. I'v had limited success running the recommended utilities.

I am trying to convert VLDB to a SQL DB on a remote server. I cannot find any detailed instructions on doing this. I run SETUPSQL in the Arcserve folder and supply the necessary login credentials. Everytime I get an error message saying that "SQL Server does not exist on "ServerName"".

My SQL Server is W2k, with SQL 7. I am able to make an ODBC connection from the ArcServe Server.

Anyone know what my problem is?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top