Oracle²Ù×÷ϵͳÈÏÖ¤
ĬÈÏÇé¿öÏ£¬ÔÚOracleµÄÖ÷»úÉÏ£¨linuxϵͳ£©µÄOracle²Ù×÷ϵͳÓû§Ï£¬ÒÔsysÓû§µÇ½Êý¾Ý¿âʱ¿ÉÒÔ²»ÓÃÊäÈëÃÜÂëÖ±½ÓµÇ¼¡£Êµ¼ÊÉÏ£¬Ö»ÒªÊÇÊôÓÚdba×飨linux£©»òosdba×飨windows£©Ï£¬¶¼¿ÉÒÔ²»ÓÃÃÜÂë½øÐеǼ¡£ÕâÊÇÈÏÖ¤·½Ê½³ÆΪOSÈÏÖ¤¡£
ÕâÖֵǼ·½Ê½µÄ¿ØÖÆ£¬ÊÇͨ¹ý$ORACLE_HOME/network/admin/sqlnet.oraÖеģº
SQLNET.AUTHENTICATION_SERVICES
²ÎÊýÀ´¿ØÖƵġ£ÓÐÈý¸öÖµ¿ÉÈ¡£º
1¡¢NTS¡£Õâ¸ö²ÎÊýÊÇÖ÷»ú²Ù×÷ϵͳÊÇwindowsµÄʱºòרÓõġ£µ±ÔÚwindowsÉÏÉèÖøòÎ
Êýºó£¬¼´¿É½øÐÐOSÈÏÖ¤¡£ÐèҪעÒâµÄÊÇ£¬¸Ã²ÎÊýÊÇwindowsרÓõġ£Èç¹ûoracleÊÇ
×°ÔÚunixÀàϵͳÉÏ£¬OSÈÏÖ¤¶¼»áʧ°ÜµÄ¡£
2¡¢NONE¡£±íʾ²»×ö²Ù×÷ϵͳÈÏÖ¤£¬¼´ÒªÇóÊäÈëÃÜÂë¡£
3¡¢ALL¡£¼´ËùÓÐÈÏÖ¤·½Ê½¶¼¿ÉÒÔ¡£
ËùÒÔÒªÔÚÖ÷»úÉϽøÐÐosÈÏÖ¤Ö±½ÓµÇ¼sys as sysdba£¬Ö»ÒªÉ趨ΪALL»òÕß²»É趨¸Ã²ÎÊý£¨
¼´×¢Ê͵ô¸ÃÐУ©¾ÍÐÐÁË¡£
Èç¹ûÒª½ûÖ¹OSÈÏÖ¤£¬ÔòÖ»ÒªÉèÖÃΪNONE¼´¿É¡£
ÌâÍâ»°£º
¹ØÓÚOSÈÏÖ¤µÄ£¬Æäʵһ¿ªÊ¼Óëremote_login_passwordfile»ìÏýÆðÀ´ÁË¡£
1¡¢OSÈÏÖ¤ÊÇÖ¸Ö÷»úÉÏ°²×°OracleµÄÓû§µÄ¹ÜÀíÔ±µÇ¼ÈÏÖ¤·½Ê½¡£
2¡¢µ±Õâ¸ö¹ÜÀíÔ±³¢ÊÔͨ¹ýÍøÂçÀ´µÇ¼Oracle DBʱ£¬½«»áʧ°Ü¡££¨ÒÔÍøÂ緽ʽµÇ¼Êý¾Ý¿â£¬¼´Ê¹Í¨¹ý½«·Ç³£²»°²È«µÄ²ÎÊýremote_os_authentÉèÖÃΪtrue£¬²Ù×÷ϵͳÈÏÖ¤Ò²²»»áÉúЧ¡££©
ÒªÔÊÐíÔ¶³Ì¹ÜÀíÔ±sysµÇ¼Êý¾Ý¿â£¬ÔòÒªÇóÉèÖÃ
remote_login_passwordfile = exclusive
È»ºó´´½¨passowrd file£º
orapwd file=orapw$ORACLE_SID passwd=passwd entries=10 force=y
ÐèҪעÒâµÄÊÇÕâÀïµÄpassword fileÎļþÃüÃûÐèÒª·ûºÏÌض¨µÄÕâ¸ö¸ñʽ£¬Èç¹ûÃüÃû²»¶Ô£¬ÏµÍ³½«»áÕÒ²»µ½Õâ¸öÃÜÂëÎļþ£¬¶ø²úÉú£º
08:38:36 idle> grant sysdba to sys;
grant sysdba to sys
*
ERROR at line 1:
ORA-01994: GRANT failed: password file missing or disabled
ÉÏÃæÕâ¸ö´íÎó¡£Ò²¾Íµ¼ÖÂÁËsysdba»òÕß¹ÜÀíÔ±Óû§²»ÄÜÔ¶³ÌµÇ¼Êý¾Ý¿â¡£
Òª¼ì²éÊÇ·ñÒѾ½«sysÓû§·ÅÈëÃÜÂëÎļþ£¬¿ÉÒÔ²éѯ£º
08:49:04 idle> select * from v$pwfile_users;
USERNAME SYSDBA SYSOPER
--------------- --------------- -------------------
SYS TRUE &
Ïà¹ØÎĵµ£º
Ò». °²×°Ç°µÄ×¼±¸
1.ÔÚÊý¾Ý¿â·þÎñÆ÷ÉÏÒÔAdministratorÉí·ÝµÇ¼µ½Windows
2.Í£Ö¹ËùÓÐOracleÏà¹ØµÄ·þÎñ¡£ÕâЩ·þÎñÃû³Æͨ³£ÊÇÒÔOracle´òÍ·
3.Í£Ö¹Distributed Transaction Coordinator·þÎñ
4.±¸·ÝÓëOracleÊý¾Ý¿âÏà¹ØµÄËùÓÐÎļþ£¨°üÀ¨OracleÊý¾Ý¿âÈí¼þ¼°Êý¾ÝÎļþ£©£¬°ÑÕâЩÎļþ°´ÔÓеÄĿ¼½á¹¹¸´ÖƵ½°²È«µÄµØ·½£¬²¢× ......
µ¼³öOracleÊý¾Ý¿â½á¹¹
1.·½·¨Ò»£ºÖ±½ÓдsqlÓï¾ä
//»ñÈ¡Ò»¸öSCHEMAϵÄËùÓн¨±íºÍ½¨Ë÷ÒýµÄÓï·¨£¬ÒÔscottΪÀý£º
spool portal_schema.sql
SELECT DBMS_METADATA.GET_DDL('TABLE',u.table_name)
from USER_TABLES u;
SELECT DBMS_METADATA.GET_DDL('INDEX',u.index_name)
from USER_INDEXES u;
spool off;
2. ......
ΪÁËÑо¿Ò»ÏÂϵͳÔÚºǫ́¶¼¸ÉÁËʲô£¬µ±È»ÊÇÎÒÔÚ´úÂëÀïûÕÒµ½µÄÇé¿öÏ£¬Ñо¿ÁËÒ»ÏÂtrace£¬½á¹ûÓÐÒ»¶¨µÄ°ïÖú¡£oracleÖв»Ïñsql serverÖÐÄÇÑùÖ±½ÓÌṩͼÏñ»¯µÄ¹¤¾ß£¬ËùÒÔ»¹ÊǵÃ×Ô¼º¶¯ÊÖÀ´×ö£¬¹éÄÉÁËһϣ¬²½ÖèÈçÏ£º
²éѯsession£º
SQL> select sid, serial#, username from v$session where username='XXX';//ÕÒ³öÄãÒª¸ú ......