orale tablespace&datafile oracle±í¿Õ¼ä
ÔÚÇ°ÃæѧϰOracleÊý¾Ý¿â»ù´¡¼Ü¹¹Ê±£¬ÒѾÁ˽âÁËOracleµÄ´æ´¢½á¹¹£¬Âß¼ÉÏ£¬OracleµÄÊý¾Ý´æ·ÅÔÚtablespacesÖУ¬ÎïÀíÉÏ´æ·ÅÔÚdatafilesÖС£Ò»¸ötablespaceÖ»ÄÜÊôÓÚÒ»¸öÊý¾Ý¿â(Ò»¸öÊý¾Ý¿â¿É°üÀ¨¶à¸ötablespace)£¬°üÀ¨ÁË1¸ö»ò¶à¸öÊý¾ÝÎļþ¡£Tablespace¿É½øÒ»²½·ÖΪsegments¡¢extentsºÍblocks¡£Ò»¸ödatafileÖ»ÊôÓÚÒ»¸öÊý¾Ý¿âµÄÒ»¸ötablespace¡£
TablespaceµÄ·ÖÀàÓÐ2ÖÖ£¬Ò»ÖÖ·ÖΪSYSTEM tablespaceºÍNon-SYSTEM tablespace¡£
SYSTEM tablespaceÊÇËæÊý¾Ý¿âµÄ´´½¨¶ø´´½¨µÄ£¬°üº¬ÁËÊý¾Ý×ÖµäºÍSYSTEM undo segment£»Non-SYSTEM tablespace°üÀ¨ÁË·ÖÅä¸øÓû§µÄ¿Õ¼ä±ãÓÚÊý¾Ý¿âµÄ¿Õ¼ä¹ÜÀí¡£
ÁíÒ»ÖÖ·ÖΪpermanent¡¢undo¡¢temporaryÈýÖÖtablespace¡£Ò»°ã²»¼ÓÌرð˵Ã÷ʱËù´´½¨µÄpermanent tablespace£¬±£´æÓÀ¾ÃÐÔ¶ÔÏó£»undo tablespaceÓÃÓÚ±£´æundo segmentsÒÔ±ãÓڻعö²Ù×÷£¬¶ø²»ÄÜ°üº¬ÆäËû¶ÔÏó£»temporary tablespaceÊÇÓÃÓÚ½øÐÐÅÅÐò²Ù×÷£¬Äܹ»±»¶à¸öÓû§¹²Ïí£¬²»ÄÜ°üº¬ÓÀ¾ÃÐÔ¶ÔÏó.
Temporary tablespaceÖÐÓÐÒ»¸ödefault temporary tablespace£¬Ö¸¶¨ÁËÒ»¸öÈ«¾ÖµÄĬÈÏÁÙʱ±í¿Õ¼ä£¬Èç¹ûûÓÐÕâ¸ö±í¿Õ¼ä£¬Ä¬ÈÏÇé¿öÏ£¬ÊÇʹÓÃSYSTEM tablespaceÀ´´æ´¢ÁÙʱÊý¾ÝµÄ£¬ÏÔÈ»£¬ÕâÊDz»ºÃµÄ£¬Ä¬ÈÏÁÙʱ±í¿Õ¼äÖ»ÓÐÒ»¸ö£¬¿ÉÒÔ´Ó±ídatabase_propertiesÖв鿴default temp tablespace£¬ÔÚеÄdefault temp tablespace±»´´½¨Ö®Ç°£¬ÊDz»Äܱ»droppedµÄ¡£
ºÍtablespaceÒÔ¼°datafileÏà¹ØµÄÊý¾Ý×ÖµäÓÐ:dba_tablespaces¡¢v$tablespace¡¢dba_data_files¡¢v$datafile¡¢dba_temp_files¡¢v$tempfile¡£
1¡¢´´½¨±í¿Õ¼ä
´´½¨±í¿Õ¼äµÄÍêÕûÃüÁî:
Create [undo] tablespace <ts_name>
datafile <file_spec1> [,<file_spec2>]
mininum extent <m> k|m
blocksize <n> [k]
logging clause
force logging
default storage_clause
online | offline
permanent | temporary
extent_manager_clause
segment_manager_clause
1)¡¢undoÖ¸¶¨ÏµÍ³½«´´½¨Ò»¸ö»Ø¹ö±í¿Õ¼ä
2£©¡¢tablespaceÖ¸¶¨±í¿Õ¼äÃû³Æ
3)¡¢datafileÖ¸¶¨Êý¾ÝÎļþµÄ·¾¶¡¢Ãû³Æ¡¢´óС¼°×ÔÔö³¤×´¿ö£º¾ßÌåÐÎÈç'E:\oracle\product\10.2.0\oradata\orcl\TEST.DBF' size 50M autoextend on next 10M maxsize 500M£¬Ò²¿ÉÒÔÖ¸¶¨onΪoff£¬¾ÍûÓкóÃæµÄµÝÔöºÍ×î´ó³ß´çÁË£¬Ò²¿ÉÒÔÔÚmaxsizeºóÃæÖ¸¶¨×î´ó³ß´çunlimited˵Ã÷±í¿Õ¼äÎÞÏÞ´ó¡£
4)¡¢mininum extent <m> k|mÖ¸³öÔÚ±í¿Õ¼äµÄextentµÄ×îСֵ£¬Õâ¸ö²ÎÊý¿É
Ïà¹ØÎĵµ£º
Ë÷Òý¾Û´Ø±í
create cluster emp_dept_cluster
(deptno number(2)) size 1024;
size 1024 ±íʾÿ¸ö¾Û´Ø¼üÖµ¹ØÁª´óÔ¼1024×Ö½ÚµÄÊý¾Ý,
oracle»áÔÚÓÃÕâ¸öÊý¾Ý¿â¿éÉÏͨ¹ýsize¼ÆËã×î¶à¿ÉÒԷŶàÉÙ¸ö´Ø
Èç¹û¿éÊÇ8KB,ÄÇôÕâ¸ö¿éÉÏ×î¶à·Å7¸ö¾Û´Ø¼ü
Ïò¾Û´ØÖзÅÊý¾Ý֮ǰ,ÐèÒªÏȶԾ۴ؽ¨Á¢Ë÷Òý.
create index emp_dept_cluster_id ......
1¡¢²é¿´Êý¾Ý¿â×Ö·û¼¯
Êý¾Ý¿â·þÎñÆ÷×Ö·û¼¯select * from nls_database_parameters£¬ÆäÀ´Ô´ÓÚprops$£¬ÊDZíʾÊý¾Ý¿âµÄ×Ö·û¼¯¡£
¡¡¡¡
¡¡¡¡¿Í»§¶Ë×Ö·û¼¯»·¾³select * from nls_instance_parameters,ÆäÀ´Ô´ÓÚv$parameter£¬
¡¡¡¡
¡¡¡¡±íʾ¿Í»§¶ËµÄ×Ö·û¼¯µÄÉèÖ㬿ÉÄÜÊDzÎÊýÎļþ£¬»·¾³±äÁ¿»òÕßÊÇ×¢²á±í
¡¡¡¡
¡¡¡¡»á»°×Ö·û¼¯» ......
crsctl stop crs
killall init.crsd
cd /etc/init.d
rm -rf init.crs init.crsd init.cssd init.evmd
rm -rf /tmp/.oracle/
rm -rf /var/tmp/
rm -rf /var/tmp/.oracle/
cd /etc
rm -rf oraInst.loc oracle/ oratab
rm -rf $ORACLE_BASE
dd if=/dev/zero of=/dev/raw/raw_voting_disks bs=1024k
dd if=/dev/zero ......
ÏëʹÓÃPL/SQL¿ª·¢¹¤¾ß£¬µ«²»Ïë°²×°ÄǸö¼¸°ÙÕ×µÄoracle¿Í»§¶Ë£¬ÓÚÊÇ°²×°ÁËoracle 10g inistant client£¬40¶àM°É¡£
°²×°ºóPL/SQL¿ÉÒÔÓÃÁË£¬µ«ÊDzéѯ³ö¼Ç¼ÀïÃæµÄÖÐÎÄÈ´ÊÇÂÒÂë¡£ÕÛÌÚÁ˺þòÅÕÒ³ö½â¾ö·½·¨£º
ÉèÖû·¾³±äÁ¿£ºNLS_LANG£¬ÖµÎªOracleÊý¾Ý¿âÉèÖõÄ×Ö·û¼¯£¬ÔÚÎÒµÄϵͳÀïÃæÉèÖÃÊÇ£ºSIMPLIFIED CHINESE_CHINA.ZHS16GBK ......