Visualizzazione post con etichetta 11gR2. Mostra tutti i post
Visualizzazione post con etichetta 11gR2. Mostra tutti i post

mercoledì 18 luglio 2012

Oracle Database: Change Password Expiration


Recently I went into this problem: Oracle WebCenter Content refused to start due to a password related problem.
After an investigation it turned out that account was locked due to password expiration.

In this post I explain a preliminary step that I didn't found in any Oracle guide (correct me if I'm wrong) but it's essential prior, or just after, installing any Oracle Middleware application.

Since Middleware applications requires a database connection, as you know, before installing one you will need to use an application called "Repository Creation Utility" that will create database schemas and users, owners of these schemas.

So, let's assume you are about to install Oracle WebCenter Content schemas using RCU (abbreviation of "Repository Creation Utility")



After schema creation you need to log into Database Enterprise Manager that can be reached at a similar address:

https://DATABASE_SERVER_IP_ADDRESS:1158/em

If you browse Users and look for the ones just created, identified in my case by prefix "DEV_", you will see that they use DEFAULT profile.



This profile has a password expiration set to 180 days that we need to change to unlimited.
Go to Server -> Profiles



Select DEFAULT profile



As you can see password expiration is set to 180 days, click Edit button




and set to UNLIMITED the field "Expire (in days)".



Note that if you have some locked accounts you can unlock them simply via SQLPlus using the following commands:

alter user username account unlock;

alter user username identified by new_password;

mercoledì 11 luglio 2012

Oracle Database: How to enable Archive Mode

Some days ago I went into this error while trying to perform a backup of a running 11gR2 database using rman:

ORA-196602: cannot backup or copy active file in NOARCHIVELOG mode

The solution was easy: ArchiveLog needs to be enabled to perform a hot backup of a running database.

Using SQLPlus connect to database.

[oracle@orcl ~]$ /u01/app/oracle/product/11.2.0/db_1/bin/sqlplus sys/password as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Tue Jul 10 09:32:39 2012

Copyright (c) 1982, 2011, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Release 11.2.0.3.0 - 64bit Production


Stop and dismount database and shutdown instance.

SQL> shutdown immediate;

Database closed.
Database dismounted.
ORACLE instance shut down.

Restart instance.

SQL> startup mount;

ORACLE instance started.

Total System Global Area 1653518336 bytes
Fixed Size                  2228904 bytes
Variable Size            1325403480 bytes
Database Buffers          318767104 bytes
Redo Buffers                7118848 bytes
Database mounted.

Enable ArchiveLog

SQL> alter database archivelog;

Database altered.
Re-open database

SQL> alter database open;

Database altered.
If everything went fine the following command should return Archive Mode as output:

SQL> select log_mode from v$database;

LOG_MODE
------------
ARCHIVELOG

SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     294
Next log sequence to archive   296
Current log sequence           296