Parameters Word Documents
|
To update your account with multiple SAC codes: uk_metalink_uk@oracle.com
198160.1 - Summary of technical articles relating to LOBS OAS InstallationMulticasting - this is done to efficiently send data to anumber of machines on a network. It can also work by sending information between components on a single site. A range of IP addresses are reserved for multicasting. This range is between 224.0.0.0 to 224.0.0.255. Multicast Port Number is randomly generated by the installer. The installer keeps an OraInventory directory ot store install data, identified by /var/opt/oracle/oraInst.loc There is a utility called osasmcastcfg which can retrieve and +update multicast sessions.
The default boot port is on 2649. The boot port is the Web listener listens on port 80 by default and is called www
The multicast IP is randomly generated on the range given The format for connecting to the node manager is:     http://hostname.domain:port_number You have in effect 5 ports in action:
To bounce the cartridges:     owsctl stop -c all     owsctl reload -w all Step 1: Run the Script cataudit.sql or catnoaudit.sql to undo the tables The table that will get populated is SYS.AUD$ Step 2: Issue the audit command. e.g.
    audit delete any table by access whenever not successful; Step 3: Set the AUDIT_TRAIL parameter to 'TRUE' Step 4:
Remember to manage the sys.aud$ table by clearing out Sample Queries:
    select * from sys.dba_stmt_audit_opts;
TracingTo get an immediate trace file from an operation such asblowing up of the rollback sessions:     'immediate trace name ERRORSTACK level 10';
AccountsTo unlock an account:     ALTER USER username ACCOUNT UNLOCK;
Background ProcessesQMN - use for the Oracle Advanced Queuing (up to 10) RECO - for resolving pending transactions in a parallel server environment. SNPn - use when creating snapshots (up to 36)
Database Startup
Think of mounting the database as linking the
SGA
You can lock the SGA in real memory with the LOCK_SGA
You can set the start size of the SGA with:
DBLINKcreate public database link cimlink connect to read_only identified by read_only using 'cimlink'; The 'using' clause requires a valid TNSNAMES alias. Below is the extract from the tnsnames.ora file:
cimlink =
To drop a database link:
    drop public database link ;
