Skip Headers

Oracle9i Lite Developer's Guide for Windows 32
Release 5.0.2
Part No. A97672-01
Go To Table Of Contents
Contents
Go To Index
Index

Previous Next

C
Database Tools and Utilities

This document describes how to use the following database utilities. The utility names are listed in alphabetical order in Table C-1:

Table C-1 Tools and Utilities

Utility Description
Support for Linguistic Sort   Allows databases to be created with linguistic sort capability enabled.
CREATEDB   Use this to create Oracle Lite databases.
DECRYPDB   Use this to decrypt your Oracle Lite database.
dropjava This is a command-line utility you can use to remove Java classes from the Oracle Lite database. See the Oracle9i Lite Developer's Guide for Java for more information.
ENCRYPDB   Use this to encrypt your Oracle Lite database.
loadjava This is a command-line utility you can use to load a Java class into Oracle Lite. See the Oracle9i Lite Developer's Guide for Java for more information.
MIGRATE   Use this to migrate to Oracle Lite from a previous release.
Mobile SQL   Mobile SQL is a command line interface that allows you to connect to Oracle Lite databases.
ODBC Administrator and the Oracle Lite ODBC Driver   Use this to manage ODBC connections by creating data source names (DSNs) that associate the Oracle Lite ODBC Driver with the Oracle Lite database that you want to access through the driver.
ODBINFO   Use this utility to find out the version number and volume ID of an Oracle Lite database.
OLLOAD   Use this command-line tool to load data from an external file into a table in an Oracle Lite database, or to unload (dump) data from a table in an Oracle Lite database to an external file.
REMOVEDB   Use this to remove Oracle Lite databases.
VALIDATEDB   Use this to validate the structure of an Oracle Lite database.

C.1 Support for Linguistic Sort

Linguistic sort is a new feature for the "ASCII" version of the Oracle Lite database. It produces culturally acceptable order of strings for a specified language or collation sequence. The "ASCII" version supports several code pages defined by single-byte 8-bit encoding schemes. Each of these code pages is a super set of 7-bit ASCII, and the additional accented characters necessary to support a group of European languages are included in the upper 128 bytes. A new string comparison mechanism is provided that produces strings in a linguistically correct order by mapping each collation element of a string to the corresponding 8-bit value of the supported code page.

C.1.1 Creating Linguistic Sort Enabled Databases

The linguistic sort capability must be enabled when the database is created using the CREATEDB command line utility with the <collation sequence> enabled.

The behavior of the ORDER_BY clause and the WHERE condition are determined by how the NLS_SORT parameter is implemented. Binary sorting is the default setting, and is used unless the collation_sequence parameter is set to use the linguistic sort ordering rules.

Unicode and NLSRT are not supported in the current version of the Oracle Lite database. Therefore NCHAR data type and customization of collation sequence are not yet available. See Section A.2.7 for information on how collation sequences are enabled using polite.ini.

C.1.2 How Collation Works

Collation refers to ordering of strings into a culturally acceptable sequence. A collation sequence is a sequence of all collation elements from an alphabet from smallest collation order to the largest. Once a collation sequence is given, orders of all strings from the same alphabet are fixed. As such, the collation sequence encodes the linguistic requirements on collation. A collation element is the smallest sub-string that can be used by the comparison function to determine the order of two strings.

C.1.3 Collation Element Examples

Normally, a collation element is just one character. In binary sorting, only one property, the code value that represents a character, is used. But in linguistic sorting, usually three properties. The primary level of difference is the base character. The secondary level of difference is for diacritical marks on a given base character. The tertiary level of difference is for the case of a given character. Punctuation can function as a fourth level of difference, but comparisons for punctuation occur last and are made at the binary rather than the linguistic level. These are used for each collation element. The following sections contain examples that demonstrate sorting priorities.

C.1.3.1 Sorting of Normal Characters

Example 1: 'a' < 'b'. There is a primary difference between them on the character level.

Example 2: 'À' > 'a'. This difference occurs on the secondary level. Note that 'À' and 'a' are considered "equal" on the primary level.

Example 3: 'À' < 'à' in FRENCH but 'À' > 'à' in GERMAN. This difference on the tertiary level. Note that 'À' and 'à' are considered being "equal" on the primary and secondary level. Also note that the case convention may be different for different language.

Example 4: 'às' < 'at'. This is a difference on the primary level. This example shows the role of difference levels: the lower level differences are ignored if there is a primary level difference anywhere in the strings.

