User guide
5-17
Cisco Media Gateway Manager 5.0 User Guide
OL-5461-02
Chapter 5 Maintaining an Efficient Network
How Do I Manage the Database?
Step 3 On the command line, enter the following command:
sqlplus ctmanager/mgm123!
The message “Connected to: Oracle9i...” and the SQL> prompt should appear. If not, enter the username
and password again.
Step 4 Enter any SQL command supported by Oracle upon connection to SQL*PLUS. For a list of SQL
commands supported by Oracle, refer to the SQL*PLUS User Guide.
5.1.6 Basic SQL Commands for Cisco MGM Schema Objects
Table 5-7 lists commands that display, update, or modify Cisco MGM schema objects. Run each
command in SQL*PLUS by entering the command at the SQL> prompt.
Table 5-7 SQL Commands for Cisco MGM Schema Objects
SQL Command Description
select
table_name
from
user_tables;
Returns a list of all table names owned by the mgmanager
user.
select
view_name
from user_views;
Returns a list of all views owned by the Cisco MGM user.
describe
table_name;
Takes a table_name as a parameter (valid table names are
those returned by the previous two commands) and lists the
name, type, and size of columns in the table.
describe
view_name;
Takes a view_name as a parameter (valid view names are
those returned by the previous two commands) and lists the
name, type, and size of columns in the view.
select
col1, col2… coln
from
table_name;
Takes col1….coln and table_name as parameters and
displays data for all the columns listed. To display data for
all columns, use an asterisk (*) instead of col1, col2, and so
on.
select
col1, col2... coln
from
table_name
where
col1 = value1
and
col2 = value2...
Takes col1...coln and table_name as parameters and
displays data for all the columns listed that meet the
condition specified in the “where” clause. For example, the
command:
select nedbaccessid from ne_info_table where
nesysid = 'ANGEL';
returns the value of column nedbaccessid from table
ne_info_table for all rows for which nesysid = ANGEL.
select
col1, col2... coln
from
view_name
where
col1 = value1
and
col2 = value2...
Takes col1...coln and view_name as parameters and
displays data for all the columns listed that meet the
condition specified in the “where” clause.
delete
table_name
;
Takes table_name as a parameter and deletes the entire
contents of the table. To make the change permanent, enter
commit; at the SQL> prompt.