Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Oracle Óû§ÃûÏê½â

°²×°ORACLEʱ£¬ÈôûÓÐΪÏÂÁÐÓû§ÖØÉèÃÜÂ룬ÔòÆäĬÈÏÃÜÂëÈçÏ£º
Óû§Ãû/ÃÜÂë
µÇ¼Éí·Ý
˵Ã÷
sys/change_on_install
SYSDBA»òSYSOPER
²»ÄÜÒÔNORMALµÇ¼£¬¿É×÷ΪĬÈϵÄϵͳ¹ÜÀíÔ±
system/manager
SYSDBA»òNORMAL
²»ÄÜÒÔSYSOPERµÇ¼£¬¿É×÷ΪĬÈϵÄϵͳ¹ÜÀíÔ±
sysman/oem_temp
 
sysman ΪomsµÄÓû§Ãû
scott/tiger
NORMAL
ÆÕͨÓû§
aqadm /aqadm
SYSDBA»òNORMAL
¸ß¼¶¶ÓÁйÜÀíÔ±
Dbsnmp/dbsnmp
SYSDBA»òNORMAL
¸´ÖƹÜÀíÔ±
3¸öĬÈÏÓû§
sys [as sysdba]
system 
scott tiger
 
´´½¨Óû§
create user Óû§Ãû identified by ÃÜÂë;
 
ϵͳȨÏÞ
grant/revoke create session to/from ̞;
grant/revoke create table to/from ̞;
grant/revoke unlimited tablespace to/from ̞;
 
grant create session to public;
²éѯµ±Ç°Óû§ÓµÓеÄϵͳȨÏÞ
select * from user_sys_privs;
 
¶ÔÏóȨÏÞ
grant/revoke select on ±íÃû to/from Óû§Ãû;
grant/revoke all on ±íÃû to/from Óû§Ãû;
 
²éѯµ±Ç°Óû§ÓµÓеĶÔÏóȨÏÞ
select * from user_tab_privs;
 
¶ÔÏóȨÏÞ¿ÉÒÔ¿ØÖƵ½ÁÐ
grant update(ÁÐÃû) on ±íÃû to Óû§Ãû;
 
ÉèÖÃÏÔʾʱÐпí
set linesize 400,ͬʱ¼ì²éÃüÁîÐд°¿Ú¿í¶ÈÊÇ·ñºÏÊÊ¡£
 
ϵͳȨÏ޵Ĵ«µÝ
grant create table to ̞ with admin option;
 
¶ÔÏóȨÏ޵Ĵ«µÝ
grant select on ±íÃû to Óû§Ãû with grant option;
 
½ÇÉ«
create role ½ÇÉ«Ãû;
grant create session to ½ÇÉ«Ãû;
drop role ½ÇÉ«Ãû;
×¢Ò⣺ÓÐЩϵͳȨÏÞÎÞ·¨Ö±½Ó¸³Óè½ÇÉ«
½ÇÉ«²»ÊôÓÚij¸öÓû§£¬Êǹ²Óõġ£
create tableÓëcreate any tableÇø±ð
Ç°Õ߸ø×Ô¼º´´½¨±í£¬ºóÕ߸ø×Ô¼ºÓë±ðµÄÓû§´´½¨±í
 
Oracle sysÓû§ÐÞ¸ÄÆäËûÓû§ÃÜÂë
alter user Óû§Ãû identified by ÃÜÂë
 
OracleµÄÈýÖÖÑéÖ¤»úÖÆ
²Ù×÷ϵͳÑéÖ¤£ºÀûÓòÙ×÷ϵͳ¹ÜÀíÔ±µÇ½
ÃÜÂëÎļþÑéÖ¤£ºOracle 10G XEµÄÃÜÂëÎļþλÖÃ
D:\oraclexe\app\oracle\product\10.2.0\server\database\PWDXE.ora
Êý¾Ý¿âÑéÖ¤
 
LinuxÏ£¬ÏÈÆôlsnrctl¼àÌý·þÎñ£¬ÔÙÆôOracleʵÀý£¬Í¨¹ý¼àÌýÅжÏÁ¬½ÓʵÀý¡£


Ïà¹ØÎĵµ£º

ORACLEµÄË÷ÒýºÍÔ¼ÊøÏê½â

 * Èç¹ûij¸öÔ¼ÊøÖ»×÷ÓÃÓÚµ¥¶ÀµÄ×ֶΣ¬¼´¿ÉÒÔÔÚ×ֶ춶¨ÒåÔ¼Êø£¬Ò²¿ÉÒÔÔÚ±í¼¶¶¨ÒåÔ¼Êø£¬µ«Èç¹ûij¸öÔ¼Êø×÷ÓÃÓÚ¶à¸ö×ֶΣ¬ 
