Skip to main content

Posts

Showing posts with the label oracle 10g

Create Tablespace in ORACLE 10g

Create Tablespace in ORACLE 10g Permanent tablespace Adding Tablespace in database: CREATE SMALLFILE TABLESPACE  BU_SYSTEM_TBS  DATAFILE  '$DATAFILE_LOCATION/BU_SYSTEM_TBS'  SIZE  100M  AUTOEXTEND  ON  NEXT  1000M  MAXSIZE  UNLIMITED  LOGGING   EXTENT MANAGEMENT  LOCAL  SEGMENT SPACE MANAGEMENT  AUTO; Adding Datafile in a Tablespace: Use ALTER TABLESPACE to add datafile in tablespace: ALTER TABLESPACE BU_HIS_LOG_TBS ADD DATAFILE '$DATAFILE_LOCATION/BU_HISTLOG_TBS_01.dbf' SIZE 1000M AUTOEXTEND ON NEXT 20M MAXSIZE UNLIMITED; Modify Datafile: You can modify datafile using ALTER DATABASE command: ALTER DATABASE DATAFILE   ’$DATAFILE_LOCATION/data01.dbf’  AUTOEXTEND   ON   NEXT   30M   MAXSIZE   1200M; which means datafile data02.dbf can automatically grow upto 1200 MB size in blocks of 30 MB each time as required. Renaming Tablespaces: This is a feature that is available with Oracle 10g and can be useful in transportable tablespa

Solution to : "WARNING: Detected too many memory locking problems."

Solution to : "WARNING: Detected too many memory locking problems." My alert log file was generating too many warnings that i was not aware of. After a thorough search in Google (special thanks), i found that one file permission was responsible for generating the warning. My alert log file entries: Current log# 3 seq# 4645 mem# 0: <DATAFILE_LOCATION>/redo03.log Mon May 28 11:53:39 2012 WARNING: Detected too many memory locking problems. WARNING: Performance degradation may occur. The real cause of those warnings is the file oradism located on $ORACLE_HOME/bin folder was lacking permission. As per meta link note 374367.1, issuing the following command should stop the warnings to get generated: 1- cd $ORACLE_HOME/bin 2- chmod 4550 oradism 3- chmod g+s oradism 4- chown root:dba oradism  5- Bounce the database These commands ware generating errors on my case so i just made my oracle os user, the owener of this file. and bounced the database. A

Creating and Assigning User Profile in Oracle

Profiles in Oracle Profiles are used to limit resources a user can use. Then, they can be assigned to users with alter user ... profile command. Limitable resources The following limits can be specified: Kernel limits: Maximum concurrent sessions for a user: (sessions_per_user) CPU time limit per session: (cpu_per_session) CPU time limit per call: (cpu_per_call) Call being parse, execute and fetch Maximum connect time: (connect_time) The session will be dropped by oracle after specified time. Maximum idle time (idle_time) The session will be dropped by oracle after specified time of doing nothing. Long running processes are not idle! Maximum blocks read per session: (logical_reads_per_session) Maximum blocks read per call: (logical_reads_per_call) Maximum amount of SGA: (private_sga) In order to enforce kernel limits, resource_limit must be set to true. Password limits: Maximum failed login attempts: (failed_login_attempts) Maximum time a password is

Understanding JOINING.(LEFT/RIGHT/FULL OUTER, Equijoins)

Understanding JOINING.(LEFT/RIGHT/FULL OUTER, Equijoins) /* create the customer table */ Create Table Customers ( CustNo Integer Not Null Primary Key, CustName Char (20), Address Char (40) ); /* create the orders table */ Create Table Orders ( OrderNo Integer Not Null Primary Key, CustNo Integer, OrderDate Date ); /* put some data into the customer table */ Insert into Customers Values (1,'P. Jones','Leeds'); Insert into Customers Values (2,'A. Chan','Hong Kong'); Insert into Customers Values (3,'K. Green','Columbia'); Insert into Customers Values (4,'B. Smith','Leeds'); Insert into Customers Values (5,'A. Khan',''); /* put some data into the orders table */ Insert into Orders Values (1,1,'24-JAN-96'); Insert into Orders Values (2,1,'31-JAN-96'); Insert into Orders Values (3,2,'04-FEB-96'); Insert into Orders Values (4,4,'12-FEB-96'); Insert

All Dictionary View Tables:

All Dictionary View Tables: TABLE_NAME COMMENTS ALL_ALL_TABLES Description of all object and relational tables accessible to the user ALL_APPLY Details about each apply process that dequeues from the queue visible to the current user ALL_APPLY_CONFLICT_COLUMNS Details about conflict resolution on tables visible to the current user ALL_APPLY_DML_HANDLERS Details about the dml handler on tables visible to the current user ALL_APPLY_ENQUEUE Details about the apply enqueue action for user accessible rules where the destination queue exists and is visible to the user ALL_APPLY_ERROR Error transactions that were generated after dequeuing from the queue visible to the current user ALL_APPLY_EXECUTE Details about the apply execute action for all rules visible to the user ALL_APPLY_KEY_COLUMNS Alternative key columns for a STREAMS table visible to the current user ALL_APPLY_PARAME