mknod ./small.compresspipe p
uncompress -c
/warehse/NEXUS/PGAS2/PGAS2.dmp.Z> ./small.compresspipe &
(imp parfile=./import_pgas_small.par \
file=./small.compresspipe \
log=./small.log \
1>./small.out)
When you take a tablespace off-line it creates a deferred
You can drop a table in a read only tablespace!
Would datafiles for a read-only tablespace be updated with the current SCN? I would think not alter tablespace Datafile Extend alter database datafile '/p18/oradata/dc_p0/dcindex14_02.dbf'
nvl(o.name,n.name) name (If the first value is null,
2 null values in a column does not violate a unique index.
Think of bitmap indexing for large tables that are fairly
Btree indexes store the keyed data-values as well as the rowid.
If you think about the structure of a btree, a bitmap index it Bitmap indexes include nulls.
Although you can end up duplicating a great deal of
Rebuild
Alter index <> rebuild; Validate Structure
Alter index validate structure; (This will give you index_stats information) Sizing 5 elements: Header Size
Header Size: Fixed Header - 113 Bytes
Free Space: (block_size - block_header) - ((block size - block header ) * (pctfree / 100 ) ) Note: If you are dealing with a read only database the pctfree figure will 0. Combined Column Lengths Each column has an overhead of 1 byte if < 250 bytes. Else the overhead is 3 bytes. Rowsize = (sum of columns) + row header (3 * ( select type_size from v$type_size where component = 'UB1') ); Space used per row = max (ub1 * 3 + UB4 + SB2, rowsize ) + SB2) Create Index Example
IPCSTo see Oracle shared memory segments:     $ ipcs -bm | grep oracle To see which shared memory segments a database has allocated:     svrmgrl> oradebug ipc To remove a shared memory segment:     $ ipcrm <id> To list semaphores:     ipcs -sa
RollbacksSet transaction use rollback segment <>;
9i
Parameter: UNDO_MANAGEMENT = AUTO/MANUAL
undo_retention
Default = 900secs. If you want a flashback query, you must     alter system set undo_retention = 10
LocksOracle has 2 basic types of locks. A first come, first servered, unsophisticated lock called a latch. The other type is an enqueue lock. These are like objects, which can have attribute and state information associated with it.From the excellent Note: 102925.1 When access is required by a session, a lock structure is obtained and a request is made to acquire access to the resource at a specific level (mode)is made. The lock structure is placed on one of three linked lists which hang off of the resource, called the:
Types of Enqueue:
Setting ENQUEUE_RESOURCES: About estimating the number of enqueues required, there is no formula documented anywhere on this. Some have said number of tables + 40%, but we do also hold an enqueue for each datafile. Also, each lob column of a table would require 2 add'l enqueues: one for the lob data segment, and one for the lob index.
NT/2000oradim -new -sid jove -intpwd **** -startmode auto -pfile c:\oradata\ora81\dbs\initJOVE.ora oraenv# Locate "osh" and exec it if foundULIMIT=`LANG=C ulimit 2>/dev/null` if [ $? = 0 -a "$ULIMIT" != "unlimited" ] ; then if [ "$ULIMIT" -lt 2113674 ] ; then if [ -f $ORACLE_HOME/bin/osh ] ; then exec $ORACLE_HOME/bin/osh else for D in `echo $PATH | tr : " "` do if [ -f $D/osh ] ; then exec $D/osh fi done fi fi fi
ParametersSetting traces files to be viewable by public:     _trace_files_public = true
Procedures#!/bin/ksh
Security Cerberos - a central security management system If you have multiple dba's get them to use their Use a separate admin account, in the dba group ORAPWD$ orpwd file=/p01/app/oracle/product/816/dbs/orapwBRSTEST password=Dropping a UserDropping a user cascade does not get rid of Public SynonymsAlter system kill session '<sid>,<serial>'
PrivilegesRevoking object grants cascades. System grants don’t. IMP_FULL_DATABASE is a powerful role. Create any table. Can you specify a column level privlege to a role? 2 Types: DISK - Heavy IO. Order of magnitude slower than memory sorts.. MEMORY - Quickest TEMPORARY_TABLESPACE - These are done in a user's If a sort exceeds SORT_AREA_SIZE it will require a Short of Memory SORT_AREA_RETAINED_SIZE - The idea behind it is Tons of Memory - Big Jobs SORT_DIRECT_WRITES - If set to TRUE, each sort To enable this you must make the SORT_AREA_SIZE 10 SORT_BUFFER_SIZE - Set as 32768 bytes - increase to 65536 to improve speed SORT_WRITE_BUFFERS - Default is 2 - set up to 8 to SORT_READ_FAC - Set at 20 - Number of blocks read from disk in a single operation for a sort. Set larger for larger sorts. SORT_SPACEMAP_SIZE - Used for generating a disk map used to map disk areas
Query Select name,value from v$sysstat where name like '%sort%';
SQL TOOLS
Define_editor=vi To select a ' character: select '''' from dual; To echo the sql command before it is run: set echo on To Split a heading across lines: col s for a1 head 'S|T'
To Split a heading across lines:
To find duplicate keys from a table tx:
    select key, count(key) no_of_duplicates To remove duplicates from table tx when IT DOES NOT MATTER WHICH ONE IS SAVED:
    delete from tx How to show the time difference between two date columns?
select floor((date1-date2)*24*60*60)/3600) || ' HOURS ' || To Display a Long field:
    set long 4000 set serverout on begin dbms_output.enable(99999); for i in 9..256 loop dbms_output.put_line(to_char(i)||' ('||chr(i)||')'); end loop; end;
Global Name    alter database rename global_name to TST1;
Queries as tables
    select
SqlnetDead Connection Detection To setup dead connect detection enter the following:     sqlnet.expire_time = 10 It may take longer than you think for sessions to be cleared up. This is because TCP itself will try and resend the server probe to the client. This is setup in:     /usr/include/netinet/tcp_timer.h
Tables
When creating a table you can use the CACHE clause to
Place columns that are likely to have nulls last in the
If you define a column as LONG then Oracle will store this
You can add tables to the data dictionary - not that
Truncate
On truncate 'DROP STORAGE' or
Analyze
When you run an analyze the shared pool is flushed - this
Clusters
For clusters the storage parameters apply to all tables
Hash Cluster
A hash cluster, which uses a hashing algorithm to access
PGAYou affect the size of the PGA via settings:
OPEN_LINKS
ExceptionsALTER TABLE X ADD CONSTRAINT uk UNIQUE (coly) EXCEPTIONS INTO EXCEPTIONS;alter table building add constraint build_uniq primary key (building_id)
Extents
If Oracle is requested for an extent of a certain size,
|
Searching:![]()
| |||||||||