Question We can see database entry by using oratab command and profile command..what is difference between oratab and profile command.
Answer "oratab" is a file created by Oracle in the /etc or /var/opt/oracle directory when installing database software. Originally ORATAB was used for SQL*Net V1, but lately is's being used to list the databases and software versions installed on a server.
This file may contain comments staring with a pound signs (#) in column one, and data lines consisting of entries in the following format:
database_sid:oracle_home_dir:Y|N
- database_sid is the system id (SID) of an Oracle instances on the server.
- Oracle_home_dir is the ORACLE_HOME directory associated with this instance.
- The Y|N flags indicate if the instance should automatically start at boot time (Y=yes, N=no).
Besides acting as a registry for what databases and software versions are installed on the server, ORATAB is also used for the following purposes:
o Oracle's "dbstart" and "dbshut" scripts use this file to figure out which instances are to be start up or shut down (using the third field, Y or N).
o The "oraenv" utility uses ORATAB to set the correct environment variables.
o One can also write Unix shell scripts that cycle through multiple instances using the information in the oratab file.
PROFILES
Profiles in Oracle
Profiles are a means to limit resources a user can use.
Before profiles can be assigned, they must be created with create profile.
Then, they can be assigned to users with alter user ... profile.
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)
* ....
(composite_limit)
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 valid
(password_life_time)
* Minimum of different passwords before password can be reused
(password_reuse_max)
* Minimum of days before a password can be reused
(password_reuse_time)
* Number of days an account is locked after failing to login
(password_lock_time)
* ???
(password_grace_time)
* Verify function for passwords
(password_verify_function)
If a session exceeds one of these limits, Oracle will terminate the session. If there is a logoff trigger, it won't be executed.
History of passwords
In order to track password related profile limits, Oracle stores the history of passwords for a user in user_history$.
Quering created profiles
Profiles already created and their settings can be queried through dba_profiles