Home > Oracle > 11g notes

11g notes

1. Connect to the database as user SYSTEM.
2. Determine if the instance is part of an RAC database: select parallel from v$instance; This will return NO if it is a single-instance database.
3. Determine if the database is protected against data loss by a standby database: select protection_level from v$database; This will return UNPROTECTED if the database is indeed unprotected.
4. Determine if Streams has been configured in the database: select * from dba_streams_administrator; This will return no rows, if Streams has never been configured.

1. Connect to the database as user SYSTEM.
2. Determine what processes are running, and how many of each:
select program from v$session order by program;
select program from v$process order by program;

From sqlplus command, type “host” to access command line from OS level.

Using dynamic listener registration:
SQL> alter system set local_listener=list2;
SQL> alter system register;

To see all the lsnrctl commands, use the HELP command:
C:\>lsnrctl help
LSNRCTL for 32-bit Windows: Version – Beta on 26-NOV-2007 17:47:16 Copyright (c) 1991, 2006, Oracle. All rights reserved. The following operations are available An asterisk (*) denotes a modifier or extended command: start stop status services version reload save_config trace change_password quit exit set* show*
In summary, this commands are
■ START Start a listener.
■ STOP Stop a listener.
■ STATUS See the status of a listener.
■ SERVICES See the services a listener is offering (fuller information than status).
■ VERSION Show the version of a listener.
■ RELOAD Force a listener to reread its entry in listener.ora.
■ SAVE_CONFIG Write any changes made online to the listener.ora file.
■ TRACE Enable tracing of a listener’s activity.
■ CHANGE_PASSWORD Set a password for a listener’s administration.
■ QUIT Exit from the tool without saving changes to the listener.ora file.
■ EXIT Exit from the tool and save changes to the listener.ora file.
■ SET Set various options, such as tracing and timeouts.
■ SHOW Show options that have been set for a listener.

Creating a database link: create database link devscott connect to scott identified by tiger using ‘dev’;

Then update the development schema to match the production schema:
truncate table emp@devscott;
truncate table dept@devscott;
insert into dept@devscott select * from dept@prodscott;
insert into emp@devscott select * from emp@prodscott;

For setting location of tnsnames.ora if you have multiple Oracle Homes and only want to use one:

export TNS_ADMIN=/u01/oracle/net

Index Type Options
There are six commonly used options that can be applied when creating indexes:
■ Unique or non-unique
■ Reverse key
■ Compressed
■ Composite
■ Function based
■ Ascending or descending
All these six variations apply to B*Tree indexes, but only the last three can be
applied to bitmap indexes:

Categories: Oracle
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: