Oracle 9i Óû§µÄ¹ÜÀí

80¿á¿áÍø    80kuku.com

¡¡¡¡Oracle 9iĬÈϵÄÓû§

±í8.1 Oracle 9iĬÈϵÄÖ÷ÒªÓû§

Óû§Ãû¿ÚÁîµÇ¼Éí·Ý¼°ËµÃ÷
syschange_on_installSYSDBA»òSYSOPER£¬µ«²»ÄÜÔNORMALµÇ¼£¬¿É×÷ΪĬÈϵÄϵͳ¹ÜÀíÔ±
systemManagerSYSDBA»òNORMAL£¬µ«²»ÄÜÒÔSYSOPERµÇ¼£¬¿É×÷ΪĬÈϵÄϵͳ¹ÜÀíÔ±
scottTigerNORMAL£¬ÆÕͨÓû§
aqadmaqadmSYSDBA»òNORMAL£¬¸ß¼¶¶ÓÁйÜÀíÔ±¡£
DbsnmpdbsnmpSYSDBA»ò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¡£



·ÖÏíµ½
  • ΢ÐÅ·ÖÏí
  • ÐÂÀË΢²©
  • QQºÃÓÑ
  • QQ¿Õ¼ä
µã»÷£º