Title: Resources
1????? ??????? Resources
- ?????? ??? ???? ??????? ?? ???? ?????? ?? ?????
????????? ? ????? ???? ???? ??????? ??????? (
???? ????????? ???????? ???? ??? ??????? ) ? ???
???? ???? ??? ?? ???? ? ??? ?????? select ??
Update ???? ??? where ?? ???? ????? ???????? ????
????? ???? ??? ????? ?? ???? ?? ??????? ? - ??? ???? ? ?? ???? ????? ??? ??????? ?
- ? ?? ?????? ?????? ?? ??????? ??? ????? ?
- ???? ?? ?? ??? ????? ?????? ? ??? ???? ??????
???? ?? ???????? ?? ???? ?????? ? ??? ???????? ?
?? ?????? ???? ??? ???? ? ???? ?????? ???? ?????
??? ???? ??????? ...?? ???? ??
2Resource Limit Profiles
- ?? ?????? ?? ????? ???? ????? ??? ????? ????
??????? ?? ???? ???????? ???? ?????? ????????
????????? ??? ????? ??????? . - ??? ??? ??? ????? ???? ??????? Profile ? ???
?????? ??? ?????? ?? ???? ?? ???? ??????? create
user ?? alter user . ???? ????? ??? ???????
????? ??? ??? ?????? TRUE ??? ?????????
resource_limit ???????? ???????
3- Enter user-name system/itdbConnected
toOracle Database 10g Enterprise Edition
Release 10.1.0.2.0 - ProductionWith the
Partitioning, OLAP and Data Mining optionsSQLgt
alter system set resource_limittrueSystem
altered.
4- ???? ????? ??????????? ???? ?????? ?????????
1- cpu_per_sesison ? ???? ???? ????? ??????
?????? ??? ???? ? ???? ?????? ???????? ?? ???
??????? ? ???? ??? ????? ???????? . - 2- session_per_user ?? ??? ??????? ???? ????
??????? ?? ?? ???? ?????? . (???? ?????? ?????
?????? ????? SQL plus ???? ?? ??? ? ???? ???
???????? ? ?? ???? ?? sql plus ?????? ?????? ????
) .. - 3- connect_time ?? ????? ?????? ???? ???? ??
???????? ??????? ???????? . - 4-IDLE_TIME ????? ?????? ???? ???? ??
???????? ?? ???? ????? ?????? ??? ?? ???? ??? ???
. - 5- LOGGICAL_READS_PER_SESSION ?? ???? ????????
???? ???? ??????? ?? ?? ???? ???????? ???? ??????
??????? .. ???? ??? ?????? ???? ?????? ????????
Data Block .. ? ??? ?????? ?????? ????? ??????
???????? ??????? ????? 4 ???? ???? ( ??
?????? ) ... - 6- Private_SGA ? ?? ??????? ??????? ?? ???????
??? ???? ???? ?????? . - 7- CPU_PER_CALL ? ?? ????? ?????? ???? ????
??????? ???????? ?? ???? ?? ??? ??????? . - 8- LOGICAL_READS_PER_CALL ?? ???? ????????
???? ???? ??????? ?? ?? ???? ???????? ????
???????? ??????? . - ????? ??? ??????? ??????
- ?????? ????? Profile
- CREATE PROFILE profile LIMITSESSIONS_PER_USER
max_valueCPU_PER_SESSION max_valueCPU_PER_C
ALL max_valueCONNECT_TIME max_valueIDLE_TIME
max_valueLOGICAL_READS_PER_SESSION
max_valueLOGICAL_READS_PER_CALL
max_valueCOMPOSITE_LIMIT max_valuePRIVATE_SG
A max_byteswhereprofile is the name of the
profilemax_value is an integer, UNLIMITED, or
DEFAULTmax_bytes is an integer optionally
followed by K or M UNLIMITED, orDEFAULT
5- ????
- ????? ???????? hussam ??? ???? ?????? ??? ? ?????
?? ??? ?????? ?? ??? ??????? ?? ???????? ???????
??????? ??? ? ????? ?? ?????? 1 ???? ???? ??? ??
???????? ?? ???????? ??????? ? ????? ?? ???? ????
??? ???? ?????? ????? - SQLgt create profile hussam_prof limit 2
sessions_per_user 2 3 cpu_per_call 12
0 4 logical_reads_per_call 1073741824
5 connect_time 1800Profile
created.SQLgt alter user hussam profile
hussam_profUser altered.
6- ????
- ??? ???? service ??? ????? ?????? ???? hussam
- ???? ???? ????? ?????? ?????? ?? ???????
???????? ?? ????? admin - hussam (DESCRIPTION (ADDRESS_LIST
(ADDRESS (PROTOCOL TCP)(HOST
DJ36262J)(PORT 1521)) ) (CONNECT_DATA
(SERVICE_NAME hussam) ) ) - ???? ??? ???? ???? ??? ??sqlplus ????? ??????
??? ???????? sys???? ????
change_on_install????? ?????? EISA ? ????????
-
7- ???
- ERRORORA-28009 connection to sys should be as
sysdba or sysoper - ???? ???? ?????? ??? sysdba ??? ???? ???
???????? ??? - ERRORORA-12154 TNS ?????? ????? ??? ??????
8- ?????? ????? sqlplus ????? ??? WorkSheet ?????
????? ??? - create spfile from pfile?? ????? ????? ???
????? ??????? - ???
- shutdown immediate
- ?? ????? ??????? ?? ????
- ???
- startup
- ?? ???
- alter system set OS_AUTHENT_PREFIX''
scopespfile
9????? ?????? ??? ???? ??????? ?????? ? ??????
??????? ??? Sql Plus ??? ??? ??????? 1- ????
??? ??? tnsnames.ora ? ??? ???? ??? ?? ??? ???? (
? ??? ?????? ????? ???? ) .. 2-????
???Start-gtprograms-gtoracl-Eaisa-gtIntegration and
Migrtion tool -gtnet Configration Assistant -3
???? ????? ????? ???? Local net service name
configration .. -4 ???? ????? ???? ???? add ..
-5???? ??? ??? ??????? ????? hussam .. -6 ????
??? ????????? ???? tcp .. -7???? ??? ??? ?????
... ??? ?? next .. -8???? ??? ????? ?????? ???
????????? ?? ?????? .. -9????? ?????? ?????? ..
??? ?? ???? ??? ??? ???? change login ?? ??
???????? System ? ???? ????? ?? test ... ? ?????
???? ???? ... ???? ?????? ? ???? ???????? ...
10- ????? ????? ???? ????? ????? ????? ???? ??
?????? ?????? ?????? ????? ???? ?? local policy
?? ???????? ? ??? ????? ???? ???? ???? ( ??
?????? ??????? ???? ??? ??? ???????? ????? ??????
????? ) ?? ?? ??? ????? ?????? ?? ??? ??????
??????? ??? ..... ??? ? ???? ??? ??????? ??? ???
?????????? ??????? ?????? ???? ?????? ??????
??????? ? ????? ???????? ?????? ?? ??? ?????
????? ... ??? . ??? ??????? ?? ????? ????? ????
??? ??????? ?????? ?? ????? ??????? ??? ?? ??
???? profile ??? ??? ????????? ???? ???? ??????
.. - ?? ?? ??????????? ???? ?????? ?????????
FAILED_LOGIN_ATTEMPTS -1 ??? ???? ???? ????? ????
???????? ?????? ???? ???? ? ????? ???? ?????
?????? . PASSWORD_LOCK_TIME -2 ??? ???? ??????
??????? ??????? .. PASSWORD_LIFE_TIME-3 ???
?????? ???? ??? ??? ???????? ?? ???? ?????? ????
????? ????? .. PASSWORD_GRACE_TIME-4 ?? ?? ???
?????? ???? ???? ??????? ???????? ??? ???? ??????
???? ??? ??? ?????? ?????? ???? ??????? ?? ??????
?????? .. PASSWORD_REUSE_TIME-5 ??? ??????
???? ????? ??????? ????? ?? ???? ??????? ????
???? ????? .. ??????? ????? ?? ???????? hussam
????? ?? ????? ??????? FAILED_LOGIN_ATTEMPS 3
PASSWORD_LOCK_TIME 2??? ???? ????? ?????
????? ?????? ????? ?? ????? ???? ?? ????? ????
??????? ????? ???? ??? ????? ???? ????? ?????
(??? ??? ??? ?????? ??? ??? ?????? ?????? ) ???
?? ????? ?? ????? ?????? ??? ???? ..
11- ??? ????? ????? ??????? PASSWORD_LIFE_TIME
15PASSWORD_GRACE_TIME 2PASSWORD_REUSE_TIME
15 ????? ???? ???? ??? 31/7/2006 ? ???? ??????
???? pass1 ????? ?? ????? 14/8 ??? ???
???????? ?? ????? ???? ???? ???? ???? ???? ???
16/8 ?????? ??????? ? ?? ?????? ??????? ???? ???
??????? pass1 ?? ??? ?? ??? ???? ???? ????? ? ??
?????? ????? ???? ???? ??????? pass1 ( ?? ????
????????? ) ??? ??? ??????? 31/8 ... ???? ?? ????
?????? ?? ???? .?????? ???????? ???? ?? ???
????? ???????? ??? ????? ???? ?? ?????? ??
???????? ????? ???? ???? PL/SQL ??? ??? ?????
???? ???? ???? ????? ???????? ??? function ????
????? ?? ????? ??????? ?? ??????? ????? ??????
true ? ??? ????? false . ?? ????? ????? ?????
???? ???????? hussam ??? ?? ???? ???? ??? ????
?'a' ? ?? ?? ???? ??? ???? ?? hussam' ?? ?? ??
????? 'pass' ???
12- SQLgt connect sys/oracle as sysdbaConnectedSQLgt.
create or replace function Check_pass(userid_para
m in varchar2 , pass in varchar2 , old_pass
varchar2) return boolean as ch char
begin chsubstr(pass,1,1) if (
ch'a') and (pass ltgt 'pass' ) and (passltgt'arabtea
m') then return true else return
false end if end /Function created.
13- SQLgt create profile hussam_pro 2 limit
password_verify_function Check_pass Profile
created.SQLgt alter user hussam 2 profile
hussam_prof User altered.SQLgt alter user
hussam 2 password expire User
altered.SQLgt connect hussam/hussam
ERRORORA-28001 the password has
expiredChanging password for hussamNew
password hussam - Retype new password hussamERRORORA-28003
password verification for the specified password
failedORA-28003 password verification for the
specified password failedPassword unchanged
14- ????? ??????? ?? Oracle10g ????? ?????? ??
???? ?? ???? ?????? ?? ??? ???? ????? ?? ???????
10g ??? ????? ??? ????? ??????? ? ?????? ???? ??
??????? ???? ???? ????? ?????? ? ?????? ??? ????
??? ?? ???? ?????? ???? ?? ????????? ??????
?????? ??????? ??? ???????? ???????? ? ???????
segments ? ?????????? Extents .. ???????? ???
??????? ????? ?????????? ? ??? ????????? ... ???
???? ??? ???? ???????? ??? ?? ????? ?????? ...
???? ???? ?????? ???? ?? Enterprise Manager
???? ?????? ?? ??????? 9i ? ????? ??? ?????? ????
??? ?????? ???????? ?????????? ?? ??????
Application Server (??? ??????? ???? ) ..
???????? ??? Enterprise Manager ???? iSQL PLUS
??????? ?????? ?? ??????? 9i ... ???????? ???
????? ???? ?????? ????? ?????? ???? ???? ...
???? ???? ??? ???????? ?????? ??? ???? ????????
? ??????? ( ?????? ?? ????????? ??????? ???
??????? ??? ???? ??????? Dos ?? Shell ?????
???linux (???? ?????? ?????? ) )
15- 1- ISQL PLUS ?????? ?????? ???
- isqlplusctl start
- ???????? ???
- isqlplusctl stop
- ??? ???????? ??????? ?????? ???? ???? ????
???? ??? ?????? ...??? ??? ????? ?????? ??????
??? - http//pc_nameport/isqlplus
- ????? ( ?? ?????? ) ???
- http//localhost5560/isqlplus/
- ??? ????? ?????? ?????? ??? ?????? ??????
??? - Oracle_home\install\portlist.ini
- ???? " iSQLPlus HTTP port number 5560
16- 2- Enterprise Manager ? ?? ?????? ????
????????? ?????? ???? ?????? ... ?????? ??????
??? - emctl start dbconsole
- ???????? ???
- emctl stop dbconsole
- ?????? ?????? ???
- emctl status dbconsole
17- ???? ????? ????? ???????? ???????? ?????????
??? ????? Services ???? ??? ??????? ?? Services
???? Administrative Tools .. ? ?? ???? ????????
??? ??????? ??? ??????????? ??? ??? ??????? ..
?????? ?????? ??? ???????? ?????? ??? ????? ??
ISQL PLUS ??? - http//pc_nameport/em
- ????? ( ?? ?????? ) ???
- http//localhost5500/em
- ??? ????? ????? ?????? ??? ?????? ??????
??? - Oracle_home\install\portlist.ini
- ???? Enterprise Manager Console HTTP Port
(dbclass) 5500" " .. ??? ??????? ????? ???
????? ?????? ?????? ? ?? ???? ? ???? ?????? ?????
??? ???????? SYS ?? ??? ?? ???? ?????? ? ???? ???
??? - User Name SYSPassword oracle Connect AS
SYSDBA - ??? ????? ?????? ??? ?? ??? ????? ??? ????
??????? ? ????????? ???? ??? ?????? ???????? ????
SQL PLUS .... ?? ????? ???? ?? ????? ???
Administration ????? ??? ???? ??????? ???? ??????
....
18???? ??????? Listener
- ????? ???? ?? ???? ????????? ? ??? ?? ???? ?? ??
??? ? ???? ??? ?? ???? ?????? .. ?? ???? ?? ???
???? ???? ??? ?????? ?? ?????????? ? ??????
??????? ?????? .. ?? ????? ?????? ??????? Oracle
Database ??? ?? ???? ??? ????? ?? ? ? ????? ?? ?
???? ?? ???? ?? ?????? ????? ??? ????? ????? ?
?????? ???????? ? ??????? ????? ??? ???? ???? ...
???? ?? ???? ?????? Oracle Database ???
?????? ??????? ?? ?? ???? ??? ... ? ?????? ???
???? ?????? ?????? Oracle Client (???? ?? ??? ???
Oracle Server ? ???? ???????? ??? ?????? ???????
) .. ?????? ???????? ???????? ??? ??? ????? ??
?????? ?? ????? SQL PLUS ? ???? ??????? ???? ????
?? ??????? ????????? ??????? Oracle Database ...
?? ??? ??????? ??? ??? ?????? ??? ??????? ??
???? ???? ????????? ??? ?????? Port ??? ??????
????? ?????????? ?? ??????? ?????? ??? ??????
???????? ???? ???? session ?? ???????? ????? ...
???????? ????? ???? ?? ???? ??? ??????? ????? ???
???? ?? ???? ? ???? ?? ?????? ??????? ??? .... ??
???? ?????? ????
19- ???? ?? ?????? ???? ?? ????? ???? ? ??? ??? ???
??? ????? ?????? ????? .. ? ?????? ??? ?????? ??
??????? ?? ????? ????? ???? 1- ??
Start-gtPrograms-gtoracle10g-gtmigration and
configuration tools-gtNet Configuration Assistant
2- ???? ????? ????? ???? Listener Configuration
?? Add .. 3- ??? ??? Listener .. 4-???
????????? Protocol ???? ???? ?? ????? ????
??????? ?? ?????? ? ????? tcp ?????? ???????? ?
??? ????? Linux ? ?? ???? ?????? ??? ?????? ??
????? ??????? ???? ?? ?????? ?? ??? ... 5- ?????
port ???? ???? ??????? ?? ???? ???? ? ??? ???????
??? ???? ???? ???? ?????? ??? ??? ?????? ?? ????
?? ???? Ports ?? ??? ????? ??????? .. ?? ??????
????? ???? ?????? ????????? 1521 ... 5-?????? ??
???? ?? ???? ?????? ????? ??? ????? ??? ??? ?
???? ?? ?? ... ?? Next .. 6-???? ??? ?? ????
????? ??????? ?????? .. ???? ?? ?????? ?? ????
Next .. 7- ???? ????? ?????? ????? .... ???? ???
?????? ?? ???? ?? ??????? ... ???? ???? ??? ?
... ????? ??? ?????? ??? ?????? ???? ????
????? ??????? ????? Listener ????? ??? port
1521 .. ???? ???? ?? ???? ??? ??????? ??
?????? ??????? ??? ?????? ??? ???? ????
????????? ???? ??????? listener ? ??? ?? ??
???? ??????? ?? Shell ??? - lsnrctl stop listner_name
- ???? ?? ????? ????? ?????? ???
- lsnctl start listner_name
- ?? ?? ????? ????? ????? ???
- lsnctl status listener_name
20- ??? ???? ??? ???????? ???? ??????? ?????? .. ??
????? ????????? ? ????? ???? ????? ?????? ??? ??
?????? ???? ??? ?? ????? ???????? ????? ??? ?????
?????? ?????? Oracle Client ? ??? ?? ??????
?????? ?? ??? ????? ????? ????????? ????? Oracle
Server ???? ??????? 10g ?? ??? 9i (?? ???? ?? ???
Oracle Database ) ... ??? ?????? ??? ?? ????
????????? ???????? ??? ????? ??????? ? ? ??????
??? ?? ??? ??? ?????? ?? ???? Local Net Services
Naming ???? ??????? ??? ???? ??? ??????? ????????
... ????? ????? ?? ???? ??? ??? ????????? ???
?? ???? ??? tnsnames.ora ??? ??? ??? ???????? ...
?????? ??? tnsnames.ora ???? Local Net ???????
??????? ??? - Connection_Host (DESCRIPTION (ADDRESS
(PROTOCOL TCP)(HOST PC_NAME "??? ?????? ????
???? ??????? " )(PORT 1521)) (CONNECT_DATA
(SERVER DEDICATED) (SERVICE_NAME
GLOBAL_DATABASE_NAME) )
21- ???? ????? ??? ??????? ??????? ???? ??? ???????
??? ????? client 1- ???? ?????? Net
Configuration Assistant ... 2- ?? ??????? ?????
??? ?? ??????
22- 3- ???? ????? ????? ???? add . 4-??? ??? Service
Name .. ??????? Global Name ???? ?????? ?? ???
SID ??? ??? ?? .. ?? ?????? ???
dbclass.hussam.com .. 5- ??? ??? ????????? ????
?????? ???? ... ?? TCP .. 6- ?? ??? ?????? ????
???? ??????? ? ??? port ???? ???? ???? ???????
... 7- ???? ????? ???? ???? ?? ???? ?????
??????? .. ????? ????? Yes ?? ???? ????? ???? ???
???? ??????? ?? ???? .. ???? ??? ?? change Login
? ?? ???? ?????? ???SYS ?? System ?? Ok ??? ???
??????? ?????? ??? ?? ???? ???? ?? ??????? ??????
???? ....????? ??? ?? ???? ?????? ??????? - 8- ??? ???????? ???? ??? ??? NET SERVICE NAME
? ?? ????? ???? ?????? ??? ???????? ?? ??????? ??
????? ??????? ?????? ??? ????? Sql Plus ?????? ??
Connection String ?? ???? ??? ?? NET SERVICE NAME