±ØÐëÔÚ±í¼¶¶¨ÒåÔ¼Êø 
* ÔÚ¶¨ÒåÔ¼Êøʱ¿ÉÒÔͨ¹ýCONSTRAINT¹Ø¼ü×ÖΪԼÊøÃüÃû£¬Èç¹ûûÓÐÖ¸¶¨£¬ORACLE½«×Ô¶¯ÎªÔ¼Êø½¨Á¢Ä¬ÈϵÄÃû³Æ 
¶¨Òåprimary keyÔ¼Êø(µ¥¸ö×ֶΣ© 
create t ......

LinuxÏÂÆô¶¯Oracle·þÎñºÍ¼àÌý³ÌÐò(»ù´¡ÖªÊ¶)

 
oracleÊý¾Ý¿âÊÇÖØÁ¿¼¶µÄ£¬Æä¹ÜÀí·Ç³£¸´ÔÓ£¬½«ÆäÔÚlinuxƽ̨ÉϵÄÆô¶¯ºÍ¹Ø±Õ²½ÖèÕûÀíһϡ£
°²×°Íê±ÏoracleÒÔºó£¬ÐèÒª´´½¨oracleϵͳÓû§£¬
²¢ÔÚ/home/oracleÏÂÃæµÄ.bash_profileÌí¼Ó¼¸¸ö»·¾³±äÁ¿£º
ORACLE_SID,ORACLE_BASE,ORACLE_HOME¡£
±ÈÈ磺
export ORACLE_SID=test export ORACLE_BASE=oracle_install_di ......

oracle¸ß¼¶sqlµÄ²Î¿¼×ÊÁÏ

 1.¼¯ºÏ²Ù×÷
ѧϰoracleÖм¯ºÏ²Ù×÷µÄÓйØÓï¾ä£¬ÕÆÎÕunion,union all,minus,interestµÄʹÓÃ,Äܹ»ÃèÊö½áºÏÔËË㣬²¢ÇÒÄܹ»½«¶à¸ö²éѯ×éºÏµ½Ò»¸ö²éѯÖÐÈ¥£¬Äܹ»¿ØÖÆÐзµ»ØµÄ˳Ðò¡£
°üº¬¼¯ºÏÔËËãµÄ²éѯ³ÆΪ¸´ºÏ²éѯ¡£¼û±í¸ñ1-1
±í1-1
Operator         Returns       ......

Oracle´´½¨±í¿Õ¼ä¡¢´´½¨Óû§ÒÔ¼°ÊÚȨ¡¢²é¿´È¨ÏÞ

  
 ´´½¨ÁÙʱ±í¿Õ¼ä
´´½¨ÁÙʱ±í¿Õ¼ä
CREATE TEMPORARY TABLESPACE test_temp
TEMPFILE 'C:\oracle\product\10.1.0\oradata\orcl\test_temp01.dbf'
SIZE 32M
AUTOEXTEND ON
NEXT 32M MAXSIZE 2048M
EXTENT MANAGEMENT LOCAL;
´´½¨Óû§±í¿Õ¼ä
´´½¨Óû§±í¿Õ¼ä
CREATE TABLESPACE test_data
LOGGING ......

oracle ÔöÁ¿±¸·Ý»Ö¸´²ßÂÔ(»ù´¡ÖªÊ¶)

 
EXPºÍIMPÊÇOracleÌṩµÄÒ»ÖÖÂß¼­±¸·Ý¹¤¾ß¡£Âß¼­±¸·Ý´´½¨Êý¾Ý¿â¶ÔÏóµÄÂß¼­¿½±´²¢´æÈëÒ»
¸ö¶þ½øÖÆת´¢Îļþ¡£ÕâÖÖÂß¼­±¸·ÝÐèÒªÔÚÊý¾Ý¿âÆô¶¯µÄÇé¿öÏÂʹÓÃ,
Æäµ¼³öʵÖʾÍÊǶÁÈ¡Ò»¸öÊý¾Ý¿â¼Ç¼¼¯£¨ÉõÖÁ¿ÉÒÔ°üÀ¨Êý¾Ý×ֵ䣩²¢½«Õâ¸ö¼Ç¼¼¯Ð´ÈëÒ»¸öÎļþ,ÕâЩ¼Ç¼µÄµ¼³öÓëÆäÎïÀíλÖÃÎ޹أ¬µ¼ÈëʵÖʾÍÊǶÁȡת´¢Îļþ²¢
Ö´Ð ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