PASSWORD_LOCK_TIME

Friends,
When a user makes a few failed login attempts, its account is locked.
Then the user can only make successive login after PASSWORD_LOCK_TIME
interval is passed according to given profile limit (or) DBA can unlock his account.
My question is how to make a user to remain his account locked, until DBA
unlock his account, and never by himself.

Thanks Schoeib...
I already tested without specifying password_lock_time limit in resource profile.
But after a few minutes i was able to login successfully.
See this example:
SQL> SELECT USERNAME, PROFILE FROM DBA_USERS
  2  WHERE  USERNAME = 'INTELZ' ;
USERNAME                       PROFILE
INTELZ                         SIMPLE
SQL> SELECT RESOURCE_NAME, LIMIT FROM DBA_PROFILES
  2  WHERE  PROFILE = 'SIMPLE'
  3  /
RESOURCE_NAME                    LIMIT
COMPOSITE_LIMIT                  DEFAULT
SESSIONS_PER_USER                DEFAULT
CPU_PER_SESSION                  DEFAULT
CPU_PER_CALL                     DEFAULT
LOGICAL_READS_PER_SESSION        DEFAULT
LOGICAL_READS_PER_CALL           DEFAULT
IDLE_TIME                        DEFAULT
CONNECT_TIME                     DEFAULT
PRIVATE_SGA                      DEFAULT
FAILED_LOGIN_ATTEMPTS            3
PASSWORD_LIFE_TIME               DEFAULT
PASSWORD_REUSE_TIME              DEFAULT
PASSWORD_REUSE_MAX               DEFAULT
PASSWORD_VERIFY_FUNCTION         DEFAULT
PASSWORD_LOCK_TIME               DEFAULT
PASSWORD_GRACE_TIME              DEFAULT
16 rows selected.
SQL> "Now I made 3 failed login attempt....."
SQL> connect intelz/abcd
ERROR:
ORA-28000: the account is locked
"After a very few minutes, I tried to connect....
SQL> conn intelz
Enter password: **********
Connected.
I am asking how should this user remain unlocked until a DBA unlocks it only,
and never himself.
Jameel

