Oracle 9i Óû§µÄ¹ÜÀí
¡¡2006-08-04 11:54:55¡¡À´Ô´£ºWEB¿ª·¢Íø¡¡¡¡¡¡Oracle 9iĬÈϵÄÓû§
±í8.1 Oracle 9iĬÈϵÄÖ÷ÒªÓû§
Óû§Ãû | ¿ÚÁî | µÇ¼Éí·Ý¼°ËµÃ÷ |
sys | change_on_install | SYSDBA»òSYSOPER£¬µ«²»ÄÜÒÔNORMALµÇ¼£¬¿É×÷ΪĬÈϵÄϵͳ¹ÜÀíÔ± |
system | Manager | SYSDBA»òNORMAL£¬µ«²»ÄÜÒÔSYSOPERµÇ¼£¬¿É×÷ΪĬÈϵÄϵͳ¹ÜÀíÔ± |
scott | Tiger | NORMAL£¬ÆÕͨÓû§ |
aqadm | aqadm | SYSDBA»òNORMAL£¬¸ß¼¶¶ÓÁйÜÀíÔ±¡£ |
Dbsnmp | dbsnmp | SYSDBA»òNORMAL£¬¸´ÖƹÜÀíÔ±¡£ |
¡¾²Î¼û¹âÅÌÎļþ¡¿£ºµÚ8ÕÂ\selectdbausers.sqlºÍselectuserusers.sql¡£
ÔÚ¡¾ÆóÒµ¹ÜÀíÆ÷¡¿ÖÐÈçºÎ´´½¨Óû§
£¨1£©Èçͼ8.1Ëùʾ¡£
£¨2£©³öÏÖÈçͼ8.2ËùʾµÄ´´½¨Óû§µÄ¡¾Ò»°ãÐÅÏ¢¡¿Ñ¡Ï¡£
£¨3£©Í¼8.3ËùʾΪ´´½¨Óû§µÄ¡¾½ÇÉ«¡¿Ñ¡Ï¡£
£¨4£©Í¼8.4ËùʾΪ´´½¨Óû§µÄ¡¾ÏµÍ³È¨ÏÞ¡¿Ñ¡Ï¡£
£¨5£©Èçͼ8.5ËùʾΪ´´½¨Óû§µÄ¡¾¶ÔÏóȨÏÞ¡¿Ñ¡Ï¡£
£¨6£©Í¼8.6ËùʾΪ´´½¨Óû§µÄ¡¾Ê¹ÓÃÕß×é¡¿Ñ¡Ï¡£
£¨7£©Í¼8.7ËùʾΪ´´½¨Óû§µÄ¡¾Ï޶ѡÏ¡£
£¨8£©Èçͼ8.8ËùʾΪ´´½¨Óû§µÄ¡¾´úÀíÓû§¡¿Ñ¡Ï¡£
£¨9£©³É¹¦´´½¨Óû§ºó³öÏÖÈçͼ8.9Ëùʾ½çÃæ¡£
£¨10£©ÉÏÊö¹ý³Ì¶ÔÓ¦µÄSQL´úÂëÈçÏ¡£
¡¡¡¡¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D
¡¡¡¡
CREATE USER "TEMPUSER" PROFILE "DEFAULT"
¡¡¡¡¡¡¡¡
IDENTIFIED BY "tempuser" DEFAULT TABLESPACE "USERS"
¡¡¡¡¡¡¡¡
ACCOUNT UNLOCK;
¡¡¡¡
GRANT CREATE ANY TABLE TO "TEMPUSER" WITH ADMIN OPTION;
¡¡¡¡
GRANT "CONNECT" TO "TEMPUSER" WITH ADMIN OPTION;
¡¡¡¡
BEGIN
¡¡¡¡¡¡¡¡
dbms_resource_manager_privs.grant_switch_consumer_group(
¡¡¡¡¡¡¡¡¡¡¡¡ grantee_name => 'TEMPUSER',
¡¡¡¡¡¡¡¡¡¡¡¡ consumer_group => 'DEFAULT_CONSUMER_GROUP',
¡¡¡¡¡¡¡¡¡¡¡¡ grant_option => TRUE
¡¡¡¡¡¡ );
¡¡¡¡
END;
¡¡¡¡
BEGIN
¡¡¡¡¡¡¡¡
dbms_resource_manager.set_initial_consumer_group(
¡¡¡¡¡¡¡¡¡¡¡¡
user => 'TEMPUSER',
¡¡¡¡¡¡¡¡¡¡¡¡
consumer_group => 'DEFAULT_CONSUMER_GROUP'
¡¡¡¡¡¡ );
¡¡¡¡
END;
¡¡¡¡
¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D
¡¾²Î¼û¹âÅÌÎļþ¡¿£ºµÚ8ÕÂ\createtempuser.sql¡£
ÔÚ¡¾SQLPlus Worksheet¡¿ÖÐÈçºÎ´´½¨Óû§
£¨1£©ÔÚ¡¾SQLPlus Worksheet¡¿Öв»ÄÜÖ±½ÓÖ´ÐÐcreatetempuser.sqlÎļþÍê³ÉÓû§µÄ´´½¨£¬·ñÔò½«³öÏÖ´íÎó¡£
£¨2£©½«createtempuser.sqlÎļþµÄÖ´ÐзֳÉ3¸ö²½Öè¡£
£¨3£©Ê×ÏÈÖ´ÐÐÒÔÏ´úÂ룬ִÐнá¹ûÈçͼ8.10Ëùʾ¡£
¡¡¡¡¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D
¡¡¡¡
/*¡¾Ò»°ãÐÅÏ¢¡¿Ñ¡ÏµÄÅäÖÃ*/
¡¡¡¡
CREATE USER "TEMPUSER" PROFILE "DEFAULT"
¡¡¡¡¡¡¡¡
IDENTIFIED BY "tempuser" DEFAULT TABLESPACE "USERS"
¡¡¡¡¡¡¡¡
ACCOUNT UNLOCK;
¡¡¡¡
/*¡¾ÏµÍ³È¨ÏÞ¡¿Ñ¡ÏµÄÅäÖÃ*/
¡¡¡¡
GRANT CREATE ANY TABLE TO "TEMPUSER" WITH ADMIN OPTION;
¡¡¡¡
/*¡¾¶ÔÏóȨÏÞ¡¿Ñ¡ÏµÄÅäÖÃ*/
¡¡¡¡
GRANT "CONNECT" TO "TEMPUSER" WITH ADMIN OPTION;
¡¡¡¡
¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D
¡¾²Î¼û¹âÅÌÎļþ¡¿£ºµÚ8ÕÂ\createtempuser-1.sql¡£
£¨4£©È»ºóÔÚ¡¾SQLPlus Worksheet¡¿ÖÐÖ´ÐÐÏÂÁдúÂ룬ִÐнá¹ûÈçͼ8.11Ëùʾ¡£
¡¡¡¡ ¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D
¡¡¡¡ /*¡¾Ê¹ÓÃÕß×é¡¿Ñ¡ÏµÄÅäÖã¬ÊÚÓèÇл»×ÊԴʹÓÃÕß×éµÄȨÏÞ*/
¡¡¡¡ BEGIN
¡¡¡¡¡¡¡¡
dbms_resource_manager_privs.grant_switch_consumer_group(
¡¡¡¡¡¡¡¡¡¡¡¡
grantee_name => 'TEMPUSER',
¡¡¡¡¡¡¡¡¡¡¡¡
consumer_group => 'DEFAULT_CONSUMER_GROUP',
¡¡¡¡¡¡¡¡¡¡¡¡
grant_option => TRUE
¡¡¡¡¡¡¡¡
);
¡¡¡¡
END;
¡¡¡¡
¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D
£¨5£©×îºóÔÚ¡¾SQLPlus Worksheet¡¿ÖÐÖ´ÐÐÏÂÁдúÂ룬ִÐнá¹ûÈçͼ8.12Ëùʾ¡£
¡¡¡¡ ¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D
¡¡¡¡ /*¡¾Ê¹ÓÃÕß×é¡¿Ñ¡ÏµÄÅäÖã¬ÉèÖóõʼ»¯×ÊԴʹÓÃÕß×é*/
¡¡¡¡ BEGIN
¡¡¡¡¡¡¡¡ dbms_resource_manager.set_initial_consumer_group(
¡¡¡¡¡¡¡¡¡¡¡¡ user => 'TEMPUSER',
¡¡¡¡¡¡¡¡¡¡¡¡ consumer_group => 'DEFAULT_CONSUMER_GROUP'
¡¡¡¡¡¡¡¡ );
¡¡¡¡ END;
¡¡¡¡ ¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D
´´½¨Óû§Öг£¼ûÎÊÌâ¼°½â¾ö·½·¨
Óû§µÄÐÞ¸Ä
£¨1£©Èçͼ8.14Ëùʾ¡£
£¨2£©ÔÚ³öÏֵĸ÷Ñ¡ÏÖпÉÒÔÐÞ¸ÄÓû§µÄ¸÷ÖÖÅäÖòÎÊý¡£¶ÔÓ¦Óû§µÄÐ޸ĵÄSQLÓï¾äΪ“ALTER USER”¡£
ʵÀý1£º½«Óû§Õ˺ŵÄ״̬ÉèÖÃΪ“Ëø¶¨”µÄSQL´úÂëÈçÏ¡£
¡¡¡¡¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D
¡¡¡¡
ALTER USER "TEMPUSER" ACCOUNT LOCK
¡¡¡¡
¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D
¡¾²Î¼û¹âÅÌÎļþ¡¿£ºµÚ8ÕÂ\locktempuser.sql¡£
ʵÀý2£ºÐÞ¸ÄÓû§µÄÑéÖ¤¿ÚÁîΪ“TEMP”µÄSQL´úÂëÈçÏ¡£
¡¡¡¡¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D
¡¡¡¡
ALTER USER "TEMPUSER" IDENTIFIED BY "temp"
¡¡¡¡
¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D
¡¾²Î¼û¹âÅÌÎļþ¡¿£ºµÚ8ÕÂ\passwordtempuser.sql¡£
Óû§µÄɾ³ý
£¨1£©Èçͼ8.15ËùʾµÄ¡¾Óû§É¾³ýÈ·ÈÏ¡¿½çÃæ¡£
£¨2£©ÉÏÊö¹ý³Ì¶ÔÓ¦µÄSQL´úÂëÈçÏ¡£
¡¡¡¡¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D
¡¡¡¡¡¡
DROP USER TEMPUSER CASCADE
¡¡¡¡
¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D¨D
¡¾²Î¼û¹âÅÌÎļþ¡¿£ºµÚ8ÕÂ\droptempuser.sql¡£
- ››oracle »Ö¸´Îóɾ³ýµÄ±íºÍÎó¸üеıí
- ››Oracle·ÖÒ³²éѯÅÅÐòÊý¾ÝÖظ´ÎÊÌâ
- ››Oracle´´½¨dblink±¨´í:ORA-01017¡¢ORA-02063½â¾ö
- ››Oracle Ìá¸ßSQLÖ´ÐÐЧÂʵķ½·¨
- ››Oracle ¶¯Ì¬²éѯ£¬EXECUTE IMMEDIATE select into...
- ››Oracle 11g±ØÐ뿪ÆôµÄ·þÎñ¼°·þÎñÏêϸ½éÉÜ
- ››oracleÐÔÄÜ34ÌõÓÅ»¯¼¼ÇÉ
- ››oracleÊý¾Ý¿âÉú³ÉËæ»úÊýµÄº¯Êý
- ››Oracle Êý¾Ý¿â±í¿Õ¼äÈÝÁ¿µ÷Õû½Å±¾
- ››oracleµ¥¿â³¹µ×ɾ³ý¸É¾»µÄ·½·¨
- ››Oracle´´½¨±í¿Õ¼ä¡¢´´½¨Óû§ÒÔ¼°ÊÚȨ¡¢²é¿´È¨ÏÞ
- ››oracle ÖÐ UPDATE nowait µÄʹÓ÷½·¨
¸ü¶à¾«²Ê
ÔÞÖúÉÌÁ´½Ó