Example 5: '+data' < '-data' < 'data' < 'data-'. If strings are compared and present no difference on the primary, secondary, or tertiary levels, they are compared for punctuation.

C.1.3.2 Reverse Sorting of French Accents

Some languages, particularly French, require words to be ordered on the secondary level according to the last accent difference. This behavior is known as French secondary sorting or French accent ordering. Example 6: 'côte' < 'coté' in FRENCH but 'coté' < 'côte' in GERMAN. Note that the secondary difference of 'e' and 'é' occurred later than those of 'ô' and 'o'.

C.1.3.3 Sorting of Contracting Characters

There are some special cases where two or more characters in a group can function as a single collation element. These types of collation elements are called'contracting characters' or 'group characters'. In these cases each of these characters properties are assigned appropriate values.Example 7: 'h' < 'ch' < 'i' in XCZECH. Here 'ch' is assigned a primary property value which differentiates it from 'h' and 'i', such that 'h' < 'ch' < 'i'. Note that 'ch' is treated as a single character.

C.1.3.4 Sorting of Expanding Characters

If a letter sorts as if it were a sequence of more than one letter, it is called an 'expanding character'. For example, in German the sharp s (ß) is treated as if it were a string of two characters 'ss' when comparing with other letters.

C.1.3.5 Sorting of Numeric Characters

Only sorting of single digit characters from '0' to '9' is currently supported. For the supported European languages a digit character is always sorted as greater than any alphabetic character. For other languages this may be not the same. Other numeric characters such as Roman numeric characters and counting sequences, such as "one", "two", "three", are not supported at this time.Example8: '1' > 'z' in any European language, '1' < 'a' in LATVIAN. Note that this difference occurs on the primary level.

C.2 CREATEDB


Description

Utility for creating a database.


Syntax
CREATEDB DataSourceName DatabaseName [[[VolID] DATABASE_SIZE] EXTENT_SIZE] [collation sequence]

Key Words and Parameters
DataSourceName

Data source name, used to look up the ODBC.INI file for the default database directory.


Note:

If you specify an invalid DSN, Oracle Lite ignores the DSN and creates the database in the current directory. To access this database through ODBC, you must create a DSN for the database that points to the directory in which the database resides. See Section C.7.1, "Adding a DSN Using the ODBC Administrator" for instructions on adding a DSN.

DatabaseName

Name of the database to be created. It can be a full path name or just the database name. If only the database name is given, the database is created under the Data Directory for the data source name specified in the ODBC.INI file. The extension for the database name must always be .ODB. If a name without the .ODB is given, the .ODB is appended.

VolID

When specified, the VolID is used as the database ID, instead of the database ID from the POLITE.INI file. The ID must be unique for each database.

DATABASE_SIZE

The database size in bytes.

EXTENT_SIZE

An incremental amount of pages in a database file. When a database runs out of pages in the current file, it extends the file by this number of pages.

collation sequence

This parameter is a string constant which creates the database as enabled for linguistic sorting when a value other than the default is used. A collation sequence specified here overrides a collation sequence set using the NLS_SORT [collation sequence] parameter in the polite.ini file. The string can also be one of the options listed in Table C-2:

Table C-2 Collation Sequence Values

Collation Sequence Description
BINARY Default. Two strings are compared character by character and the characters are compared using their binary code value.
FRENCH Two strings are compared according to the collation sequence of French. Supported by ISO 8859-1 or IBM-1252.
GERMAN Two strings are compared according to the collation sequence of German. Supported by ISO 8859-1 or IBM-1252.
CZECH Two strings are compared according to the collation sequence of Czech. Supported by ISO 8859-2 or IBM-1250.
XCZECH Two strings are compared according to the collation sequence of Xczech. Supported by ISO 8859-2 or IBM-1250.

Note:

There is no way to alter a collation sequence after the database is created.


Examples
createdb polite db1

createdb polite c:\testdir\db2.odb 300

createdb polite polite french

C.3 DECRYPDB


Description

This tool allows you to decrypt an encrypted Oracle Lite database. See Section C.4, "ENCRYPDB" for more information.


Syntax
DECRYPDB DSN | NONE DBName [Password]

Key Words and Parameters
DSN

Data source name of the Oracle Lite database that you want to decrypt. If you specify NONE, DBName has to be entered with the full path name (without the .ODB extension).

DBName

Name of the database to be decrypted. If DSN was specified as NONE, DBName must be entered with the full path name.

Password

Optional. The password used previously to encrypt the Oracle Lite database. If you do not enter the password, DECRYPDB prompts you to enter it.


Comments

An Oracle Lite database cannot be decrypted if there is any open connection to the database.

If you call this utility from another program, the possible values returned are listed in Table C-3:

Table C-3 DECRYPDB Return Codes

Return Code Description
EXIT_SUCCESS Success.
EXIT_USAGE Command line arguments are not properly used or are in error.
EXIT_PATH_TOO_LONG Path is too long.
EXIT_SYSCALL I/O error while making new decrypted copy on disk.
EXIT_BAD_PASSWD Incorrect password supplied.

See the comments in Section C.4, "ENCRYPDB" for more information.

C.4 ENCRYPDB


Description

This tool allows you to encrypt an Oracle Lite database with a password and to change a database password. The password prevents unauthorized access to the database and encrypts the database, so that the data stored in the database files cannot be interpreted. See Section C.3, "DECRYPDB" for more information.

ENCRYPDB uses CAST5 encryption, which is a 128-bit, DES compliant encryption scheme.


Syntax
ENCRYPDB DSN | NONE DBName [New_Password [Old_Password]]

Key Words and Parameters
DSN

Data source name of the Oracle Lite database that you want to encrypt. If you specify NONE, DBName must be a fully qualified database name with the full path name (without the .ODB extension). If dsn is a value other than NONE, then the name must appear as a data source name in the ODBC.INI file.

DBName

Name of the database to be encrypted. If DSN was specified as NONE, DBName must be entered with the full path name.

New_Password and Old_Password

Optional, the password (or previously used password) for encrypting the database. This password can be 128 characters in length. If you do not enter a password, ENCRYPDB prompts you to enter one. Since both passwords are optional in the command line to invoke the utility, the command line could have three different forms:


Comments

If you call this utility from another program, the possible values returned are listed in Table C-4:

Table C-4 ENCRYPDB Return Codes

Return Code Description
EXIT_SUCCESS Success.
EXIT_USAGE Command line arguments are not properly used or are in error.
EXIT_PATH_TOO_LONG Path is too long.
EXIT_SYSCALL I/O error while making new encrypted copy on disk.
EXIT_BAD_PASSWD Incorrect password supplied.

The default Oracle Lite database (POLITE.ODB) is not encrypted. After encrypting an Oracle Lite database every user that attempts to establish a connection to the encrypted Oracle Lite database must provide the valid password. If the password is not provided, Oracle Lite returns an error. An Oracle Lite database cannot be encrypted if there are any open connections to the database.

You should consider the following when encrypting and decrypting Oracle Lite databases:

C.4.1 Synchronizing with an Encrypted Oracle Lite Database

These steps are required to synchronize with an encrypted Oracle Lite database:

  1. Retrieve the user password from the Mobile Server Repository.

  2. Convert the password into uppercase. For example, change "manager" into "MANAGER".

  3. Launch Mobile Sync (msync.exe) and execute a sync. Provide username, password and Mobile Server URL. Select Apply and then select Sync. This creates an non-encrypted Oracle Lite database.

  4. Encrypt the Oracle Lite database using ENCRYPDB utility using the converted uppercase password, for example MANAGER.

  5. Continue to synchronize.

C.5 MIGRATE


Description

Utility for migrating a database from a previous version of Oracle Lite to this release. The utility migrates your Oracle Lite 3.6 database and makes a backup copy with a .36 extension. If you have an earlier release of Oracle Lite, see the Oracle9i Lite Installation and Configuration Guide for Windows NT/2000/XP for more information.

Before you use this utility, you must install the current release of Oracle Lite. Also, if your database is encrypted, you must first decrypt it before using this utility.


Syntax
MIGRATE DSN DBName

where DBName can be the database name, or the database path and name.


Key Words and Parameters
DSN

Data source name of the database to migrate. This is used to look up the default database directory in the ODBC.INI file for the database name given in DBName. If the DSN has the value NONE the DBName should be a complete pathname of the database file.

DBName

The database name, or the path and database name, to migrate. If only the database name is specified, the database file must exist in the directory specified in the DataDirectory parameter (under the data source name) in the ODBC.INI file.


Comments

As mentioned in this section, you must install Oracle Lite before you use this utility.

Any messages generated by the MIGRATE utility are displayed on the screen in the command window.

Using this utility allows you to compress empty space in your existing Oracle Lite database.

This utility does not support the migration of java stored procedures.


Examples
MIGRATE polite db1

MIGRATE none c:\testdir\db1.odb

C.6 Mobile SQL