Similar Messages

  • Account lock from password_lock_time - Automatic unlock not working

    Oracle 11g database
    I have created a profile with password_lock_time = .01389 (20/1440), set up a test user, and set the user to the new profile. Then I logged in with an invalid password several times and verified from dba_users that the account_status = LOCKED (TIMED). The problem is that several hours later the account has still not unlocked. Am I missing a step or does 11g not allow a fraction to be used for the lock time?

    PASSWORD_LOCK_TIME can be specified in fraction;
    Tested in 11g and it works:
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE 11.2.0.3.0 Production
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    SQL> create profile test LIMIT FAILED_LOGIN_ATTEMPTS 1
    PASSWORD_LOCK_TIME 0.0034; --------------------------------------------------5 mts
    Profile created.
    SQL> create user dummy identified by dummy profile test;
    User created.
    SQL> grant connect,resource,create session to dummy;
    Grant succeeded.
    [oracle@test ~]$ sqlplus dummy/dummy1
    SQL*Plus: Release 11.2.0.3.0 Production on Fri Sep 28 11:35:24 2012
    Copyright (c) 1982, 2011, Oracle. All rights reserved.
    ERROR:
    ORA-01017: invalid username/password; logon denied
    11:35:31 SQL> select username,ACCOUNT_STATUS from dba_users where username like 'DUMMY';
    USERNAME ACCOUNT_STATUS
    ------------------------------ -------------------------------- ------------------> At 11:35 in locked status
    DUMMY LOCKED(TIMED)
    11:41:09 SQL> /
    USERNAME ACCOUNT_STATUS
    ------------------------------ -------------------------------- ----------------------> At 11:41 in OPEN status
    DUMMY OPEN
    [oracle@test ~]$ sqlplus dummy/dummy
    SQL*Plus: Release 11.2.0.3.0 Production on Fri Sep 28 11:41:21 2012
    Copyright (c) 1982, 2011, Oracle. All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, Automatic Storage Management, OLAP, Data Mining
    and Real Application Testing options
    Edited by: vreddy on Sep 28, 2012 9:45 AM

  • Password change fails in SQL Developer with verify function...

    A couple of months ago I enforced a password verify function on our 11.2.0.3 databases and also one legacy 10.2.0.4 database.
    At the time I tested on my account (which had elevated privileges...doh!).   Now some users are hitting expiry, they can't change it via SQL Developer.
    If I create a user with 'create session' privilege and set their profile to one that uses the verify function (see both below), I then log in to SQL Developer (we have tried with versions 3.1 (Windows) and 3.2 (Linux) with same failure results.
    BTW,.. the password verify function enforces the following:
    password must be minimum of 8 characters
    password must not be the same as the user name, or user name (1-100)
    password must contain at least a single digit
    password must contain at least a single character
    1. Works = I log into the local server and run command line SQLPlus, type 'password' and update.   I can successfully change my password.
    2. Fails = I log into the local server and run command line SQLPlus, type 'alter user <me> identified by <newpwd>;' I get:
    TEST: SUTEMP > alter user sutemp identified by carport9999;
    alter user sutemp identified by carport9999
    ERROR at line 1:
    ORA-28221: REPLACE not specified
    This error is because the account does not have the 'alter user' privilege.   I'm okay with this, as I don't want our users having this privilege.
    3. I start SQL Developer 3.2, type 'alter user <me> identified by <newpwd>;' I get the same ORA-28221 error as above.   That is fine, and as expected.
    4. Now in SQL Developer, I type 'password', set a valid password, but I get 'Failed to change password' in the Script Output tab.
    I have a database 'after servererror on database' trigger set, and querying the database table it is logging into, I see a record with a date stamp matching my failure with a server_error=28221 (the same as above).
    So I'm wondering if I'm doing something wrong here, or if this is a bug in SQL Developer.   I don't want standard users having 'alter user' privileges, but I do want to enforce password verification.
    I get the same result on three 11.2.0.3 databases (haven't tried any more but suspect same results for others) and one legacy 10.2.0.4 database, and using SQL Developer 3.1 and 3.2.
    DBA_PROFILE used:
    PROFILE   
    RESOURCE_NAME  
    RESOURCE LIMIT
    CTRU  
    COMPOSITE_LIMIT  
    KERNEL     DEFAULT
    CTRU  
    SESSIONS_PER_USER  
    KERNEL     10
    CTRU  
    CPU_PER_SESSION  
    KERNEL     DEFAULT
    CTRU  
    CPU_PER_CALL  
    KERNEL     DEFAULT
    CTRU  
    LOGICAL_READS_PER_SESSION    KERNEL     DEFAULT
    CTRU  
    LOGICAL_READS_PER_CALL  
    KERNEL     DEFAULT
    CTRU  
    IDLE_TIME  
    KERNEL     DEFAULT
    CTRU  
    CONNECT_TIME  
    KERNEL     DEFAULT
    CTRU  
    PRIVATE_SGA  
    KERNEL     DEFAULT
    CTRU  
    FAILED_LOGIN_ATTEMPTS  
    PASSWORD 10
    CTRU  
    PASSWORD_LIFE_TIME  
    PASSWORD 180
    CTRU  
    PASSWORD_REUSE_TIME  
    PASSWORD DEFAULT
    CTRU  
    PASSWORD_REUSE_MAX  
    PASSWORD 5
    CTRU  
    PASSWORD_VERIFY_FUNCTION     PASSWORD VERIFY_FUNCTION_11G
    CTRU  
    PASSWORD_LOCK_TIME  
    PASSWORD .002
    CTRU  
    PASSWORD_GRACE_TIME  
    PASSWORD 21
    16 rows selected.
    Verify Function used:
    $ cat utlpwdmg.sql
    Rem
    Rem $Header: utlpwdmg.sql 02-aug-2006.08:18:05 asurpur Exp $
    Rem
    Rem utlpwdmg.sql
    Rem
    Rem Copyright (c) 2006, Oracle. All rights reserved.
    Rem
    Rem    NAME
    Rem      utlpwdmg.sql - script for Default Password Resource Limits
    Rem
    Rem    DESCRIPTION
    Rem      This is a script for enabling the password management features
    Rem      by setting the default password resource limits.
    Rem
    Rem    NOTES
    Rem      This file contains a function for minimum checking of password
    Rem      complexity. This is more of a sample function that the customer
    Rem      can use to develop the function for actual complexity checks that the
    Rem      customer wants to make on the new password.
    Rem
    Rem    MODIFIED   (MM/DD/YY)
    Rem    suren       05/09/13 - customise for NIHI use
    Rem    asurpur     05/30/06 - fix - 5246666 beef up password complexity check
    Rem    nireland    08/31/00 - Improve check for username=password. #1390553
    Rem    nireland    06/28/00 - Fix null old password test. #1341892
    Rem    asurpur     04/17/97 - Fix for bug479763
    Rem    asurpur     12/12/96 - Changing the name of password_verify_function
    Rem    asurpur     05/30/96 - New script for default password management
    Rem    asurpur     05/30/96 - Created
    Rem
    -- This script sets the default password resource parameters
    -- This script needs to be run to enable the password features.
    -- However the default resource parameters can be changed based
    -- on the need.
    -- A default password complexity function is also provided.
    -- This function makes the minimum complexity checks like
    -- the minimum length of the password, password not same as the
    -- username, etc. The user may enhance this function according to
    -- the need.
    -- This function must be created in SYS schema.
    -- connect sys/<password> as sysdba before running the script
    CREATE OR REPLACE FUNCTION verify_function_11G
    (username varchar2,
      password varchar2,
      old_password varchar2)
      RETURN boolean IS
       n boolean;
       m integer;
       differ integer;
       isdigit boolean;
       ischar  boolean;
       ispunct boolean;
       db_name varchar2(40);
       digitarray varchar2(20);
       punctarray varchar2(25);
       chararray varchar2(52);
       i_char varchar2(10);
       simple_password varchar2(10);
       reverse_user varchar2(32);
    BEGIN
       digitarray:= '0123456789';
       chararray:= 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
       -- Check for the minimum length of the password
       IF length(password) < 8 THEN
          raise_application_error(-20001, 'Password length less than 8');
       END IF;
       -- Check if the password is same as the username or username(1-100)
       IF NLS_LOWER(password) = NLS_LOWER(username) THEN
         raise_application_error(-20002, 'Password same as or similar to user');
       END IF;
       FOR i IN 1..100 LOOP
          i_char := to_char(i);
          if NLS_LOWER(username)|| i_char = NLS_LOWER(password) THEN
            raise_application_error(-20005, 'Password same as or similar to user name ');
          END IF;
        END LOOP;
       -- Check if the password contains at least one letter, one digit
       -- 1. Check for the digit
       isdigit:=FALSE;
       m := length(password);
       FOR i IN 1..10 LOOP
          FOR j IN 1..m LOOP
             IF substr(password,j,1) = substr(digitarray,i,1) THEN
                isdigit:=TRUE;
                 GOTO findchar;
             END IF;
          END LOOP;
       END LOOP;
       IF isdigit = FALSE THEN
          raise_application_error(-20008, 'Password must contain at least one digit, one character');
       END IF;
       -- 2. Check for the character
       <<findchar>>
       ischar:=FALSE;
       FOR i IN 1..length(chararray) LOOP
          FOR j IN 1..m LOOP
             IF substr(password,j,1) = substr(chararray,i,1) THEN
                ischar:=TRUE;
                 GOTO endsearch;
             END IF;
          END LOOP;
       END LOOP;
       IF ischar = FALSE THEN
          raise_application_error(-20009, 'Password must contain at least one digit, and one character');
       END IF;
       <<endsearch>>
       -- Check if the password differs from the previous password by at least
       -- 3 letters
       IF old_password IS NOT NULL THEN
         differ := length(old_password) - length(password);
         differ := abs(differ);
         IF differ < 3 THEN
           IF length(password) < length(old_password) THEN
             m := length(password);
           ELSE
             m := length(old_password);
           END IF;
           FOR i IN 1..m LOOP
             IF substr(password,i,1) != substr(old_password,i,1) THEN
               differ := differ + 1;
             END IF;
           END LOOP;
           IF differ < 3 THEN
             raise_application_error(-20011, 'Password should differ from the old password by at least 3 characters');
           END IF;
         END IF;
       END IF;
       -- Everything is fine; return TRUE ;
       RETURN(TRUE);
    END;
    alter profile ctru limit password_verify_function verify_function_11g;
    alter profile default limit password_verify_function verify_function_11g;
    alter profile web_and_it limit password_verify_function verify_function_11g;

    okay,... I just saw another website which shows I should put in the 'replace <oldpwd>' clause in.
    This works in SQL Developer:     alter user sutemp identified by carport999 replace garage999;
    So why does the 'password' command fail?     (Developers:  it would also be helpful to have the ORA- error displayed as opposed to 'Failed to change password')

  • Sqlplus takes long time to connect

    Hi All,
    I am using database 11.2 on Linux x86-64 platform.
    Using SQLPLUS (bequeath) to connect to the database as a particular user it takes a long time to connect and connecting to the database as any other user is instantaneous.
    If I use TNS names and remotely connect to the database as the same user, it fails with following error
    ERROR:
    ORA-03135: connection lost contact
    Process ID: 0
    Session ID: 0 Serial number: 0
    Again I can use TNS names to connect to the database as any other user.
    The profile details for the problematic user are:
    PROFILE RESOURCE_NAME RESOURCE LIMIT
    MONITORING_PROFILE COMPOSITE_LIMIT KERNEL DEFAULT
    MONITORING_PROFILE SESSIONS_PER_USER KERNEL DEFAULT
    MONITORING_PROFILE CPU_PER_SESSION KERNEL DEFAULT
    MONITORING_PROFILE CPU_PER_CALL KERNEL DEFAULT
    MONITORING_PROFILE LOGICAL_READS_PER_SESSION KERNEL DEFAULT
    MONITORING_PROFILE LOGICAL_READS_PER_CALL KERNEL DEFAULT
    MONITORING_PROFILE IDLE_TIME KERNEL DEFAULT
    MONITORING_PROFILE CONNECT_TIME KERNEL DEFAULT
    MONITORING_PROFILE PRIVATE_SGA KERNEL DEFAULT
    MONITORING_PROFILE FAILED_LOGIN_ATTEMPTS PASSWORD UNLIMITED
    MONITORING_PROFILE PASSWORD_LIFE_TIME PASSWORD DEFAULT
    MONITORING_PROFILE PASSWORD_REUSE_TIME PASSWORD DEFAULT
    MONITORING_PROFILE PASSWORD_REUSE_MAX PASSWORD DEFAULT
    MONITORING_PROFILE PASSWORD_VERIFY_FUNCTION PASSWORD DEFAULT
    MONITORING_PROFILE PASSWORD_LOCK_TIME PASSWORD DEFAULT
    MONITORING_PROFILE PASSWORD_GRACE_TIME PASSWORD DEFAULT
    Please help.

    Hi;
    Please see:
    ORA-03135 When Connecting to the Database [ID 404724.1]
    Regard
    Helios

  • Error while importing a dump file in my local database

    Hi,
    I have a dump file named *"system_21Sep2010_DVSD.DMP"* which i'm trying to import in my local database named *"nandita1"*.
    The dump file is found under the following path *"C:\DevSuiteHome_1\BIN"* and i executed the following command for importing the dump file:
    C:\DevSuiteHome_1\BIN>imp system/system@nandita1 FILE=system_21Sep2010_DVSD.DMP FULL=YES
    I'm getting the following error while importing the dump file:
    Import: Release 10.1.0.4.2 - Production on Wed Oct 6 16:25:37 2010
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Produc
    tion
    With the Partitioning, OLAP and Data Mining options
    Export file created by EXPORT:V10.01.00 via conventional path
    import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    IMP-00015: following statement failed because the object already exists:
    "CREATE UNDO TABLESPACE "UNDOTBS1" BLOCKSIZE 8192 DATAFILE '/oradata_dev/DV"
    "SD/undotbs01.dbf' SIZE 104857600 AUTOEXTEND ON NEXT 5242880 MAXSIZE "
    "32767M EXTENT MANAGEMENT LOCAL "
    IMP-00015: following statement failed because the object already exists:
    "CREATE TABLESPACE "SYSAUX" BLOCKSIZE 8192 DATAFILE '/oradata_dev/DVSD/sysa"
    "ux01.dbf' SIZE 367001600 AUTOEXTEND ON NEXT 10485760 MAXSIZE 32767M "
    "EXTENT MANAGEMENT LOCAL AUTOALLOCATE ONLINE PERMANENT SEGMENT SPACE MANA"
    "GEMENT AUTO"
    IMP-00015: following statement failed because the object already exists:
    "CREATE TEMPORARY TABLESPACE "TEMP" BLOCKSIZE 8192 TEMPFILE '/oradata_dev/D"
    "VSD/temp01.dbf' SIZE 20971520 AUTOEXTEND ON NEXT 655360 MAXSIZE 3276"
    "7M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1048576"
    IMP-00015: following statement failed because the object already exists:
    "CREATE TABLESPACE "USERS" BLOCKSIZE 8192 DATAFILE '/oradata_dev/DVSD/users"
    "01.dbf' SIZE 5242880 AUTOEXTEND ON NEXT 1310720 MAXSIZE 32767M EXTEN"
    "T MANAGEMENT LOCAL AUTOALLOCATE ONLINE PERMANENT SEGMENT SPACE MANAGEMEN"
    "T AUTO"
    IMP-00015: following statement failed because the object already exists:
    "CREATE TABLESPACE "XX_DATA" BLOCKSIZE 8192 DATAFILE '/oradata_dev/DVSD/XX_"
    "DATA01.dbf' SIZE 140509184 AUTOEXTEND ON NEXT 1048576 MAXSIZE 32767M"
    " EXTENT MANAGEMENT LOCAL AUTOALLOCATE ONLINE PERMANENT "
    IMP-00015: following statement failed because the object already exists:
    "CREATE TABLESPACE "XX_INDEX" BLOCKSIZE 8192 DATAFILE '/oradata_dev/DVSD/XX"
    "_INDEX.dbf' SIZE 93323264 AUTOEXTEND ON NEXT 1048576 MAXSIZE 32767M "
    "EXTENT MANAGEMENT LOCAL AUTOALLOCATE ONLINE PERMANENT "
    IMP-00015: following statement failed because the object already exists:
    "CREATE PROFILE "MONITORING_PROFILE" LIMIT COMPOSITE_LIMIT DEFAULT SESSIONS_"
    "PER_USER DEFAULT CPU_PER_SESSION DEFAULT CPU_PER_CALL DEFAULT LOGICAL_READS"
    "_PER_SESSION DEFAULT LOGICAL_READS_PER_CALL DEFAULT IDLE_TIME DEFAULT CONNE"
    "CT_TIME DEFAULT PRIVATE_SGA DEFAULT FAILED_LOGIN_ATTEMPTS UNLIMITED PASSWOR"
    "D_LIFE_TIME DEFAULT PASSWORD_REUSE_TIME DEFAULT PASSWORD_REUSE_MAX DEFAULT "
    "PASSWORD_LOCK_TIME DEFAULT PASSWORD_GRACE_TIME DEFAULT"
    IMP-00015: following statement failed because the object already exists:
    "CREATE USER "OUTLN" IDENTIFIED BY VALUES '4A3BA55E08595C81' TEMPORARY TABLE"
    "SPACE "TEMP" PASSWORD EXPIRE ACCOUNT LOCK"
    IMP-00015: following statement failed because the object already exists:
    "CREATE USER "TSMSYS" IDENTIFIED BY VALUES '3DF26A8B17D0F29F' DEFAULT TABLES"
    "PACE "USERS" TEMPORARY TABLESPACE "TEMP" PASSWORD EXPIRE ACCOUNT LOCK"
    IMP-00015: following statement failed because the object already exists:
    "CREATE USER "ANONYMOUS" IDENTIFIED BY VALUES 'anonymous' DEFAULT TABLESPACE"
    " "SYSAUX" TEMPORARY TABLESPACE "TEMP" PASSWORD EXPIRE ACCOUNT LOCK"
    IMP-00015: following statement failed because the object already exists:
    "CREATE USER "OLAPSYS" IDENTIFIED BY VALUES '3FB8EF9DB538647C' DEFAULT TABLE"
    "SPACE "SYSAUX" TEMPORARY TABLESPACE "TEMP" PASSWORD EXPIRE ACCOUNT LOCK"
    IMP-00015: following statement failed because the object already exists:
    "CREATE USER "MDDATA" IDENTIFIED BY VALUES 'DF02A496267DEE66' DEFAULT TABLES"
    "PACE "USERS" TEMPORARY TABLESPACE "TEMP" PASSWORD EXPIRE ACCOUNT LOCK"
    IMP-00015: following statement failed because the object already exists:
    "CREATE USER "SYSMAN" IDENTIFIED BY VALUES '28F72A3C2D75FDE9' DEFAULT TABLES"
    "PACE "SYSAUX" TEMPORARY TABLESPACE "TEMP""
    IMP-00015: following statement failed because the object already exists:
    "CREATE USER "MGMT_VIEW" IDENTIFIED BY VALUES '442167C25FAC883C' TEMPORARY T"
    "ABLESPACE "TEMP""
    IMP-00015: following statement failed because the object already exists:
    "CREATE USER "SCOTT" IDENTIFIED BY VALUES 'F894844C34402B67' DEFAULT TABLESP"
    "ACE "USERS" TEMPORARY TABLESPACE "TEMP" PASSWORD EXPIRE ACCOUNT LOCK"
    IMP-00015: following statement failed because the object already exists:
    "CREATE USER "BUXXDDWA" IDENTIFIED BY VALUES '2672292A792DB64B' DEFAULT TABL"
    "ESPACE "XX_DATA" TEMPORARY TABLESPACE "TEMP""
    IMP-00015: following statement failed because the object already exists:
    "CREATE USER "XXDDWA" IDENTIFIED BY VALUES 'F5C178B2796496F4' DEFAULT TABLES"
    "PACE "XX_INDEX" TEMPORARY TABLESPACE "TEMP""
    IMP-00015: following statement failed because the object already exists:
    "CREATE USER "BUXXDDWS" IDENTIFIED BY VALUES '06D47E0665132890' DEFAULT TABL"
    "ESPACE "XX_DATA" TEMPORARY TABLESPACE "TEMP""
    IMP-00015: following statement failed because the object already exists:
    "CREATE USER "BUXXSUC" IDENTIFIED BY VALUES '1705C688518ADCDC' DEFAULT TABLE"
    "SPACE "XX_DATA" TEMPORARY TABLESPACE "TEMP""
    IMP-00015: following statement failed because the object already exists:
    "CREATE USER "JIRAUSER" IDENTIFIED BY VALUES 'F0E1C662FCD1E09F' DEFAULT TABL"
    "ESPACE "XX_DATA" TEMPORARY TABLESPACE "TEMP""
    IMP-00015: following statement failed because the object already exists:
    "CREATE USER "XXSFA" IDENTIFIED BY VALUES 'C3DFA37A29E072B6' DEFAULT TABLESP"
    "ACE "XX_INDEX" TEMPORARY TABLESPACE "TEMP""
    IMP-00015: following statement failed because the object already exists:
    "CREATE USER "XXDDW" IDENTIFIED BY VALUES 'CFF3D9B1B6C20DCC' DEFAULT TABLESP"
    "ACE "XX_DATA" TEMPORARY TABLESPACE "TEMP""
    IMP-00015: following statement failed because the object already exists:
    "CREATE USER "XXDDWS" IDENTIFIED BY VALUES '9EF0EE1BAC5855C4' DEFAULT TABLES"
    "PACE "XX_DATA" TEMPORARY TABLESPACE "TEMP""
    IMP-00015: following statement failed because the object already exists:
    "CREATE USER "XXSUC" IDENTIFIED BY VALUES '39594B53A6F1CED0' DEFAULT TABLESP"
    "ACE "XX_INDEX" TEMPORARY TABLESPACE "TEMP""
    IMP-00015: following statement failed because the object already exists:
    "CREATE ROLE "SELECT_CATALOG_ROLE""
    IMP-00015: following statement failed because the object already exists:
    "REVOKE "SELECT_CATALOG_ROLE" FROM SYSTEM"
    IMP-00015: following statement failed because the object already exists:
    "CREATE ROLE "EXECUTE_CATALOG_ROLE""
    IMP-00015: following statement failed because the object already exists:
    "REVOKE "EXECUTE_CATALOG_ROLE" FROM SYSTEM"
    IMP-00015: following statement failed because the object already exists:
    "CREATE ROLE "DELETE_CATALOG_ROLE""
    IMP-00015: following statement failed because the object already exists:
    "REVOKE "DELETE_CATALOG_ROLE" FROM SYSTEM"
    IMP-00015: following statement failed because the object already exists:
    "CREATE ROLE "RECOVERY_CATALOG_OWNER""
    IMP-00015: following statement failed because the object already exists:
    "REVOKE "RECOVERY_CATALOG_OWNER" FROM SYSTEM"
    IMP-00015: following statement failed because the object already exists:
    "CREATE ROLE "GATHER_SYSTEM_STATISTICS""
    IMP-00015: following statement failed because the object already exists:
    "REVOKE "GATHER_SYSTEM_STATISTICS" FROM SYSTEM"
    IMP-00015: following statement failed because the object already exists:
    "CREATE ROLE "LOGSTDBY_ADMINISTRATOR""
    IMP-00015: following statement failed because the object already exists:
    "REVOKE "LOGSTDBY_ADMINISTRATOR" FROM SYSTEM"
    IMP-00015: following statement failed because the object already exists:
    "CREATE ROLE "AQ_ADMINISTRATOR_ROLE""
    IMP-00015: following statement failed because the object already exists:
    "CREATE ROLE "AQ_USER_ROLE""
    IMP-00015: following statement failed because the object already exists:
    "REVOKE "AQ_USER_ROLE" FROM SYSTEM"
    IMP-00015: following statement failed because the object already exists:
    "CREATE ROLE "GLOBAL_AQ_USER_ROLE" IDENTIFIED GLOBALLY "
    IMP-00015: following statement failed because the object already exists:
    "CREATE ROLE "SCHEDULER_ADMIN""
    IMP-00015: following statement failed because the object already exists:
    "REVOKE "SCHEDULER_ADMIN" FROM SYSTEM"
    IMP-00015: following statement failed because the object already exists:
    "CREATE ROLE "HS_ADMIN_ROLE""
    IMP-00015: following statement failed because the object already exists:
    "REVOKE "HS_ADMIN_ROLE" FROM SYSTEM"
    IMP-00015: following statement failed because the object already exists:
    "CREATE ROLE "AUTHENTICATEDUSER""
    IMP-00015: following statement failed because the object already exists:
    "REVOKE "AUTHENTICATEDUSER" FROM SYSTEM"
    IMP-00015: following statement failed because the object already exists:
    "CREATE ROLE "OEM_ADVISOR""
    IMP-00015: following statement failed because the object already exists:
    "REVOKE "OEM_ADVISOR" FROM SYSTEM"
    IMP-00015: following statement failed because the object already exists:
    "CREATE ROLE "OEM_MONITOR""
    IMP-00015: following statement failed because the object already exists:
    "REVOKE "OEM_MONITOR" FROM SYSTEM"
    IMP-00015: following statement failed because the object already exists:
    "CREATE ROLE "WM_ADMIN_ROLE""
    IMP-00015: following statement failed because the object already exists:
    "REVOKE "WM_ADMIN_ROLE" FROM SYSTEM"
    IMP-00015: following statement failed because the object already exists:
    "CREATE ROLE "JAVAUSERPRIV""
    IMP-00015: following statement failed because the object already exists:
    "REVOKE "JAVAUSERPRIV" FROM SYSTEM"
    IMP-00015: following statement failed because the object already exists:
    "CREATE ROLE "JAVAIDPRIV""
    IMP-00015: following statement failed because the object already exists:
    "REVOKE "JAVAIDPRIV" FROM SYSTEM"
    IMP-00015: following statement failed because the object already exists:
    "CREATE ROLE "JAVASYSPRIV""
    IMP-00015: following statement failed because the object already exists:
    "REVOKE "JAVASYSPRIV" FROM SYSTEM"
    IMP-00015: following statement failed because the object already exists:
    "CREATE ROLE "JAVADEBUGPRIV""
    IMP-00015: following statement failed because the object already exists:
    "REVOKE "JAVADEBUGPRIV" FROM SYSTEM"
    IMP-00015: following statement failed because the object already exists:
    "CREATE ROLE "EJBCLIENT""
    IMP-00015: following statement failed because the object already exists:
    "REVOKE "EJBCLIENT" FROM SYSTEM"
    IMP-00015: following statement failed because the object already exists:
    "CREATE ROLE "JAVA_ADMIN""
    IMP-00015: following statement failed because the object already exists:
    "REVOKE "JAVA_ADMIN" FROM SYSTEM"
    IMP-00015: following statement failed because the object already exists:
    "CREATE ROLE "JAVA_DEPLOY""
    IMP-00015: following statement failed because the object already exists:
    "REVOKE "JAVA_DEPLOY" FROM SYSTEM"
    IMP-00015: following statement failed because the object already exists:
    "CREATE ROLE "CTXAPP""
    IMP-00015: following statement failed because the object already exists:
    "REVOKE "CTXAPP" FROM SYSTEM"
    IMP-00015: following statement failed because the object already exists:
    "CREATE ROLE "XDBADMIN""
    IMP-00015: following statement failed because the object already exists:
    "REVOKE "XDBADMIN" FROM SYSTEM"
    IMP-00015: following statement failed because the object already exists:
    "CREATE ROLE "XDBWEBSERVICES""
    IMP-00015: following statement failed because the object already exists:
    "REVOKE "XDBWEBSERVICES" FROM SYSTEM"
    IMP-00015: following statement failed because the object already exists:
    "CREATE ROLE "OLAP_DBA""
    IMP-00015: following statement failed because the object already exists:
    "REVOKE "OLAP_DBA" FROM SYSTEM"
    IMP-00015: following statement failed because the object already exists:
    "CREATE ROLE "OLAP_USER""
    IMP-00015: following statement failed because the object already exists:
    "REVOKE "OLAP_USER" FROM SYSTEM"
    IMP-00015: following statement failed because the object already exists:
    "CREATE ROLE "MGMT_USER""
    IMP-00015: following statement failed because the object already exists:
    "CREATE SEQUENCE "MVIEW$_ADVSEQ_GENERIC" MINVALUE 1 MAXVALUE 4294967295 INCR"
    "EMENT BY 1 START WITH 1 CACHE 50 NOORDER NOCYCLE"
    IMP-00015: following statement failed because the object already exists:
    "CREATE SEQUENCE "MVIEW$_ADVSEQ_ID" MINVALUE 1 MAXVALUE 4294967295 INCREMENT"
    " BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE"
    IMP-00015: following statement failed because the object already exists:
    "CREATE SEQUENCE "LOGMNR_EVOLVE_SEQ$" MINVALUE 1 MAXVALUE 999999999999999999"
    "999999999 INCREMENT BY 1 START WITH 1 CACHE 20 ORDER NOCYCLE"
    IMP-00015: following statement failed because the object already exists:
    "CREATE SEQUENCE "LOGMNR_SEQ$" MINVALUE 1 MAXVALUE 9999999999999999999999999"
    "99 INCREMENT BY 1 START WITH 1 CACHE 20 ORDER NOCYCLE"
    IMP-00015: following statement failed because the object already exists:
    "CREATE SEQUENCE "LOGMNR_UIDS$" MINVALUE 1 MAXVALUE 999999999999999999999999"
    "999 INCREMENT BY 1 START WITH 100 CACHE 20 ORDER NOCYCLE"
    IMP-00015: following statement failed because the object already exists:
    "CREATE SEQUENCE "REPCAT$_FLAVORS_S" MINVALUE -2147483647 MAXVALUE 214748364"
    "7 INCREMENT BY 1 START WITH 1 NOCACHE NOORDER NOCYCLE"
    IMP-00015: following statement failed because the object already exists:
    "CREATE SEQUENCE "REPCAT$_FLAVOR_NAME_S" MINVALUE 1 MAXVALUE 999999999999999"
    "999999999999 INCREMENT BY 1 START WITH 1 NOCACHE NOORDER NOCYCLE"
    IMP-00015: following statement failed because the object already exists:
    "CREATE SEQUENCE "REPCAT$_REPPROP_KEY" MINVALUE 1 MAXVALUE 99999999999999999"
    "9999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE"
    IMP-00015: following statement failed because the object already exists:
    "CREATE SEQUENCE "REPCAT_LOG_SEQUENCE" MINVALUE 1 MAXVALUE 99999999999999999"
    "9999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE"
    IMP-00015: following statement failed because the object already exists:
    "CREATE SEQUENCE "REPCAT$_REFRESH_TEMPLATES_S" MINVALUE 1 MAXVALUE 999999999"
    "999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE"
    IMP-00015: following statement failed because the object already exists:
    "CREATE SEQUENCE "REPCAT$_USER_AUTHORIZATIONS_S" MINVALUE 1 MAXVALUE 9999999"
    "99999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE"
    IMP-00015: following statement failed because the object already exists:
    "CREATE SEQUENCE "REPCAT$_TEMPLATE_REFGROUPS_S" MINVALUE 1 MAXVALUE 99999999"
    "9999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE"
    IMP-00015: following statement failed because the object already exists:
    "CREATE SEQUENCE "REPCAT$_TEMPLATE_OBJECTS_S" MINVALUE 1 MAXVALUE 9999999999"
    "99999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE"
    IMP-00015: following statement failed because the object already exists:
    "CREATE SEQUENCE "REPCAT$_TEMPLATE_PARMS_S" MINVALUE 1 MAXVALUE 999999999999"
    "999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE"
    IMP-00015: following statement failed because the object already exists:
    "CREATE SEQUENCE "REPCAT$_USER_PARM_VALUES_S" MINVALUE 1 MAXVALUE 9999999999"
    "99999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE"
    IMP-00015: following statement failed because the object already exists:
    "CREATE SEQUENCE "REPCAT$_TEMPLATE_SITES_S" MINVALUE 1 MAXVALUE 999999999999"
    "999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE"
    IMP-00015: following statement failed because the object already exists:
    "CREATE SEQUENCE "REPCAT$_TEMP_OUTPUT_S" MINVALUE 1 MAXVALUE 999999999999999"
    "999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE"
    IMP-00015: following statement failed because the object already exists:
    "CREATE SEQUENCE "REPCAT$_RUNTIME_PARMS_S" MINVALUE 1 MAXVALUE 9999999999999"
    "99999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE"
    IMP-00015: following statement failed because the object already exists:
    "CREATE SEQUENCE "TEMPLATE$_TARGETS_S" MINVALUE 1 MAXVALUE 99999999999999999"
    "9999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE"
    IMP-00015: following statement failed because the object already exists:
    "CREATE SEQUENCE "REPCAT$_EXCEPTIONS_S" MINVALUE 1 MAXVALUE 9999999999999999"
    "99999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE"
    . importing OLAPSYS's objects into OLAPSYS
    IMP-00015: following statement failed because the object already exists:
    "CREATE SEQUENCE "OLAP_ID_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999"
    "99 INCREMENT BY 1 START WITH 122 NOCACHE NOORDER NOCYCLE"
    IMP-00015: following statement failed because the object already exists:
    "CREATE SEQUENCE "OLAP_IRID" MINVALUE 1 MAXVALUE 999999999999999999999999999"
    " INCREMENT BY 1 START WITH 24 NOCACHE ORDER NOCYCLE"
    IMP-00015: following statement failed because the object already exists:
    "CREATE SEQUENCE "CWM2_OLAP_ENABLESEQ" MINVALUE 1 MAXVALUE 9999 INCREMENT BY"
    " 1 START WITH 1 NOCACHE ORDER CYCLE"
    I've been waiting for hours, but still it is blocked at the same place, that is:
    IMP-00015: following statement failed because the object already exists:
    "CREATE SEQUENCE "CWM2_OLAP_ENABLESEQ" MINVALUE 1 MAXVALUE 9999 INCREMENT BY"
    " 1 START WITH 1 NOCACHE ORDER CYCLE"
    I've tried recreating the database, but still the error is the same.
    I've tried including the ignore=Y, that is:
    C:\DevSuiteHome_1\BIN>imp system/system@nandita1 FILE=system_21Sep2010_DVSD.DMP
    FULL=YES IGNORE=YES
    The error generated is as displayed below:
    Import: Release 10.1.0.4.2 - Production on Wed Oct 6 16:34:04 2010
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Produc
    tion
    With the Partitioning, OLAP and Data Mining options
    Export file created by EXPORT:V10.01.00 via conventional path
    import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    . importing OLAPSYS's objects into OLAPSYS
    Over here also, i had to kill the process since it was blocked at the following statement: ". importing OLAPSYS's objects into OLAPSYS"
    Please can someone help me out.
    Thanking in advanced

    plzzzzzzzzzzzzzzzzz.............sme1 help me out

  • How to find out maximum number of sessions allowed to a user?

    Hello all,
    Can you please tell me how can I find out the maximum concurrent sessions are allowed to a particular or all users in the Oracle database?
    I am currently using the Oracle 9.0.2 database server.
    I tried to query v$license, it gave me NULL records.
    Thanks in advance
    Himanshu

    Users have a profile. example :
    CREATE PROFILE DEFAULT LIMIT
              SESSIONS_PER_USER UNLIMITED
              CPU_PER_SESSION UNLIMITED
              CPU_PER_CALL UNLIMITED
              CONNECT_TIME UNLIMITED
              IDLE_TIME UNLIMITED
              LOGICAL_READS_PER_SESSION UNLIMITED
              LOGICAL_READS_PER_CALL UNLIMITED
              COMPOSITE_LIMIT UNLIMITED
              PRIVATE_SGA UNLIMITED
              FAILED_LOGIN_ATTEMPTS UNLIMITED
              PASSWORD_LIFE_TIME UNLIMITED
              PASSWORD_REUSE_TIME UNLIMITED
              PASSWORD_REUSE_MAX UNLIMITED
              PASSWORD_LOCK_TIME UNLIMITED
              PASSWORD_GRACE_TIME UNLIMITED
              PASSWORD_VERIFY_FUNCTION NULL;
    SESSIONS_PER_USER is the one you are looking for. You can find more here:
    Select * FROM SYS.DBA_PROFILES WHERE PROFILE = :Name

  • Want to change ACCOUNT GROUP to BP from CRM to ECC

    Hi All,
    We would like to change the Account group of our (Inside/Outside sales persons) when they are replicating from CRM to ECC.  We did change the PIDE setting according to our requirement but surprisingly 10-12 BPs are not getting changed. We opened an OSS and they suggested to write a Z function module and
    registering it in the table CRMC_BUT_CALL_FU for the CRM OUTBOUND which HARDCODES the CLASSIFICATION DATA to the BP in accordance with the PIDE settings so as to get the ACCOUNT GROUP for these BPs.
    I checkede the tcode CRMC_BUT_CALL_FU for the CRM OUTBOUND where we need to place our own FM. I know to write a FM, but not quite sure how to start. Can anyone out there please help me with this.
    Any suggestions are highly appreciated.
    Thanks,
    Karuna.

    I was able to change the account status from EXPIRE(GRACE) to OPEN. The trick as you hint at is to create a temporary profile, assign that profile to the account in question, saving the password from dba_users first, changing the password, logging in with the new password, then alter the user assigning back the original password with the identified by values clause in the later user statement and lastly assigning the original profile, either DEFAULT or custom.
    Here is the temp profile I used which used values less than 1 for the critical limits involved here. Cannot have limit values less than 1 in 9i according to Oracle but you can in 10g.
    CREATE PROFILE "TEMP_PROFILE" LIMIT CPU_PER_SESSION DEFAULT
    CPU_PER_CALL DEFAULT
    CONNECT_TIME DEFAULT
    IDLE_TIME 15
    SESSIONS_PER_USER DEFAULT
    LOGICAL_READS_PER_SESSION DEFAULT
    LOGICAL_READS_PER_CALL DEFAULT
    PRIVATE_SGA DEFAULT
    COMPOSITE_LIMIT DEFAULT
    PASSWORD_LIFE_TIME .0001
    PASSWORD_GRACE_TIME 5
    PASSWORD_REUSE_MAX 1
    PASSWORD_REUSE_TIME .0001
    PASSWORD_LOCK_TIME .0103
    FAILED_LOGIN_ATTEMPTS 3
    PASSWORD_VERIFY_FUNCTION DEFAULT;
    Thanks for your help.

  • There have been 7,039 failed login attempts in the last 30 minutes

    Hi,
    I am trying to find out the cause for an OEM alert we received:
    There have been 7,039 failed login attempts in the last 30 minutesThe cause is ofcourse known, but I can't find out why the application anyway was able to do 7000+ login attempts within half an hour. The account should have locked after 10 attempts
    The perticular account has a DEFAULT profile.
    Auditing is on, so if we look into DBA_AUDIT_SESSION it is clearly seen that within 1 minute approx 1200 failed login attempts occured without the account being locked.
    USERNAME USERHOST     RETURCODE      TIME              COUNT
    KRAMPV      DDE18LNB       1017     27-01-2012 13:54     235
    KRAMPV      VSV2SH221     1017     27-01-2012 13:54     271
    KRAMPV      VSV2SH222     1017     27-01-2012 13:54     258
    KRAMPV      VSV2SH223     1017     27-01-2012 13:54     263
    KRAMPV      VSV2SH224     1017     27-01-2012 13:54     266If we retry the login with a incorrect password manually from SQLplus, after 10 login attempts the account gets locked as expected.
    The above login attempts come from three application server of which I don't know how they handle failed logins.
    Can anyone point me into a search direction as to why the account didn't lock. Just for completeness some extra info about the account and the DEFAULT profile:
    User is created with:
    CREATE USER KRAMPV
    IDENTIFIED BY VALUES 'S:123456890'
    DEFAULT TABLESPACE KRAMPVDATA
    TEMPORARY TABLESPACE TEMP
    PROFILE DEFAULT
    ACCOUNT UNLOCK;
    GRANT RESOURCE TO KRAMPV;
    GRANT CONNECT TO KRAMPV;
    ALTER USER KRAMPV DEFAULT ROLE ALL;
    GRANT CREATE MATERIALIZED VIEW TO KRAMPV;
    GRANT CREATE VIEW TO KRAMPV;
    GRANT CREATE TABLE TO KRAMPV;
    GRANT ALTER ANY MATERIALIZED VIEW TO KRAMPV;
    ALTER USER KRAMPV QUOTA UNLIMITED ON KRAMPVDATA;
    ALTER USER KRAMPV QUOTA UNLIMITED ON KRAMPVARCH;The DEFAULT profile has the following settings:
    DEFAULT     COMPOSITE_LIMIT               UNLIMITED
    DEFAULT     PASSWORD_LOCK_TIME          UNLIMITED
    DEFAULT     PASSWORD_VERIFY_FUNCTION     NULL
    DEFAULT     PASSWORD_REUSE_MAX          UNLIMITED
    DEFAULT     PASSWORD_REUSE_TIME          UNLIMITED
    DEFAULT     PASSWORD_LIFE_TIME          180
    DEFAULT     FAILED_LOGIN_ATTEMPTS          10
    DEFAULT     PRIVATE_SGA               UNLIMITED
    DEFAULT     CONNECT_TIME               UNLIMITED
    DEFAULT     IDLE_TIME               UNLIMITED
    DEFAULT     LOGICAL_READS_PER_CALL          UNLIMITED
    DEFAULT     LOGICAL_READS_PER_SESSION     UNLIMITED
    DEFAULT     CPU_PER_CALL               UNLIMITED
    DEFAULT     CPU_PER_SESSION               UNLIMITED
    DEFAULT     SESSIONS_PER_USER          UNLIMITED
    DEFAULT     PASSWORD_GRACE_TIME          7The Oracle database version is 11.2.0.3
    The OS is AIX7.1
    I've been looking on MOS, but was unable to find a clue yets
    Thanks
    FJFranken
    Edit: For the record, after I discovered the above I changed the DEFAULT profile, so the account would not unlock itself anymore. If this problem will occur in the future, maybe we can get more info as the account - if it gets locked- should stay locked now:
    alter profile default limit PASSWORD_LOCK_TIME unlimited;Edited by: fjfranken on 3-feb-2012 2:56

    Girish Sharma wrote:
    I cann't say that resource_limit is not TRUE, because you are saying "If we retry the login with a incorrect password manually from SQLplus, after 10 login attempts the account gets locked as expected.", so it means profile is working for the "KRAMPV" user.
    The interesting thing is USERHOST is changing, so another option is the listener log should also have information about the failed connection attempts.
    My another guess is duplicate user in the database i.e. one is KRAMPV and another is "krampv" (with quotation mark). Just check in dba_users that is there something like exists or not.....
    select upper(username),count(*) from dba_users group by upper(username) having count(*) > 1;
    Regards
    Girish SharmaHi Girish,
    resource_limit is set to FALSE.
    And we've tested the locking with another user, because KRAMPV is used by the application that is running and we didn't want to risk that it got locked
    USERHOST is not changing, there are 4 hosts ( application servers ) doing the same thing, so connection requests are coming from 4 hosts concurrently.
    There is luckily no duplicate user.
    Thanks anyway, we will keep investigating. I also sent the information to the application provider.
    Bye
    FJFranken

  • Password expire date back to 2011 from 2012  after assigned  a user profile

    Friends,
    I created a profile test as
    COMPOSITE_LIMIT UNLIMITED
    SESSIONS_PER_USER UNLIMITED
    CPU_PER_SESSION UNLIMITED
    CPU_PER_CALL UNLIMITED
    LOGICAL_READS_PER_SESSION UNLIMITED
    LOGICAL_READS_PER_CALL UNLIMITED
    IDLE_TIME 60
    CONNECT_TIME UNLIMITED
    PRIVATE_SGA UNLIMITED
    FAILED_LOGIN_ATTEMPTS 5
    PASSWORD_LIFE_TIME 120
    PASSWORD_REUSE_TIME           60
    PASSWORD_REUSE_MAX           30
    PASSWORD_VERIFY_FUNCTION NULL
    PASSWORD_LOCK_TIME 1
    PASSWORD_GRACE_TIME 7;
    the user default profile default PASSWORD_LIFE_TIME is 180 and password expired date is 1/7/2012. the test account was created in 7/11/2011.
    Now I assign test user to test profile successfully.
    However. expire date becomes 11/8/2011 1 from 1/7/2012 by select dba_users
    which wrong is in my profile or somewhere?
    As I think, the account password expired should be start after assigned new profile with PASSWORD_LIFE_TIME. but is seems expire date is start from original account created date.
    Thanks
    newdba
    Edited by: Oradb on May 24, 2012 1:56 PM

    I would think the expire time would be based on the last password change time which Oracle stores in the rdbms base table for user information (user$). Find a second user, alter the password, check the expire date, then assign the user to the new profile, re-check the expiration date. Post back. Behavior may vary between releases so include full Oracle version of test.
    HTH -- Mark D Powell --

  • Incorrect user profile setting after database import

    We migrateed the production databsae from Solaris running 10.2.0.3 to OEL running 10.2.0.5. The method we used is exp/imp and it seem everything fine. However, it found that some of the user profile (ie. IDLE TIME, ) limit is not the the same as the old database. It seem the user profile is not migrated successfully.
    Exp.par
    cat expPRODN_normal.par
    full=y
    direct=y
    buffer=409600000
    feedback=100000
    compress=y
    statistics=none
    consistent=n
    log=/db/oracle/exp_for_linux/expPRODN_full.log
    filesize=2000mb
    file=/db/oracle/exp_for_linux/1
    imp.par
    cat imp_PRD.par
    full=y
    buffer=409600000
    statistics=none
    log=/db/oracle/lyn/imp_PRD.log
    file=/import/PRODN/1
    In old database:
    SYS@PRODN1>select resource_name, limit from dba_profiles where profile='DEFAULT' order by resource_name;
    RESOURCE_NAME LIMIT
    COMPOSITE_LIMIT UNLIMITED
    CONNECT_TIME UNLIMITED
    CPU_PER_CALL UNLIMITED
    CPU_PER_SESSION UNLIMITED
    FAILED_LOGIN_ATTEMPTS 5
    IDLE_TIME 60
    LOGICAL_READS_PER_CALL UNLIMITED
    LOGICAL_READS_PER_SESSION UNLIMITED
    PASSWORD_GRACE_TIME UNLIMITED
    PASSWORD_LIFE_TIME UNLIMITED
    PASSWORD_LOCK_TIME UNLIMITED
    RESOURCE_NAME LIMIT
    PASSWORD_REUSE_MAX UNLIMITED
    PASSWORD_REUSE_TIME UNLIMITED
    PASSWORD_VERIFY_FUNCTION NULL
    PRIVATE_SGA UNLIMITED
    SESSIONS_PER_USER 3
    16 rows selected.
    SYS@PRODN1>
    In new database:
    sys@SPRD1> select resource_name, limit from dba_profiles where profile='DEFAULT' order by resource_name;
    RESOURCE_NAME LIMIT
    COMPOSITE_LIMIT UNLIMITED
    CONNECT_TIME UNLIMITED
    CPU_PER_CALL UNLIMITED
    CPU_PER_SESSION UNLIMITED
    FAILED_LOGIN_ATTEMPTS 10
    IDLE_TIME 60
    LOGICAL_READS_PER_CALL UNLIMITED
    LOGICAL_READS_PER_SESSION UNLIMITED
    PASSWORD_GRACE_TIME UNLIMITED
    PASSWORD_LIFE_TIME UNLIMITED
    PASSWORD_LOCK_TIME UNLIMITED
    RESOURCE_NAME LIMIT
    PASSWORD_REUSE_MAX UNLIMITED
    PASSWORD_REUSE_TIME UNLIMITED
    PASSWORD_VERIFY_FUNCTION NULL
    PRIVATE_SGA UNLIMITED
    SESSIONS_PER_USER UNLIMITED
    16 rows selected.
    sys@OIMSPRD1>
    You can see limit value of FAILED_LOGIN_ATTEMPTS, IDLE_TIME and SESSIONS_PER_USER are different.

    It is not a user profile, but the default one which already exist by default in the database and not overwritten when importing.
    By the way, IDLE_TIME is same on both sides.
    Nicolas.

  • How to set database user password to never expire

    Hello all,
    I have a linux server with Oracle 11g installed which is used primarily for testing by a few developers and QA folks. I want to set the DB user password to never expire. I have run the following (which works on a windows machine) but the password still states that it will expire in 7 days. Is there something else I can do to 'force' the pw to infinity? I've tried stopping shutting down the DB, stopping / restarting listener...
    ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
    select * from dba_profiles where profile = 'DEFAULT' and resource_name LIKE 'PASSWORD_LIFE_TIME';
    "PROFILE"     "RESOURCE_NAME"     "RESOURCE_TYPE"     "LIMIT"
    "DEFAULT"     "PASSWORD_LIFE_TIME"     "PASSWORD"     "UNLIMITED"
    select profile from dba_users where username='TEST';
    "PROFILE"
    "DEFAULT"
    select username, account_status, to_char(expiry_date, 'DD-MM-YYYY') EXP_DATE from dba_users where username = 'TEST';
    "USERNAME"     "ACCOUNT_STATUS"     "EXP_DATE"
    "TEST"     "OPEN"     ""
    Help appreciated.

    With 11g, Password_life_time in DEFAULT profile is set to 180days.
    Default profile values in 11g.
    SQL> SELECT * FROM dba_profiles WHERE profile = 'DEFAULT' AND resource_type = 'PASSWORD';
    PROFILE                        RESOURCE_NAME                    RESOURCE
    LIMIT
    DEFAULT                        FAILED_LOGIN_ATTEMPTS            PASSWORD
    10
    DEFAULT                        PASSWORD_LIFE_TIME               PASSWORD
    180
    DEFAULT                        PASSWORD_REUSE_TIME              PASSWORD
    UNLIMITED
    PROFILE                        RESOURCE_NAME                    RESOURCE
    LIMIT
    DEFAULT                        PASSWORD_REUSE_MAX               PASSWORD
    UNLIMITED
    DEFAULT                        PASSWORD_VERIFY_FUNCTION         PASSWORD
    NULL
    DEFAULT                        PASSWORD_LOCK_TIME               PASSWORD
    1
    PROFILE                        RESOURCE_NAME                    RESOURCE
    LIMIT
    DEFAULT                        PASSWORD_GRACE_TIME              PASSWORD
    7
    7 rows selected.Change the password_grace_time to unlimited.
    HTH
    -Anantha

  • Abcdef

    to_date('03-23-2010','mm-dd-yyyy')
    to_date('2008-06-08','yyyy-mm-dd')
    DBMS_OUTPUT.PUT_LINE(' 4th Where clause: ' || WHERE_CLAUSE);
    HKey_Local Machine -> Software -> Microsoft -> MSLicensing
    topas
    Removing batch of Files in linux:
    =====================================
    find . -name "*.arc" -mtime +20 -exec rm -f {} \;
    find . -name "*.dbf" -mtime +60 -exec mv {} /backup/Arch_Bkp_02May11/ \;
    ALTER DATABASE
    SET STANDBY DATABASE TO MAXIMIZE {AVAILABILITY | PERFORMANCE | PROTECTION};
    ================================================================================
    Find top N records:
    ===================
    select * from (select ename from emp order by sal)
    where rownum <=n;
    Find top Nth record: (n=0 for 1st highest)
    =========================================
    select * from emp a
    where (n =
    (select count(distinct b.sal) from emp b
    where b.sal > a.sal));
    Query for Listing last n records from the table
    =================================================
    select * from (select * from emp order by rownum desc) where rownum<4
    HOW TO tablespace wise and file wise info
    ============================
    col file_name for a45
    col tablespace_name for a15
    set linesize 132
    select a.tablespace_name,a.file_name,a.AUTOEXTENSIBLE,----a.status,
    round(a.bytes/1024/1024,2) Total_MB,
    round(sum(b.bytes)/1024/1024,2) Free_MB,
    round((a.bytes/1024/1024 - sum(b.bytes)/1024/1024),2) Used_MB
    from dba_data_files a,dba_free_space b
    where a.file_id=b.file_id
    and a.tablespace_name=b.tablespace_name
    group by a.tablespace_name,b.file_id,a.file_name,a.bytes,a.AUTOEXTENSIBLE--,a.status
    order by tablespace_name;
    col tablespace_name for a15
    SELECT tablespace_name,ts_#,num_files,sum_free_mbytes,count_blocks,max_mbytes,
    sum_alloc_mbytes,DECODE(sum_alloc_mbytes,0,0,100 * sum_free_mbytes /sum_alloc_mbytes ) AS pct_free
    FROM (SELECT v.name AS tablespace_name,ts# AS ts_#,
    NVL(SUM(bytes)/1048576,0) AS sum_alloc_mbytes,
    NVL(COUNT(file_name),0) AS num_files
    FROM dba_data_files f,v$tablespace v
    WHERE v.name = f.tablespace_name (+)
    GROUP BY v.name,ts#),
    (SELECT v.name AS fs_ts_name,ts#,NVL(MAX(bytes)/1048576,0) AS max_mbytes,
    NVL(COUNT(BLOCKS) ,0) AS count_blocks,
    NVL(SUM(bytes)/1048576,0) AS sum_free_mbytes
    FROM dba_free_space f,v$tablespace v
    WHERE v.name = f.tablespace_name(+)
    GROUP BY v.name,ts#)
    WHERE tablespace_name = fs_ts_name
    ORDER BY tablespace_name;
    ==================================
    col file_name for a45
    col tablespace_name for a15
    set linesize 132
    select a.tablespace_name,a.file_name,a.AUTOEXTENSIBLE,----a.status,
    round(a.bytes/1024/1024,2) Total_MB,
    round(sum(b.bytes)/1024/1024,2) Free_MB,
    round((a.bytes/1024/1024 - sum(b.bytes)/1024/1024),2) Used_MB
    from dba_data_files a,dba_free_space b
    where a.file_id=b.file_id
    and a.tablespace_name=b.tablespace_name
    group by a.tablespace_name,b.file_id,a.file_name,a.bytes,a.AUTOEXTENSIBLE--,a.status
    order by file_name;
    =============================================================
    HOW TO FIND CHILD TABLES
    ===========================================
    col column_name for a30
    col owner for a10
    set linesize 132
    select --a.table_name parent_table,
    b.owner,
    b.table_name child_table
    , a.constraint_name , b.constraint_name
    from dba_constraints a ,dba_constraints b
    where a.owner='LEIQA20091118'
    and a.constraint_name = b.r_constraint_name
    --and b.constraint_type = 'R'
    and a.constraint_type IN ('P','U')
    and a.table_name =upper('&tabname');
    List foreign keys and referenced table and columns:
    ======================================================
    SELECT DECODE(c.status,'ENABLED','C','c') t,
    SUBSTR(c.constraint_name,1,31) relation,
    SUBSTR(cc.column_name,1,24) columnname,
    SUBSTR(p.table_name,1,20) tablename
    FROM user_cons_columns cc, user_constraints p,
    user_constraints c
    WHERE c.table_name = upper('&table_name')
    AND c.constraint_type = 'R'
    AND p.constraint_name = c.r_constraint_name
    AND cc.constraint_name = c.constraint_name
    AND cc.table_name = c.table_name
    UNION ALL
    SELECT DECODE(c.status,'ENABLED','P','p') t,
    SUBSTR(c.constraint_name,1,31) relation,
    SUBSTR(cc.column_name,1,24) columnname,
    SUBSTR(c.table_name,1,20) tablename
    FROM user_cons_columns cc, user_constraints p,
    user_constraints c
    WHERE p.table_name = upper('PERSON')
    AND p.constraint_type in ('P','U')
    AND c.r_constraint_name = p.constraint_name
    AND c.constraint_type = 'R'
    AND cc.constraint_name = c.constraint_name
    AND cc.table_name = c.table_name
    ORDER BY 1, 4, 2, 3
    List a child table's referential constraints and their associated parent table:
    ==============================================================
    SELECT t.owner CHILD_OWNER,
    t.table_name CHILD_TABLE,
    t.constraint_name FOREIGN_KEY_NAME,
    r.owner PARENT_OWNER,
    r.table_name PARENT_TABLE,
    r.constraint_name PARENT_CONSTRAINT
    FROM user_constraints t, user_constraints r
    WHERE t.r_constraint_name = r.constraint_name
    AND t.r_owner = r.owner
    AND t.constraint_type='R'
    AND t.table_name = <child_table_name>;
    parent tables:
    ================
    select constraint_name,constraint_type,r_constraint_name
    from dba_constraints
    where table_name ='TM_PAY_BILL'
    and constraint_type in ('R');
    select CONSTRAINT_NAME,TABLE_NAME,COLUMN_NAME from user_cons_columns where table_name='FS_FR_TERMINALLOCATION';
    select a.OWNER,a.TABLE_NAME,a.CONSTRAINT_NAME,a.CONSTRAINT_TYPE
    ,b.COLUMN_NAME,b.POSITION
    from dba_constraints a,dba_cons_columns b
    where a.CONSTRAINT_NAME=b.CONSTRAINT_NAME
    and a.TABLE_NAME=b.TABLE_NAME
    and a.table_name=upper('TM_GEN_INSTRUCTION')
    and a.constraint_type in ('P','U');
    select constraint_name,constraint_type,r_constraint_name
    from dba_constraints
    where table_name ='TM_PAY_BILL'
    and constraint_type in ('R');
    ===============================================
    HOW TO FIND INDEXES
    =====================================
    col column_name for a30
    col owner for a25
    select a.owner,a.index_name, --a.table_name,a.tablespace_name,
    b.column_name,b.column_position
    from dba_indexes a,dba_ind_columns b
    where a.owner='SCE'
    and a.index_name=b.index_name
    and a.table_name = upper('&tabname')
    order by a.index_name,b.column_position;
    col column_name for a40
    col index_owner for a15
    select index_owner,index_name,column_name,
    column_position from dba_ind_columns
    where table_owner= upper('VISILOGQA19') and table_name ='TBLTRANSACTIONGROUPMAIN';
    -- check for index on FK
    ===============================
    set linesize 121
    col status format a6
    col columns format a30 word_wrapped
    col table_name format a30 word_wrapped
    SELECT DECODE(b.table_name, NULL, 'Not Indexed', 'Indexed' ) STATUS, a.table_name, a.columns, b.columns from (
    SELECT SUBSTR(a.table_name,1,30) table_name,
    SUBSTR(a.constraint_name,1,30) constraint_name, MAX(DECODE(position, 1,
    SUBSTR(column_name,1,30),NULL)) || MAX(DECODE(position, 2,', '|| SUBSTR(column_name,1,30),NULL)) || max(DECODE(position, 3,', '|| SUBSTR(column_name,1,30),NULL)) || max(DECODE(position, 4,', '|| SUBSTR(column_name,1,30),NULL)) || max(DECODE(position, 5,', '|| SUBSTR(column_name,1,30),NULL)) || max(DECODE(position, 6,', '|| SUBSTR(column_name,1,30),NULL)) || max(DECODE(position, 7,', '|| SUBSTR(column_name,1,30),NULL)) || max(DECODE(position, 8,', '|| SUBSTR(column_name,1,30),NULL)) || max(DECODE(position, 9,', '|| SUBSTR(column_name,1,30),NULL)) || max(DECODE(position,10,', '|| SUBSTR(column_name,1,30),NULL)) || max(DECODE(position,11,', '|| SUBSTR(column_name,1,30),NULL)) || max(DECODE(position,12,', '|| SUBSTR(column_name,1,30),NULL)) || max(DECODE(position,13,', '|| SUBSTR(column_name,1,30),NULL)) || max(DECODE(position,14,', '|| SUBSTR(column_name,1,30),NULL)) || max(DECODE(position,15,', '|| SUBSTR(column_name,1,30),NULL)) || max(DECODE(position,16,', '|| SUBSTR(column_name,1,30),NULL)) columns
    from user_cons_columns a, user_constraints b
    WHERE a.constraint_name = b.constraint_name
    AND constraint_type = 'R'
    GROUP BY SUBSTR(a.table_name,1,30), SUBSTR(a.constraint_name,1,30) ) a, (
    SELECT SUBSTR(table_name,1,30) table_name,
    SUBSTR(index_name,1,30) index_name, MAX(DECODE(column_position, 1,
    SUBSTR(column_name,1,30),NULL)) || MAX(DECODE(column_position, 2,', '||SUBSTR(column_name,1,30),NULL)) || max(DECODE(column_position, 3,', '||SUBSTR(column_name,1,30),NULL)) || max(DECODE(column_position, 4,', '||SUBSTR(column_name,1,30),NULL)) || max(DECODE(column_position, 5,', '||SUBSTR(column_name,1,30),NULL)) || max(DECODE(column_position, 6,', '||SUBSTR(column_name,1,30),NULL)) || max(DECODE(column_position, 7,', '||SUBSTR(column_name,1,30),NULL)) || max(DECODE(column_position, 8,', '||SUBSTR(column_name,1,30),NULL)) || max(DECODE(column_position, 9,', '||SUBSTR(column_name,1,30),NULL)) || max(DECODE(column_position,10,', '||SUBSTR(column_name,1,30),NULL)) || max(DECODE(column_position,11,', '||SUBSTR(column_name,1,30),NULL)) || max(DECODE(column_position,12,', '||SUBSTR(column_name,1,30),NULL)) || max(DECODE(column_position,13,', '||SUBSTR(column_name,1,30),NULL)) || max(DECODE(column_position,14,', '||SUBSTR(column_name,1,30),NULL)) || max(DECODE(column_position,15,', '||SUBSTR(column_name,1,30),NULL)) || max(DECODE(column_position,16,', '||SUBSTR(column_name,1,30),NULL)) columns
    from user_ind_columns group by SUBSTR(table_name,1,30), SUBSTR(index_name,1,30) ) b
    where a.table_name = b.table_name (+) and b.columns (+) like a.columns || '%';
    ==================================================
    HOW TO FIND unique keys
    ===========================
    col column_name for a30
    col owner for a10
    set linesize 132
    select a.owner , --a.table_name,
    a.constraint_name,a.constraint_type,
    b.column_name,b.position
    from dba_constraints a, dba_cons_columns b
    where a.table_name = upper('&tabname')
    and a.constraint_name = b.constraint_name
    and a.constraint_type in ('P','U')
    and a.owner=b.owner
    order by a.owner,a.constraint_name,b.position;
    ==================================
    HOW TO FIND ROWlocks
    ======================
    col object_name for a30
    col terminal for a20
    set linesize 1000
    col spid for a10
    col osuser for a15
    select to_char(logon_time,'DD-MON-YYYY HH24:MI:SS'),OSUSER,--owner,
    s.sid, s.serial#,p.spid,
    s.terminal,l.locked_mode,o.object_name,l.ORACLE_USERNAME --,o.object_type
    from v$session s, dba_objects o,v$locked_object l, V$process p
    where o.object_id=l.object_id
    and s.sid=l.session_id
    and s.paddr=p.addr
    order by logon_time;
    SELECT OWNER||'.'||OBJECT_NAME AS Object, OS_USER_NAME, ORACLE_USERNAME,
    PROGRAM, NVL(lockwait,'ACTIVE') AS Lockwait,DECODE(LOCKED_MODE, 2,
    'ROW SHARE', 3, 'ROW EXCLUSIVE', 4, 'SHARE', 5,'SHARE ROW EXCLUSIVE',
    6, 'EXCLUSIVE', 'UNKNOWN') AS Locked_mode, OBJECT_TYPE, SESSION_ID, SERIAL#, c.SID
    FROM SYS.V_$LOCKED_OBJECT A, SYS.ALL_OBJECTS B, SYS.V_$SESSION c
    WHERE A.OBJECT_ID = B.OBJECT_ID AND C.SID = A.SESSION_ID
    ORDER BY Object ASC, lockwait DESC;
    SELECT DECODE(request,0,'Holder: ','Waiter: ')||sid sess,
    id1, id2, lmode, request, type
    FROM V$LOCK
    WHERE (id1, id2, type) IN
    (SELECT id1, id2, type FROM V$LOCK WHERE request>0)
    ORDER BY id1, request;
    find locks
    =====================
    set linesize 1000
    SELECT --osuser,
    a.username,a.serial#,a.sid,--a.terminal,
    sql_text
    from v$session a, v$sqltext b, V$process p
    where a.sql_address =b.address
    and a.paddr = p.addr
    and p.spid = '&os_pid'
    order by address, piece;
    select sql_text
    from V$sqltext_with_newlines
    where address =
    (select prev_sql_addr
    from V$session
    where username = :uname and sid = :snum) ORDER BY piece
    set pagesize 50000
    set linesize 30000
    set long 500000
    set head off
    select s.username su,s.sid,s.serial#,substr(sa.sql_text,1,540) txt
    from v$process p,v$session s,v$sqlarea sa
    where p.addr=s.paddr
    and s.username is not null
    and s.sql_address=sa.address(+)
    and s.sql_hash_value=sa.hash_value(+)
    and spid=&SPID;
    privileges
    ===========
    select * from dba_sys_privs where grantee = 'SCE';
    select * from dba_role_privs where grantee = 'SCE'
    select * from dba_sys_privs where grantee in ('CONNECT','APPL_CONNECT');
    Check high_water_mark_statistics
    ===================================
    select * from DBA_HIGH_WATER_MARK_STATISTICS;
    Multiple Blocksizes:
    =========================
    alter system set db_16k_cache_size=64m;
    create tablespace index_ts datafile '/data1/index_ts01.dbf' size 10240m blocksize 16384;
    11g default profiles:
    ========================
    alter profile default limit password_lock_time unlimited;
    alter profile default limit password_life_time unlimited;
    alter profile default limit password_grace_time unlimited;
    logfile switch over:
    select GROUP#,THREAD#,SEQUENCE#,BYTES,MEMBERS,ARCHIVED,
    STATUS,to_char(FIRST_TIME,'DD-MON-YYYY HH24:MI:SS') switch_time
    from v$log;
    Temporary tablespace usage:
    ============================
    SELECT b.tablespace,
    ROUND(((b.blocks*p.value)/1024/1024),2)||'M' "SIZE",
    a.sid||','||a.serial# SID_SERIAL,
    a.username,
    a.program
    FROM sys.v_$session a,
    sys.v_$sort_usage b,
    sys.v_$parameter p
    WHERE p.name = 'db_block_size'
    AND a.saddr = b.session_addr
    ORDER BY b.tablespace, b.blocks;
    SELECT A2.TABLESPACE, A2.SEGFILE#, A2.SEGBLK#, A2.BLOCKS,
    A1.SID, A1.SERIAL#, A1.USERNAME, A1.OSUSER, A1.STATUS
    FROM V$SESSION A1,V$SORT_USAGE A2 WHERE A1.SADDR = A2.SESSION_ADDR;
    ========================================
    ALTER SYSTEM KILL SESSION 'SID,SERIAL#';
    Inactive sessions killing:
    SELECT 'ALTER SYSTEM KILL SESSION ' || '''' || SID || ',' ||
    serial# || '''' || ' immediate;' text
    FROM v$session
    WHERE status = 'INACTIVE'
    AND last_call_et > 86400
    AND username IN (SELECT username FROM DBA_USERS WHERE user_id>56);
    Procedure:
    CREATE OR REPLACE PROCEDURE Inactive_Session_Cleanup AS
    BEGIN
    FOR rec_session IN (SELECT 'ALTER SYSTEM KILL SESSION ' || '''' || SID || ',' ||
    serial# || '''' || ' immediate' text
    FROM v$session
    WHERE status = 'INACTIVE'
    AND last_call_et > 43200
    AND username IN (SELECT username FROM DBA_USERS WHERE user_id>60)) LOOP
    EXECUTE IMMEDIATE rec_session.text;
    END LOOP;
    END Inactive_Session_Cleanup;
    sequence using plsql
    =========================
    Declare
    v_next NUMBER;
    script varchar2(5000);
    BEGIN
    SELECT (MAX(et.dcs_code) + 1) INTO v_next FROM et_document_request et;
    script:= 'CREATE SEQUENCE et_document_request_seq
    MINVALUE 1 MAXVALUE 999999999999999999999999999 START WITH '||
         v_next || ' INCREMENT BY 1 CACHE 20';
    execute immediate script;
    end;
    ===========================
    Terminal wise session
    select TERMINAL,count(*) from v$session
    group by TERMINAL;
    total sessions
    select count(*) from v$session
    where TERMINAL not like '%UNKNOWN%'
    and TERMINAL is not null;
    HOW TO FIND DUPLICATE TOKEN NUMBERS
    ===========================================
    select count(distinct a.token_number) dup
    from tm_pen_bill a,tm_pen_bill b
    where a.token_number = b.token_number
    and a.bill_number <> b.bill_number
    and a.token_number is not null;
    when Block Corruption occurs:
    select * from DBA_EXTENTS
    WHERE file_id = '13' AND block_id BETWEEN '44157' and '50649';
    select BLOCK_ID,SEGMENT_NAME,BLOCKS from dba_extents where FILE_ID='14'
    and BLOCK_ID like '%171%';
    select BLOCK_ID,SEGMENT_NAME,BLOCKS from dba_extents where FILE_ID='14'
    and SEGMENT_NAME = 'TEMP_TD_PAY_ALLOTMENT_NMC';
    DBVERIFY:
    dbv blocksize=8192 file=users01.dbf log=dbv_users01.log
    ==============================================================
    DBMS_REPAIR:(Block Corruption)
    exec dbms_repair.admin_tables(table_name=>'REPAIR_TABLE',table_type=>dbms_repair.repair_table,action=>dbms_repair.create_action,tablespace=>'USERS');
    variable v_corrupt_count number;
    exec dbms_repair.check_object('scott','emp',corrupt_count=>:v_corrupt_count);
    print v_corrupt_count;
    ==============================================================
    Password:
    select login,substr(utl_raw.cast_to_varchar2(utl_raw.cast_to_varchar2(password)),1,30) password
    from mm_gen_user where active_flag = 'Y' and user_id=64 and LOGIN='GOPAL' ;
    CHARACTERSET
    select * from NLS_DATABASE_PARAMETERS;
    SELECT value$ FROM sys.props$ WHERE name = 'NLS_CHARACTERSET' ;
    select value from nls_database_parameters where parameter='NLS_CHARACTERSET';
    ==========================================================
    EXPLAIN PLAN TABLE QUERY
    ========================
    EXPLAIN PLAN SET STATEMENT_ID='5'
    FOR
    "DML STATEMENT"
    PLAN TABLE QUERY
    ===============================
    set linesize 1000
    set arraysize 1000
    col OBJECT_TYPE for a20
    col OPTIMIZER for a20
    col object_name for a30
    col options for a25
    select COST,OPERATION,OPTIONS,OBJECT_TYPE,
    OBJECT_NAME,OPTIMIZER
    --,ID,PARENT_ID,POSITION,CARDINALITY
    from plan_table
    where statement_id='&statement_id';
    Rman settings: disk formats
    %t represents a timestamp
    %s represents the backup set number
    %p represents the piece number
    The dbms_workload_repository.create_snapshot procedure creates a manual snapshot in the AWR as seen in this example:
    EXEC dbms_workload_repository.create_snapshot;
    Calculation of a table the size of the space occupied by
    ========================================================
    select owner, table_name,
    NUM_ROWS,
    BLOCKS * AAA/1024/1024 "Size M",
    EMPTY_BLOCKS,
    LAST_ANALYZED
    from dba_tables
    where table_name = 'XXX';
    Finding statement/s which use lots of shared pool memory:
    ==========================================================
    SELECT substr(sql_text,1,40) "SQL", count(*) , sum(executions) "TotExecs"
    FROM v$sqlarea
    WHERE executions < 5
    GROUP BY substr(sql_text,1,40)
    HAVING count(*) > 30
    ORDER BY 2;
    See a table size table
    =========================================
    select sum (bytes) / (1024 * 1024) as "size (M)" from user_segments
    where segment_name = upper ('& table_name');
    See a index size table
    =========================================
    select sum (bytes) / (1024 * 1024) as "size (M)" from user_segments
    where segment_name = upper ('& index_name');
    monitoring table space I / O ratio
    ====================================
    select B.tablespace_name name, B.file_name "file", A.phyrds pyr,
    A.phyblkrd pbr, A.phywrts pyw, A.phyblkwrt pbw
    from v $ filestat A, dba_data_files B
    where A.file # = B.file_id
    order by B.tablespace_name;
    monitor the file system I / O ratio
    =====================================
    select substr (C.file #, 1,2) "#", substr (C.name, 1,30) "Name",
    C.status, C.bytes, D.phyrds, D.phywrts
    from v $ datafile C, v $ filestat D
    where C.file # = D.file #;
    the hit rate monitor SGA
    =========================
    select a.value + b.value "logical_reads", c.value "phys_reads",
    round (100 * ((a.value + b.value)-c.value) / (a.value + b.value)) "BUFFER HIT RATIO"
    from v $ sysstat a, v $ sysstat b, v $ sysstat c
    where a.statistic # = 38 and b.statistic # = 39
    and c.statistic # = 40;
    monitoring SGA in the dictionary buffer hit ratio
    ==================================================
    select parameter, gets, Getmisses, getmisses / (gets + getmisses) * 100 "miss ratio",
    (1 - (sum (getmisses) / (sum (gets) + sum (getmisses ))))* 100 "Hit ratio"
    from v $ rowcache
    where gets + getmisses <> 0
    group by parameter, gets, getmisses;
    monitoring SGA shared cache hit ratio should be less than 1%
    =============================================================
    select sum (pins) "Total Pins", sum (reloads) "Total Reloads",
    sum (reloads) / sum (pins) * 100 libcache
    from v $ librarycache;
    select sum (pinhits-reloads) / sum (pins) "hit radio", sum (reloads) / sum (pins) "reload percent"
    from v $ librarycache;
    monitoring SGA in the redo log buffer hit ratio should be less than 1%
    =========================================================================
    SELECT name, gets, misses, immediate_gets, immediate_misses,
    Decode (gets, 0,0, misses / gets * 100) ratio1,
    Decode (immediate_gets + immediate_misses, 0,0,
    immediate_misses / (immediate_gets + immediate_misses) * 100) ratio2
    FROM v $ latch WHERE name IN ('redo allocation', 'redo copy');
    control memory and hard disk sort ratio, it is best to make it smaller than .10, an increase sort_area_size
    =============================================================================================================
    SELECT name, value FROM v$sysstat WHERE name IN ('sorts (memory)', 'sorts (disk)');
    monitoring what the current database who are running SQL statements?
    ===================================================================
    SELECT osuser, username, sql_text from v $ session a, v $ sqltext b
    where a.sql_address = b.address order by address, piece;
    monitoring the dictionary buffer?
    =====================================
    SELECT (SUM (PINS - RELOADS)) / SUM (PINS) "LIB CACHE" FROM V $ LIBRARYCACHE;
    SELECT (SUM (GETS - GETMISSES - USAGE - FIXED)) / SUM (GETS) "ROW CACHE" FROM V $ ROWCACHE;
    SELECT SUM (PINS) "EXECUTIONS", SUM (RELOADS) "CACHE MISSES WHILE EXECUTING" FROM V $ LIBRARYCACHE;
    The latter divided by the former, this ratio is less than 1%, close to 0% as well.
    SELECT SUM (GETS) "DICTIONARY GETS", SUM (GETMISSES) "DICTIONARY CACHE GET MISSES"
    FROM V $ ROWCACHE
    see the table a high degree of fragmentation?
    =================================================
    SELECT owner,segment_name table_name, COUNT (*) extents
    FROM dba_segments WHERE owner NOT IN ('SYS', 'SYSTEM') GROUP BY owner,segment_name
    HAVING COUNT (*) = (SELECT MAX (COUNT (*)) FROM dba_segments GROUP BY segment_name);
    =======================================================================
    Fragmentation:
    =================
    select table_name,round((blocks*8),2)||'kb' "size"
    from user_tables
    where table_name = 'BIG1';
    Actual Data:
    =============
    select table_name,round((num_rows*avg_row_len/1024),2)||'kb' "size"
    from user_tables
    where table_name = 'BIG1';
    The establishment of an example data dictionary view to 8I
    =======================================================
    $ ORACLE_HOME / RDBMS / ADMIN / CATALOG.SQL
    The establishment of audit data dictionary view with an example to 8I
    ======================================================
    $ ORACLE_HOME / RDBMS / ADMIN / CATAUDIT.SQL
    To establish a snapshot view using the data dictionary to 8I Case
    =====================================================
    $ ORACLE_HOME / RDBMS / ADMIN / CATSNAP.SQL
    The table / index moving table space
    =======================================
    ALTER TABLE TABLE_NAME MOVE TABLESPACE_NAME;
    ALTER INDEX INDEX_NAME REBUILD TABLESPACE TABLESPACE_NAME;
    How can I know the system's current SCN number?
    =================================================
    select max (ktuxescnw * power (2, 32) + ktuxescnb) from x$ktuxe;
    Will keep a small table into the pool
    ======================================
    alter table xxx storage (buffer_pool keep);
    Check the permissions for each user
    ===================================
    SELECT * FROM DBA_SYS_PRIVS;
    =====================================================================
    Tablespace auto extend check:
    =================================
    col file_name for a50
    select FILE_NAME,TABLESPACE_NAME,AUTOEXTENSIBLE from dba_data_files
    order by TABLESPACE_NAME;
    COL SEGMENT_NAME FOR A30
    select SEGMENT_NAME,TABLESPACE_NAME,BYTES,EXTENTS,INITIAL_EXTENT,
    NEXT_EXTENT,MAX_EXTENTS,PCT_INCREASE
    from user_segments
    where segment_name in ('TD_PAY_CHEQUE_PREPARED','TM_PAY_BILL','TD_PAY_PAYORDER');
    select TABLESPACE_NAME,INITIAL_EXTENT,NEXT_EXTENT,MAX_EXTENTS,PCT_INCREASE
    from dba_tablespaces;
    alter tablespace temp default storage(next 5m maxextents 20480 pctincrease 0);
    ALTER TABLE TD_PAY_CHEQUE_PREPARED
    default STORAGE ( NEXT 10 M maxextents 20480 pctincrease 0);
    Moving table from one tablespace to another
    ===============================================
    alter table KHAJANE.TEMP_TM_PAY_ALLOTMENT_NMC move tablespace khajane_ts;
    ==============================================
    for moving datafiles location:
    ========================================
    alter database rename file a to b;
    ======================================================================
    for logfile Clearence:
    select * from global_name;
    col member for a50
    set linesize 132
    set trimspool on
    select 'alter database clear logfile ' || '''' || member || '''' || ';'
    from v$logfile where status ='STALE';
    logfile switch over:
    select GROUP#,THREAD#,SEQUENCE#,BYTES,MEMBERS,ARCHIVED,
    STATUS,to_char(FIRST_TIME,'DD-MON-YYYY HH24:MI:SS') switch_time
    from v$log;

    Answered

  • Oracle user account is getting locked frequently

    Hi everyone!!!
    I am using Oracle 11g on Linux . I have user named "XXX" to whom I have assigned a DEFAULT profile. The Password parameters in DEFAULT profile are as follow.
    Resource Name                                      Resource                                 Limit
    FAILED_LOGIN_ATTEMPTS                    PASSWORD                            20
    PASSWORD_LIFE_TIME                        PASSWORD                            UNLIMITED
    PASSWORD_LOCK_TIME                      PASSWORD                           UNLIMITED
    PASSWORD_REUSE_TIME                   PASSWORD                            UNLIMITED
    PASSWORD_REUSE_MAX                   PASSWORD                             UNLIMITED
    I don't know why my user is getting locked continuously. Even i haven't reached Failed_login_attempts (20). Each time I require to unlock user account as SYS user and then I can connect as XXX user.
    And another thing that I want to know is when user account's status is set to LOCKED, EXPIRED, EXPIRED & LOCKED and LOCKED(TIME).
    Thanks & Regards
    Tushar Lapani

    Hi,
    can you tell me the exact db version?
    As explained in MOS notes:
    DBA_USERS.ACCOUNT_STATUS shows LOCKED after FAILED_LOGIN_ATTEMPTS Is Breached (Doc ID 284344.1)
    How to Interpret the ACCOUNT_STATUS Column in DBA_USERS (Doc ID 260111.1)
    Expected behaviour is:
    1. Oracle release is <= 11.1.0.7.
    DBA_USERS.ACCOUNT_STATUS = LOCKED(TIMED) whenever the number of failed login attempts is > FAILED_LOGIN_ATTEMPTS
    2. Oracle release is >= 11.2 and PASSWORD_LOCK_TIME = unlimited:
    DBA_USERS.ACCOUNT_STATUS = LOCKED whenever the number of failed login attempts is > FAILED_LOGIN_ATTEMPTS
    3. Oracle release is >= 11.2 and PASSWORD_LOCK_TIME = <some fix value>
    DBA_USERS.ACCOUNT_STATUS = LOCKED(TIMED) whenever the number of failed login attempts is > FAILED_LOGIN_ATTEMPTS
    Note
    that 10.2.0.5 displays the same behavior as 11.2, because the fix that  changed the behavior in 11.2 was introduced in 10.2.0.5.
    So I suggest you to follow MOS note
    Finding the source of failed login attempts. (Doc ID 352389.1)
    to find who locked the account.
    Ombretta

  • Oracle - User Locked. URGENT

    Hi
    I have just changed the password for one of the user on my Database.
    In the meantime a lot many requests hit database with that user with the old password and the account is now locked.
    I have UNLOCKED the user with below command: -
    ALTER USER omuser identified by omusernew ACCOUNT UNLOCK;
    but still I am unable to connect to this schema (omuser)
    Can anyone please help me out in resolving this?
    Below are the DEFAULT Profile details: -
    select resource_name, resource_type, limit
    from dba_profiles
    where profile='DEFAULT';
    RESOURCE_NAME     RESOURCE_TYPE     LIMIT
    COMPOSITE_LIMIT     KERNEL     UNLIMITED
    SESSIONS_PER_USER     KERNEL     UNLIMITED
    CPU_PER_SESSION     KERNEL     UNLIMITED
    CPU_PER_CALL     KERNEL     UNLIMITED
    LOGICAL_READS_PER_SESSION     KERNEL     UNLIMITED
    LOGICAL_READS_PER_CALL     KERNEL     UNLIMITED
    IDLE_TIME     KERNEL     UNLIMITED
    CONNECT_TIME     KERNEL     UNLIMITED
    PRIVATE_SGA     KERNEL     UNLIMITED
    FAILED_LOGIN_ATTEMPTS     PASSWORD     10
    PASSWORD_LIFE_TIME     PASSWORD     UNLIMITED
    PASSWORD_REUSE_TIME     PASSWORD     UNLIMITED
    PASSWORD_REUSE_MAX     PASSWORD     UNLIMITED
    PASSWORD_VERIFY_FUNCTION     PASSWORD     NULL
    PASSWORD_LOCK_TIME     PASSWORD     UNLIMITED
    PASSWORD_GRACE_TIME     PASSWORD     UNLIMITED

    I cannot restart this DB.
    One thing that I have noticed is that LOCK_DATE in DBA_USERS changes
    everytime I fire ALTER USER OMUSER IDENTIFIED BY OMUSERNEW ACCOUNT UNLOCK.You probably have a stray script somewhere; a temporal work around would be to create a different profile and tie you application user to the new profile.
    CREATE PROFILE APPUSR_DEFAULT LIMIT
    COMPOSITE_LIMIT UNLIMITED
    SESSIONS_PER_USER UNLIMITED
    CPU_PER_SESSION UNLIMITED
    CPU_PER_CALL UNLIMITED
    LOGICAL_READS_PER_SESSION UNLIMITED
    LOGICAL_READS_PER_CALL UNLIMITED
    IDLE_TIME UNLIMITED
    CONNECT_TIME UNLIMITED
    PRIVATE_SGA UNLIMITED
    FAILED_LOGIN_ATTEMPTS UNLIMITED
    PASSWORD_LIFE_TIME UNLIMITED
    PASSWORD_REUSE_TIME UNLIMITED
    PASSWORD_REUSE_MAX UNLIMITED
    PASSWORD_VERIFY_FUNCTION NULL
    PASSWORD_LOCK_TIME UNLIMITED
    PASSWORD_GRACE_TIME UNLIMITED;
    ALTER USER omuser PROFILE appusr_default;
    ALTER USER omuser ACCOUNT UNLOCK;Take note of the "FAILED_LOGIN_ATTEMPTS UNLIMITED"
    Regards,
    Phiri
    Edited by: phiri on 19-Mar-2010 05:22

  • Spooling out profile that are not being used

    hi guys,
    is there anyway to spool out those profile that are not in used or assigned to any username or roles?

    flaskvacuum wrote:
    hi guys,
    is there anyway to spool out those profile that are not in used or assigned to any username or roles?
    SQL> CREATE PROFILE test LIMIT
      2     FAILED_LOGIN_ATTEMPTS 5
      3     PASSWORD_LIFE_TIME 60
      4     PASSWORD_REUSE_TIME 60
      5     PASSWORD_REUSE_MAX 5
      6     PASSWORD_VERIFY_FUNCTION null
      7     PASSWORD_LOCK_TIME 1/24
      8     PASSWORD_GRACE_TIME 10;
    Profile created.
    -- Created but not assigned --
    SQL> select distinct profile from dba_profiles where profile not in (select profile from dba_users);
    PROFILE
    TEST
    SQL>

Maybe you are looking for

  • Audio is unsynced after encoding

    I couldn't find help after a forum search, so I thought I'd ask here... When I use the Media Encoder, I find that when I convert my footage -- Quicktime Video/wav 24-bit audio -- into MPEG2 video/MPEG 16-bit audio, the audio is unsynced. Any suggesti

  • Error 1856 message since upgrading Quicktime Feb 2014.

    Tried running as admin as per some forum discussions about this problem but no luck.  I haveWindows 7 64bit.  The problem only started after I downloaded new version of Quicktime in February 2014.

  • Queries in Production for Business Users

    Hello fellow SAP Security Colleagues, I am familiar with some of the obvious reasons why query development and execution should be restricted in production and have generally agreed with the restrictions.   However, I wanted to reach out to those of

  • ALV Control: Permitted Values for STYLE in the ALV Data Transfer structure

    Does anyone know a source / reference that "de-codes" the integer value of the the field style in the structure LVC_S_DATA to something a human understands. Doh!! It is the binary values that are important. Edited by: Andrew Barnard on Sep 2, 2008 3:

  • Palm TX running on Windows 7

    I have HP Pavilion desktop running Windows 7. My brand new Palm TX does not install properly on it. It complains of missing driver for the handheld. Anyone had any success wth Palm TX running on indows 7? Post relates to: Palm TX This question was so