Oracle±í¿Õ¼ä
Oracle´´½¨É¾³ýÓû§¡¢½ÇÉ«¡¢±í¿Õ¼ä¡¢µ¼Èëµ¼³ö¡¢...ÃüÁî×ܽá
//´´½¨ÁÙʱ±í¿Õ¼ä
create temporary tablespace zfmi_temp
tempfile 'D:\oracle\oradata\zfmi\zfmi_temp.dbf'
size 32m
autoextend on
next 32m maxsize 2048m
extent management local;
//tempfile²ÎÊý±ØÐëÓÐ
//´´½¨Êý¾Ý±í¿Õ¼ä
create tablespace zfmi
logging
datafile 'D:\oracle\oradata\zfmi\zfmi.dbf'
size 100m
autoextend on
next 32m maxsize 2048m
extent management local;
//datafile²ÎÊý±ØÐëÓÐ
//ɾ³ýÓû§ÒÔ¼°Óû§ËùÓеĶÔÏó
drop user zfmi cascade;
//cascade²ÎÊýÊǼ¶ÁªÉ¾³ý¸ÃÓû§ËùÓжÔÏ󣬾³£Óöµ½ÈçÓû§ÓжÔÏó¶øÎ´¼Ó´Ë²ÎÊýÔòÓû§É¾²»Á˵ÄÎÊÌ⣬ËùÒÔϰ¹ßÐԵļӴ˲ÎÊý
//ɾ³ý±í¿Õ¼ä
ǰÌ᣺ɾ³ý±í¿Õ¼ä֮ǰҪȷÈϸñí¿Õ¼äûÓб»ÆäËûÓû§Ê¹ÓÃÖ®ºóÔÙ×öɾ³ý
drop tablespace zfmi including contents and datafiles cascade onstraints;
//including contents ɾ³ý±í¿Õ¼äÖеÄÄÚÈÝ£¬Èç¹ûɾ³ý±í¿Õ¼ä֮ǰ±í¿Õ¼äÖÐÓÐÄÚÈÝ£¬¶øÎ´¼Ó´Ë²ÎÊý£¬±í¿Õ¼äɾ²»µô£¬ËùÒÔϰ¹ßÐԵļӴ˲ÎÊý
//including datafiles ɾ³ý±í¿Õ¼äÖеÄÊý¾ÝÎļþ
//cascade constraints ͬʱɾ³ýtablespaceÖбíµÄÍâ¼ü²ÎÕÕ
Èç¹ûɾ³ý±í¿Õ¼ä֮ǰɾ³ýÁ˱í¿Õ¼äÎļþ£¬½â¾ö°ì·¨:
Èç¹ûÔÚÇå³ý±í¿Õ¼ä֮ǰ£¬ÏÈɾ³ýÁ˱í¿Õ¼ä¶ÔÓ¦µÄÊý¾ÝÎļþ£¬»áÔì³ÉÊý¾Ý¿âÎÞ·¨Õý³£Æô¶¯ºÍ¹Ø±Õ¡£
¿ÉʹÓÃÈçÏ·½·¨»Ö¸´£¨´Ë·½·¨ÒѾÔÚoracle9iÖÐÑé֤ͨ¹ý£©£º
ÏÂÃæµÄ¹ý³ÌÖУ¬filenameÊÇÒѾ±»É¾³ýµÄÊý¾ÝÎļþ£¬Èç¹ûÓжà¸ö£¬ÔòÐèÒª¶à´ÎÖ´ÐУ»tablespace_nameÊÇÏàÓ¦µÄ±í¿Õ¼äµÄÃû³Æ¡£
$ sqlplus /nolog
SQL> conn / as sysdba;
Èç¹ûÊý¾Ý¿âÒѾÆô¶¯£¬ÔòÐèÒªÏÈÖ´ÐÐÏÂÃæÕâÐУº
SQL> shutdown abort
SQL> startup mount
SQL> alter database datafile 'filename' offline drop;
SQL> alter database open;
SQL> drop tablespace tablespace_name including contents;
//´´½¨Óû§²¢Ö¸¶¨±í¿Õ¼ä
create user zfmi identified by zfmi
default tablespace zfmi temporary tablespace zfmi_temp;
//identified by ²ÎÊý±ØÐëÓÐ
//ÊÚÓèmessageÓû§DBA½ÇÉ«µÄËùÓÐȨÏÞ
GRANT DBA TO zfmi;
//¸øÓû§ÊÚÓèȨÏÞ
grant connect,resource to zfmi; (db2£ºÖ¸¶¨ËùÓÐȨÏÞ)
µ¼Èëµ¼³öÃüÁ
OracleÊý¾Ýµ¼Èëµ¼³öimp/exp¾ÍÏ൱ÓÚoracleÊý¾Ý»¹ÔÓ뱸·Ý¡£expÃüÁî¿ÉÒÔ°ÑÊý¾Ý´ÓÔ¶³ÌÊý¾Ý¿â·þÎñÆ÷µ¼³öµ½±¾µØµÄdm
Ïà¹ØÎĵµ£º
±ítask£¬×Ö¶Îid_£¬name_
id_µÄÊý¾ÝÈçÏÂÐÎʽ£º
1
1.1
1.1.1
1.1.1.2
1.2
1.2.1
...
10
10.1
10.1.1
10.2.1
10.2.1.1
10.2.1.1.1
10.2.1.1.2
.......
×¢£º“.”±êʶ¸¸×ӵĹØÏµ¡£
ÏÖÔÚͨ¹ýid_²éѯÊ÷½á¹¹µÄЧ¹û£¬²¢ÇÒÖªµÀ´Ë½ÚµãÊÇ·ñΪҶ×Ó½Úµãleaf¡£¡££¿
Óï¾äÈçÏ£º
select
......
²»¿ÉÒÔÓñ£Áô×Ö×öΪ±íÃû£¬×Ö¶ÎÃûµÄ¡£
Èç¹ûÓõ¥¸öÓ¢Óïµ¥´Ê»ò´Ê×éÀ´±íʾ±íÃû»ò×Ö¶ÎÃû¡£Õâ±È½ÏÈÝÒ׺ͱ£Áô×Ö³åÍ»¡£ÈçºÎÖªµÀOracleÓÃÁËÄÄЩ±£Áô×ÖÄØ£¿
ϵͳ±ív$reserved_wordsÖдæ·ÅÁËËùÓеı£Áô×Ö¡£
select * from v$reserved_words;
OracleÓÐ500¸ö±£Áô×Ö£¬¼ÇסËùÓеı£Áô×ÖÓеãÀ§ÄÑ£¬Ã¿´Î¶¼²éÕÒ»áÓ°Ïìµ½¿ª·¢ËÙ¶È£¬Èç ......
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_crypto.htm
oracle×Ô´øÎĵµÐ´µÄ±È½ÏÇå³þ
24
DBMS_CRYPTO
DBMS_CRYPTO
provides an interface to encrypt and
decrypt stored data, and can be used in conjunction with PL/SQL
programs running network communications. It provides suppo ......
oracle ·ÖÇø±íµÄ½¨Á¢·½·¨
OracleÌṩÁË·ÖÇø¼¼ÊõÒÔÖ§³ÖVLDB(Very Large DataBase)¡£·ÖÇø±íͨ¹ý¶Ô·ÖÇøÁеÄÅжϣ¬°Ñ·ÖÇøÁв»Í¬µÄ¼Ç¼£¬·Åµ½²»Í¬µÄ·ÖÇøÖС£·ÖÇøÍêÈ«¶ÔÓ¦ÓÃ͸Ã÷¡£
OracleµÄ·ÖÇø±í¿ÉÒÔ°üÀ¨¶à¸ö·ÖÇø£¬Ã¿¸ö·ÖÇø¶¼ÊÇÒ»¸ö¶ÀÁ¢µÄ¶Î£¨SEGMENT£©£¬¿ÉÒÔ´æ·Åµ½²»Í¬µÄ±í¿Õ¼äÖС£²éѯʱ¿ÉÒÔͨ¹ý²éѯ±íÀ´·ÃÎʸ÷¸ö· ......
»ù±¾´ÓÀ´²»ÓÃleft/right join
Ò»¸öÏîÄ¿±»ÆÈÒªÓñðÈËдµÄ sql
±¾´òËã¸ÄдһÏ£¬Ìá¸ßЧÂÊ
·¢ÏÖ£º
¡¾1¡¿
select * from a
left outer join b on a.id= b.id AND ...1...
where ...2...
Óë
¡¾2¡¿
select * from a , b
where a.id= b.id(+)
A ......