tbboot - Starts the Tibero instance.
Syntax:
tbboot [options]
Example:
tbboot
(Starts the database with default parameters)
A comprehensive cheat sheet for Tibero Command-Line Interface (CLI), covering essential commands for database administration, SQL execution, and system management.
tbboot - Starts the Tibero instance. Syntax: Example: |
tbboot -d - Starts a specific database. Example: |
Tips:
|
tbdown - Shuts down the Tibero instance. Syntax: Example: |
tbdown normal - Performs a normal shutdown, waiting for all sessions to disconnect. Example: |
tbdown immediate - Performs an immediate shutdown, rolling back active transactions. Example: |
tbdown abort - Performs an abort shutdown, without any rollback or cleanup (use with caution). Example: |
Tips:
|
Error: TBM-00001: Unable to connect to the database. Solution: Verify that the database instance is running and the TB_SID environment variable is correctly set. |
Error: TBM-00002: Insufficient privileges. Solution: Ensure you are connecting with a user that has the necessary privileges to start or stop the database. |
CREATE USER - Creates a new database user. Syntax: Example: |
Tips:
|
GRANT - Grants privileges to users. Syntax: Example: |
GRANT SELECT ON <table_name> TO ; - Grants SELECT privilege on a specific table. Example: |
REVOKE - Revokes privileges from users. Syntax: Example: |
DROP USER - Drops a database user. Syntax: Example: DROP USER CASCADE; - Drops a user and all objects owned by the user. Example: |
Caution: Using CASCADE will drop all objects owned by the user. Make sure this is the desired outcome before executing the command. |
CREATE TABLESPACE - Creates a new tablespace. Syntax: Example: |
Tips:
|
ALTER TABLESPACE - Alters an existing tablespace. Syntax: Example: |
ALTER TABLESPACE <tablespace_name> RESIZE DATAFILE ‘<file_path>’ SIZE ; - Resizes an existing datafile. Example: |
DROP TABLESPACE - Drops a tablespace. Syntax: Example: Caution: INCLUDING CONTENTS AND DATAFILES will delete all data and datafiles in the tablespace. Use with care. |
Shows the tablespace and their sizes. |
tbsql - Executes SQL statements interactively. Syntax: Example: |
@<file_path> - Executes SQL statements from a file. Example: |
Tips:
|
PL/SQL Blocks - Can be executed directly within Example:
|
SHOW ERRORS - Shows errors for the last compiled PL/SQL object. Example: |
SET SERVEROUTPUT ON - Enables output from DBMS_OUTPUT. Example: |
DESCRIBE <table_name> - Describes the structure of a table. Example: |