Displays information about the specified database.
dbinfo [ options ]
Option | Description |
---|---|
@data |
Reads in options from the specified environment variable or configuration file. See Using configuration files. If you want to protect passwords or other information in the configuration file, you can use the File Hiding utility to obfuscate the contents of the configuration file. See File Hiding utility (dbfhide). |
-c "keyword=value; ..." |
Specifies connection parameters. See Connection parameters. Any valid user ID can run the Information utility, but to obtain page usage statistics you need DBA authority. |
-o filename | Writes output messages to the named file. |
-q | Runs in quiet mode—messages are not displayed. |
-u |
Displays information about the usage and size of all tables, including system and user-defined tables and materialized views. You can only request page usage statistics if no other users are connected to the database and you have DBA authority. The page usage information is obtained using the sa_table_page_usage system procedure. |
The dbinfo utility displays information about a database. It reports the name of the database file, the name of any transaction log file or log mirror, the page size, the collation name and label, whether table encryption is enabled, and other information. Optionally, it can also provide table usage statistics and details.
You can use the dbinfo utility to determine the size of a table on disk. To do so, run a command similar to the following:
dbinfo -u -c "UID=DBA;PWD=sql;DBF=sample-dir\demo.db" |
The result shows you how many pages are used to hold the data in each table in your database (Pages), and the percentage used of those pages (%used). For any table, you can then multiply the number of pages by the database page size, and then multiply that by %used to determine the amount of space is being used for your table.
You can also get more information about a database by:
querying individual database properties using the DB_PROPERTY system function. See DB_PROPERTY function [System].
querying all database properties using the sa_db_properties system procedure. See sa_db_properties system procedure.
using the -pd option with the Ping utility (dbping). When you specify -pd, dbping returns the value for each database property that is specified. See Ping utility (dbping).
Exit codes are 0 (success) or non-zero (failure).
For more information about exit codes, see Software component exit codes.
Discuss this page in DocCommentXchange.
|
Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |