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

Oracle»ù±¾²Ù×÷

1.´´½¨±í¿Õ¼ä
  create tablespace test datafile'c:\test.dbf' size 10m;  //Ãû×Ö²»ÒªÎªÊý×Ö
2.´´½¨Óû§
create user userName identified by password;  //²»ÒªÎªÊý×Ö
3.¸øÓû§ÊÚȨ
grant dba to userName; --ÊÚÓèDBAȨÏÞ
grant unlimited tablespace to userName;--ÊÚÓè²»ÏÞÖƵıí¿Õ¼ä
grant select any table to userName; --ÊÚÓè²éѯÈκαí
grant select any dictionary to userName;--ÊÚÓè ²éѯ ÈκÎ×Öµä
grant connect,resource,dba,imp_full_database,exp_full_database to sa;
4.²ì¿´µ±Ç°µÄÊý¾Ý¿âÃû
select name from v$database;
5.²ì¿´Êý¾Ý¿â¶ÔÏó
select owner, object_type, status, count(*) count# from all_objects group
by owner, object_type, status;
----------Oracle Óû§ÐÅÏ¢----------------
1. ²éѯoracleÖÐËùÓÐÓû§ÐÅÏ¢
select * from dba_users;
2. ²éѯÓû§ºÍÃÜÂë
select username,password from dba_users;
3. ²éѯµ±Ç°Óû§ÐÅÏ¢
select * from dba_ustats;
4. ²éѯÓû§¿ÉÒÔ·ÃÎʵÄÊÓͼÎı¾
Select * from dba_varrays;
5. ²éѯÊý¾Ý¿âÖÐËùÓÐÊÓͼµÄÎı¾
select * from dba_views;
-----------sql plus--------
1.ÊäÈëÓû§ÃûºÍÃÜÂë(systemΪÓû§Ãû)
2.½¨Á¢±í¿Õ¼ä,½¨Á¢Óû§(test/test),ÊÚȨ
3.ʹÓÃtestÓû§µÇ½
connect test/test        --connect
#sqlplus/nolog
#connect sys/test1234 as sysdba
######  sqlplus "sys/teset1234 as sysdba"
######  sqlplus "myccc/qwe"
4.½¨±í
CREATE TABLE count
(num1 NUMBER(4,2),
num2 NUMBER(5,2),
result NUMBER(6,2));
5.²åÈëÊý¾Ý
INSERT INTO count(num1,num2,result) VALUES(1,1,2);
INSERT INTO count(num1,num2,result) VALUES(1,1,1);
INSERT INTO count(num1,num2,result) VALUES(2,8,10);
INSERT INTO count(num1,num2,result) VALUES(68,90,158);
6.Ìá½»Êý¾Ý
commit;


Ïà¹ØÎĵµ£º

oracle ×Ö·û¼¯ÎÊÌâ

1.oracle×Ö·û¼¯ÎÊÌ⣺
Êý¾Ý¿â×Ö·û¼¯ÎªZHS16BGK£¬ºº×ÖÔÚÊý¾Ý¿â´æ·ÅµÄʱºòÕ¼ÓÃÁ½¸ö×Ö½Ú
Êý¾Ý¿â×Ö·û¼¯ÎªUTF8£¬ºº×ÖÔÚÊý¾Ý¿âÀï´æ·ÅµÄʱºòÕ¼ÓÃÈý¸ö×Ö½Ú
ÓÉÓÚ×Ö·û¼¯²»Í¬£¬µ¼ÖÂÏÖÔÚÊý¾Ý¿âIMPµÄʱºòÓÐЩ±íµÄ×ֶγ¤¶È²»¹»£¬³öÏÖORA-12899: value too large for columnµÄ´íÎó¡£
ͨ¹ýÐÞ¸Ä×Ö·û¼¯¿ÉÒÔ½â¾öÕâÖÖÎÊÌâ¡£
2.utf-8ºÍunico ......

netÏÂÈçºÎ½«EXCELµ¼Èëµ½oracleÖÐ

¿ª·¢»·¾³ VS2008+NET3.5+ORACLE10G
Êý¾Ý¿âÖбíÉè¼Æ
CREATE TABLE CCOP (
A CHAR(20) NULL,
B CHAR(20) NULL,
C CHAR(20) NULL,
D CHAR(20) NULL
)
EXCELµÄµÚÒ»ÐÐÇ°ËÄÁÐÁÐÃûΪ A B C D
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using Sys ......

oracle method

--single line method
select ascii('A') Big_A from dual;
select chr(65) A, chr(122) z, chr(223) ch3 from dual;
select concat('sigo','way') from dual;
select initcap('sigoway') from dual;
select instr('ababab','a',-1,2), instr('ababab','a',1,3) from dual;
select instrb('ababab','a',1,3) from dua ......

Oracle OSÈÏÖ¤ÒÔ¼°¿ÚÁîÎļþ

 1.OSÈÏÖ¤
Oracle°²×°Ö®ºóĬÈÏÇé¿öÏÂÊÇÆôÓÃÁËOSÈÏÖ¤µÄ£¬ÕâÀïÌáµ½µÄosÈÏÖ¤ÊÇÖ¸·þÎñÆ÷¶ËosÈÏÖ¤¡£OSÈÏÖ¤µÄÒâ˼°ÑµÇ¼Êý¾Ý¿âµÄÓû§ºÍ¿ÚÁîУÑé·ÅÔÚÁ˲Ù×÷ϵͳһ¼¶¡£Èç¹ûÒÔ°²×°OracleʱµÄÓû§µÇ¼OS£¬ÄÇô´ËʱÔڵǼOracleÊý¾Ý¿âʱ²»ÐèÒªÈκÎÑéÖ¤£¬È磺
SQL> connect /as sysdba
ÒÑÁ¬½Ó¡£
SQL> connect sys/aaa@te ......

ÈçºÎ¿ª·¢ORACLE´æ´¢¹ý³Ì

 Ò». ¸ÅÊö
¡¡¡¡Oracle´æ´¢¹ý³Ì¿ª·¢µÄÒªµãÊÇ£º
¡¡¡¡• ʹÓÃNotepadÎı¾±à¼­Æ÷£¬ÓÃOracle PL/SQL±à³ÌÓïÑÔдһ¸ö´æ´¢¹ý³Ì;
¡¡¡¡• ÔÚOracleÊý¾Ý¿âÖд´½¨Ò»¸ö´æ´¢¹ý³Ì;
¡¡¡¡• ÔÚOracleÊý¾Ý¿âÖÐʹÓÃSQL*Plus¹¤¾ßÔËÐд洢¹ý³Ì;
¡¡¡¡• ÔÚOracleÊý¾Ý¿âÖÐÐ޸Ĵ洢¹ý³Ì;
¡¡¡¡• ͨ¹ý±àÒë´íÎóµ÷ÊÔ´æ´ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