Skip to main content

Posts

Showing posts from April, 2012

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

Sessions that are blocked or blocking other sessions- ORACLE 10g

Finding Total Session Count: SELECT 'Currently, ' || (SELECT COUNT(*) FROM V$SESSION) || ' out of ' ||        VP.VALUE || ' connections are used.' AS USAGE_MESSAGE   FROM V$PARAMETER VP  WHERE VP.NAME = 'sessions'; To find sessions that are blocked or blocking other sessions, the one of the following queries: select t.process, t.sid, t.SERIAL#, t.blocking_session, t.USER#, t.USERNAME   from v$session t  where blocking_session is not null; select l1.sid, ' IS BLOCKING ', l2.sid   from v$lock l1, v$lock l2    where l1.block =1 and l2.request > 0   and l1.id1=l2.id1   and l1.id2=l2.id2;

Configuring Multiple Port on Default LISTENER in oracle 10g

·          Go to Listening locations tab from drop down menu. ·          Press Add Address button and select protocol as IPC . ·          Press Add Address again to enter port number. ·          Select TCP/IP Protocol and provide PORT number. ·          Save and Exit from netmgr . ·          You can configure several ports in this way with default LISTERNER . Your "listener.ora" file should look like the following entries now: SID_LIST_LISTENER =   (SID_LIST =     (SID_DESC =       (SID_NAME = TESTDB)       (ORACLE_HOME = /ultimus/oracle/product/10.2.0/db_1)     )     (SID_DESC =       (GLOBAL_DBNAME =  TESTDB)       (ORACLE_HOME = /ultimus/oracle/product/10.2.0/db_1)       (SID_NAME =  TESTDB)     )   ) LISTENER =   (DESCRIPTION_LIST =     (DESCRIPTION =       (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))     )     (DESCRIPTION =       (ADDRESS = (PROTOCOL = TCP)(HOST = DBLIVE01)(PORT = 1521))     )     (DESCRI

ORA-19809: limit exceeded for recovery files

The error was showing during startup. After searching I found a solution which worked. I thought you might like to know it. SQL> startup ORACLE instance started. Total System Global Area 2.5736E+10 bytes Fixed Size                  2165616 bytes Variable Size            2438657168 bytes Database Buffers         2.3287E+10 bytes Redo Buffers                8650752 bytes Database mounted. ORA-16038: log 3 sequence# 16828 cannot be archived ORA-19809: limit exceeded for recovery files ORA-00312: online log 3 thread 1: '/datafile/oracle/oradata/ULTIMUS/redo03.log' SQL> alter system set db_recovery_file_dest_size=150G; System altered. SQL> shutdown immediate; ORA-01109: database not open Database dismounted. ORACLE instance shut down. SQL> startup ORACLE instance started. Total System Global Area 2.5736E+10 bytes Fixed Size                  2165616 bytes Variable Size            2438657168 bytes Database Buffers         2.3287E+10 bytes

How to determine and UNLOCK oracle database users.

How to determine and UNLOCK oracle database users Login as SYSDBA SQL> conn /as sysdba Check the TESTUSER account status. SQL> SELECT username, account_status FROM dba_users WHERE username= ‘TESTUSER’; USERNAME        ACCOUNT_STATUS        PROFILE --------------         -------------------------     ---------------- TESTUSER            LOCKED(TIMED)           DEFAULT Here we can see the account status is LOCKED (TIMED) and the default user’s profile is DEFAULT. Unlock the user account: SQL> ALTER USER TESTUSER ACCOUNT UNLOCK; User altered. Now check again the status of TESTUSER user. SQL> SELECT username, account_status FROM dba_users WHERE username= ‘TESTUSER’;

All about LSNRCTL, Listener Control Utility of ORACLE

To see the available command in listener control utility: LSNRCTL> HELP The following operations are available An asterisk (*) denotes a modifier or extended command: exit quit reload services set* show* spawn start                          status stop trace          version RELOAD Purpose To reread the   listener.ora   file. This command enables you to add or change statically configured services without actually stopping the listener. Syntax From the operating system: lsnrctl RELOAD listener_name From the Listener Control utility: LSNRCTL> RELOAD listener_name SERVICES Purpose To obtain detailed information about the database services, instances, and service handlers (dispatchers and dedicated servers) to which the listener forwards client connection requests. SET LOG_DIRECTORY Purpose To set destination directory where the listener log file is written. By default, the log file is written to the   ORACLE_H