Mobile SQL is an application that runs as a command line interface. It allows the user to execute SQL statements against the local database. It is both a developers tool and a code example. It allows users to access functionality provided by the ODBC and Oracle Lite OKAPI interfaces of the underlying Oracle Lite database engine.

C.6.1 Database Access

Mobile SQL accesses the database through both the ODBC and OKAPI interface. Most functions are performed through ODBC, but functions that ODBC cannot handle are implemented using OKAPI function calls.

C.6.2 Starting Mobile SQL

Mobile SQL is started by opening the Oracle_Home\Mobile\SDK\Bin directory and double-clicking on the msql.exe file. This starts the command-line interface which accepts standard SQL commands. For more information see the Oracle9i Lite SQL Reference.

C.7 ODBC Administrator and the Oracle Lite ODBC Driver

A data source name (DSN) associates the Oracle Lite ODBC Driver with the Oracle Lite database that you want to access through the driver. The Oracle Lite installation process creates a default DSN, POLITE, for the Oracle Lite database. You can also create additional DSNs for the additional Oracle Lite databases you create.

Microsoft provides the ODBC Administrator, a tool for managing the ODBC.INI file and associated registry entries in Windows 98/NT/2000/XP. The ODBC.INI file and the Windows registry store the DSN entries captured through the ODBC Administrator. Using the ODBC Administrator, you can relate a DSN to the Oracle Lite ODBC Driver.


Note:

This document does not provide instructions on using the ODBC Administrator. See its online help for this information.

In the ODBC Administrator, in addition to the DSN, you specify the parameters listed in Table C-5:

Table C-5 ODBC Administrator DSN Parameters

DSN Parameter Description
Data Description An optional description for the data source.
Database Directory The path to the data directory where the database resides. This is an existing path.
Database Name of the Oracle Lite database to be created. Do not include the .ODB extension.
Default Isolation Level Determines the degree to which operations in different transactions are visible to each other. See Section 2.6.3, "Isolation" in Chapter 1, " Overview", for more information on the supported isolation levels. The default level is "Read Committed."
Autocommit Commits every database update operation in a transaction when that operation is performed. Autocommit values are Off and On. The default value is Off.
Default Cursor Type
  • Forward Only: Default. A non-scrollable cursor which only moves forward but not backward through the result set. As a result, the cursor cannot go back to previously fetched rows.
  • Dynamic: Capable of detecting changes to the membership, order, or values of a result set after the cursor is opened. If a dynamic cursor fetches rows that are subsequently deleted or updated by another application, it detects those changes when it refetches those rows.

  • Keyset Driven: Does not detect change to the membership or order of a result set, but detects changes to the values of rows in the result set.

  • Static: Does not detect changes to the membership, order or values of a result set after the cursor is opened. If a static cursor fetches a row that is subsequently updated by another application, it does not detect the changes even if it refetches the row.

For example, the DSN entry for POLITE in the ODBC.INI file may contain:

[POLITE]

Description=Oracle Lite Data Source

DataDirectory=C:\ORANT\OLDB40

Database=POLITE

IsolationLevel=Repeatable Read

CursorType=Dynamic

C.7.1 Adding a DSN Using the ODBC Administrator

To add a DSN using the ODBC Administrator:

  1. Start the ODBC Administrator, either by selecting its icon in the Oracle 9i Lite program group, or by typing the following at a DOS prompt:

    C:\>ODBCAD32 
    
    
  2. Click Add.

  3. Double-click the Oracle Lite nn ODBC Driver (nn is the release number) from the list of Installed ODBC Drivers.

  4. Next, add the DSN name and define the parameters in the ODBC driver setup dialog box. Refer to the preceding table for help in defining the parameters.

C.7.2 Adding a DSN which Points to Read-Only Media (CD-ROM)

  1. Create the DSN as explained in Section C.7.1, "Adding a DSN Using the ODBC Administrator".

  2. Add the following line to the new DSN in the ODBC.INI file:

    ReadOnly = TRUE
    

    Note:

    You can define a DSN which points to a file on a CD-ROM. Simply point the DSN to the CD-ROM drive and directory and provide the file name of the database file. Then modify the ODBC.INI file to add the line "ReadOnly = TRUE" to the data source definition. ODBC programmers can call the following before opening the database to enable this feature (instead of adding the line to the ODBC.INI file):
    SQLSetConnectOption( hdbc, SQL_ACCESS_MODE, SQL_MODE_READ_ONLY )
    

    Setting a database file to read-only suppresses the creation of log files. Updates, insertions, deletions, or commits appear to work on the in-memory image of tables. However, when you commit, these changes are not written to the database file. If you exit your application, reconnect, and issue your query, you see your original data.


