Repository navigation
7. tablespaces ,Users ,, profile
Under logical part > 1. Oracle data block > oracle is an application which came with own sources,records they generated oracle data block.
under physical part > 1. Os data block > which stored data in hard disk . os is responsible for writing into disk.
2.Datafile > this is in tablespace. datafiles are system01.dbf , sysaux01.dbf,undotbs01.dbf,user01.dbf,temp01.dbf.
command is create tablespace dammy datafile '/u01/app/oracle/oradata/PROD/dammy01.dbf' size 30M autoextend on maxsize 200M;
command .[ alter tablespace dammy add datafile '/u01/app/oracle/oradata/PROD/dammy02.dbf' size 20M autoextend on next 10M maxsize 300M; ]
drop tablespace dammy including contents and datafiles;
and resize the datafile.
we can offline and online the tablespace status by [ alter tablespace (tablespace name) online/offline ; ]
## .
## TEMP TABLESPACE
### default temp tablespace
drop a datafile ( if in a tablespace have more than one datafiles then datafile can be delete),, ( if in a tablespace have one datafile then cannot be delete then whole tablespace have to delete)
here demo tablespace have 3 datafiles and father tablesapce have 1 datafile . let delete a datafile and see what happend.
so how to give login permission . only sys user grant login permission to any user . if sys user give admin option to a user. that user only can grant login permission to other users.
alter user ram quota 10M on users; ( means i have given 10MB space in users tablespace to ram for keeping his data )
Q1. A new user like leon. HR have whatever system privileges and object privileges grant those system privileges and object privileges to that user.
In that @/home/oracle/leon_all.sql file we manually write a script for " HR have whatever system privileges and object privileges grant those system privileges and object privileges to that user. "
desc dba_profiles
1. password_life_time - in bank cases - we need to reset the password after 90 days or 180 days or 120 days.
2. password_reuse_time - you can reuse the password as many time as you want (unlimited) but in some bank app - theres a rule- you can't use your last or previous 5 passwords. if i set password for reuse time 30 days . i can't use same passwords within 30 days.
3 . password_reuse_man - how many times i use the set passswords - let last 5 passwords i can reuse.
if i set password reuse time =30 password reuse max = 5 that means within 30 days last 5 passwords i cannot set now your have to set a new password after 30 days you set a any password
4. password_verify_function - set a password - 'oracle' this is not authenticated way of setting password . there are a rule -
min char - 8 , one char - capital , one number and one special char should be there.
5 . password_lock_time - assume your acct get locked for 1. so now your account remaim lock for specified days after that days your account unlock.
6. password_grace_time - assume 180 dasy set password . but you have not set the password within 180 days . you will have 7 days of grace time - within 7 days reset the password if you will not reset the password -then your acct get locked.
8. session_per_user - let hr user ,any user - we can open multiple session or tab , every tab open with hr user. if it set -1 user 1 session can create only.
kernel - kernel is the interface between the device OS and hardware(drives). all drives and os are managed by kernel layer.
9 . cpu_per_call and cpu_per_session- whenever you connect to database here / in session some of cpu is been utilized that is set - users are connect so how much cpu limit is allowed per sql call. if more than cpu use the sql will killed.
10 . logical_reads_per_session - here we are set to limiting number of datablock to be read per session.
let 50 users connected, one user do lot of heavy sqls quaries so lot data blocks are come into database buffer cache , other users not get not much of response , server is busy with that user who run heavy quaries.
users are full , some users do nothing but they login and idle , one new user try to connect so we can set idle time 2 mints those idle users kill automatically
13. connect_time - set maxtime - 1 . one user can connect 1 hour , after one hour this user disconnect automatically.
create profile (profilename)