C.8 ODBINFO


Description

You can use ODBINFO to find out the version number and volume ID of an Oracle Lite database. ODBINFO can also display and set several parameters.


Syntax

To display current information without making any changes use the syntax:

odbinfo [-p passwd] DSN DBName 

You can also use:

odbinfo [-p passwd] NONE dbpath\dbname.odb

For example:

odbinfo -p tiger polite polite

odbinfo NONE c:\orant\oldb40\polite.odb

If your database is encrypted you need to include the password.


Parameters

To set or clear parameters, use one or more "+" or "-" parameter arguments before the DSN or NONE. For example:

odbinfo +reuseoid -pagelog -fsync polite polite

You can use the parameters listed in Table C-6 with the ODBINFO utility:

Table C-6 ODBINFO Parameters

Parameter Description
pagelog By default, a commit backs up modified database pages to filename.plg before actually writing the changes to filename.ODB. If an application or the operating system experiences a failure during a commit, the transaction is cleanly rolled back during the next connect. If -pagelog is specified, no backup is created and the database can become corrupted if a failure occurs.
fsync Oracle Lite generally forces the operating system to write all the modified buffers associated with the database back to disk during a commit. If this option is disabled (-fsync), the operating system can keep the changes in memory until a later time. If the system (but not the application) crashes before the buffers are flushed, the database can become corrupted.

Using odbinfo -fsync -pagelog improves the performance of applications that use many small transactions (with autocommit on) or ones with massive updates. However, if the database is corrupted, there is no straightforward way to repair it or recover the data. Therefore these two options should only be cleared during initial loading of the database, if (1) the .ODB file is backed up on regular basis, or (2) the data in the database can be recovered from some other source.

Using this option has no effect on applications that seldom update the database. Setting the transaction isolation level to SINGLE USER has more impact in this case.

reuseoid By default, Oracle Lite does not reuse the ROWID of any row that exists in a table until the table is dropped. The "Slot Deleted" error is returned when accessing a deleted object. This uses two bytes of storage for each deleted object, causing performance and disk space usage to degrade over time if rows are constantly inserted and deleted.

If you use odbinfo +reuseoid, new rows can reuse ROWIDs of previously deleted rows. However, this may not free all the space in a table that already has many deleted objects. For best results, you should set this option immediately after you create your database.

This option is safe for pure relational applications. However, SQL applications that use ROWID and OKAPI applications that use direct pointers between objects need to verify that all references to an object are set to NULL before the object is deleted. Otherwise, dangling references may eventually point to some other, unrelated object.

compress This option (which is "on" by default) enables run-length compression of objects. Run-length compression takes very little CPU time, so you should only deselect (-compress) this option if:
  • Operating system-level file compression is used, such as DriveSpace or a NTFS compressed attribute. In this case not compressing the same data twice provides a better compression ratio.

  • Most objects in the database are frequently updated to a highly compressible state (for example, all columns set to NULL), and the data cannot be compressed well (such as binary columns with random data). In these cases, using this option (+compress) can result in highly fragmented tables.

Changing this option does not compress or decompress any existing objects in the database.

C.9 OLLOAD

For information on the Oracle Lite Load Utility APIs, see Appendix E, " Oracle Lite Loading Utility API".


Description

This command-line tool allows you to load data from an external file into a table in an Oracle Lite database, or to unload (dump) data from a table in an Oracle Lite database to an external file. Unlike SQL*Loader, OLLOAD does not use a control file you supply all data parameters and format information on the command line.

When loading data, OLLOAD takes an input file that contains one record per line with a separator character between fields. The default field separator is a comma (,). The records can also include fields with values that are quoted strings. The default is a single quote ('). See "Comments" for more information on data parsing.


Syntax

To load a datafile:

olload [options] -load dbpath tbl [col1 col2 ...] [<datafile]

To unload (dump) to an outfile:

olload [options] -dump dbpath tbl [col1 col2 ...] [>outfile]


Key Words and Parameters
[options]

See "Options" for a list of options.

-load

To use the load utility.

-dump

To use the unload (dump) utility.

dbpath

The path to the Oracle Lite database file (.ODB file).

tbl

The table name. OLLOAD first attempts to find a table name in the user-specified case. If this fails, it searches for the uppercase of the user-specified name.


Note:

The default user is "SYSTEM". If you want to specify an OLLOAD operation for another user name's tables, prefix the tbl parameter with the user name and a dot (.).

col1 col2

The column name(s). OLLOAD first attempts to find a column name in the user-specified case. If this fails, it searches for the uppercase of the user-specified name.

[datafile] [outfile]

The source or destination file for the load or unload (dump) operations. If you do not specify a datafile or outfile, OLLOAD displays the output on the screen.


Options
-sep character

The field separator. If you do not specify this option, OLLOAD assumes that the separator character is a comma (,).

-quote character

The quote character. If you do not specify this option, OLLOAD assumes that the quote character is a single quote (').

-file filename

Use this option when loading and unloading data to specify the source or destination file name. When loading data, filename specifies the source file to load into the Oracle Lite database. When unloading (dumping) data, it is the destination file for the unloaded data.


Important:

To unload data from the Oracle Lite database and load (or pipe) it to another Oracle Lite database, do not specify a file name for this option. See the second example in "Examples" for sample syntax.

-log logfile

Specify this option if you want to produce a log file listing rows that OLLOAD could not insert during load. If you do not specify a log file, loading stops at the first error.

-passwd passwd

The connection password for an encrypted database. You need to supply this password so that loading and unloading can occur.

-nosingle

Specify this option when you do not want to use single user mode. This degrades performance but allows other connections to the database.

-readonly

Specify this option when unloading data from a read-only Oracle Lite database, for example, one located on a CD-ROM.

-commit count

Use this option if you want OLLOAD to commit after processing a specified number of rows. The default is 10000. OLLOAD prints an asterisk (*) to the screen each time it commits the specified number of rows. To disable the commit operation specify 0.

-mark count

Use this option if you want OLLOAD to print a dot on the screen after processing the specified number of records. The default is 1000. To disable this feature specify 0.


Comments
Data Parsing

Table C-7 shows examples for OLLOAD data parsing:

Table C-7 Data Parsing Examples

Input Data Explanation
'Redwood Shores, CA' Redwood Shores, CA Enclosing the input string in quotes preserves spaces and punctuation within the string.
'O''Brien' O'Brien Represent a single quote with its escape sequence, two single quotes.
fire fly firefly Spaces in data that is not quoted are ignored
, NULL,NULL Empty fields are NULL.
1,,3, 1,NULL,3,NULL Empty fields are NULL.
  [no row inserted] Completely empty lines are ignored.

If there are more values than database columns, extra values are ignored. Any missing values at the end of the line are set to NULL.

OLLOAD Utility Restrictions

OLLOAD does not support tab-delimited input files and LONG datatypes.


Examples
olload -quote \" -file p_kakaku.csv -load c:\orant\oldb40\polite.odb skkm01


olload -dump c:\orant\oldb40\polite.odb emp empno ename | olload -load myfile.odb myemp

C.10 REMOVEDB


Description

Utility for deleting a database.


Syntax
REMOVEDB DataSourceName DatabaseName

Key Words and Parameters
DataSourceName

Data source name of the database you want to remove. The DSN can be a dummy argument such as none, in which case the database name must be a fully qualified filename.

DatabaseName

The name of the database to delete. It can be a full path name or just the database name. If only the database name is given, the database is deleted from the Data Directory for the data source name specified in the ODBC.INI file.


Examples
removedb polite db1

removedb none c:\testdir\db2.odb

C.11 VALIDATEDB


Description

This commmand-line tool validates the structures within the database file and if the database structure is found to be corrupted, lists the errors found in a file designated by the user. The tool checks the following:


Syntax
validatedb DSName DBName [-p password] [-t schemaname.tablename] -file outputfilename


Key Words and Parameters
DSName

The data source name. This can also be NONE if no DSN is present

DBName

If there is a DSN present, this is the database file name (without the .odb extension) if it is different from the default filename for the DSN. If there is no DSN, then VALIDATEDB uses the current directory unless the full path is specified. If there is a log file in the same directory as the database file, it is also validated.

password

Password for an encrypted database.

schemaname

Optional schema name. The default schema name is used unless this is specified.

tablename

Optional table name. The specified table is validated along with all of its indexes. If no table name is specified, the entire database is validated.

outputfilename

Optional filename for the text file where all errors and other related information revealed by VALIDATEDB are saved. The default is stdout.


Examples
validatedb polite polite -t emp -file out.txt


Previous Next
Oracle Logo
Copyright © 2002 Oracle Corporation

All rights reserved
Go To Table Of Contents
Contents
Go To Index
Index