ORACLE sqlÓï¾ä±Ê¼Ç
windowsÉÏ´æÔÚ32bitµÄÏÞÖÆ£¬ÈçAIX¡¢HP UNIX µÈÓÐÃ÷È·µÄ64BIT OS and ORACLEµÄ°æ±¾£¬32bit oracle¿ÉÒÔ×°ÔÚ64bit os ÉÏ£¬64 bit oracle²»ÄÜ×°ÔÚ32 bit OSÉÏ
oracleÊÇ64bit or 32 bit,32bit ͨ³£ SGAÓÐ 1.7G µÄÏÞÖÆ(ijЩOSµÄ´¦Àí»òÕßWINDOWSÉÏÓÐÌض¨É趨¿ÉÒÔÖ§³Öµ½2GÒÔÉÏÉõÖÁ´ïµ½3.7G
ÈçºÎ²é³öǰ̨ÕýÔÚ·¢³öµÄsqlÓï¾ä:
select user_name,sql_text from v$open_cursor where sid in (select sid from (select sid,serial#,username,program from v$session where status='ACTIVE'));
ΪÕâ¸ö±í¿Õ¼äÔö¼ÓÒ»¸öÊý¾ÝÎļþ:
alter tablespace ±í¿Õ¼äÃû add datafile '/u1/oradata/userdata_002.ora' size 50m;
ÖØе÷ÕûÊý¾ÝÎļþµÄ´óС:
alter database datafile '/u1/oradata/userdata_001.ora' resize 50M;
񡜧
¡¡¡¡select * from cat;
¡¡¡¡select * from tab;
¡¡¡¡select table_name from user_tables;
ÊÓͼ£º
¡¡¡¡select text from user_views where view_name=upper('&view_name');
Ë÷Òý£º
¡¡¡¡select index_name,table_owner,table_name,tablespace_name,status from user_indexes order by table_name;
´¥·¢Æ÷£º
¡¡¡¡select trigger_name,trigger_type,table_owner,table_name,status from user_triggers;
¿ìÕÕ£º
¡¡¡¡select owner,name,master,table_name,last_refresh,next from user_snapshots order by owner,next;
ͬÒå´Ê£º
¡¡¡¡select * from syn;
ÐòÁУº
¡¡¡¡select * from seq;
Êý¾Ý¿âÁ´Â·£º
¡¡¡¡select * from user_db_links;
Ô¼ÊøÏÞÖÆ£º
¡¡¡¡select TABLE_NAME,CONSTRAINT_NAME,SEARCH_CONDITION,STATUS from user_constraints;
±¾Óû§¶ÁÈ¡ÆäËûÓû§¶ÔÏóµÄȨÏÞ£º
¡¡¡¡select * from user_tab_privs;
±¾Óû§ËùÓµÓеÄϵͳȨÏÞ£º
¡¡¡¡select * from user_sys_privs;
Óû§£º
¡¡¡¡select * from all_users order by user_id;
±í¿Õ¼äÊ£Óà×ÔÓÉ¿Õ¼äÇé¿ö£º
¡¡¡¡select tablespace_name,sum(bytes) ×Ü×Ö½ÚÊý,max(bytes),count(*) from dba_free_space group by tablespace_name£»
Êý¾Ý×ֵ䣺
¡¡¡¡select table_name from dict order by table_name;
Ëø¼°×ÊÔ´ÐÅÏ¢£º
¡¡¡¡select * from v$lock;²»°üÀ¨DDLËø
Êý¾Ý¿â×Ö·û¼¯£º
¡¡¡¡select name,value$ from props$ where name='NLS_CHARACTERSET';
inin.ora²ÎÊý£º
¡¡¡¡select name,value from v$parameter order by name;
SQL¹²Ïí³Ø£º
¡¡¡¡select sql_te
Ïà¹ØÎĵµ£º
¡¡¡¡
¡¡¡¡¡ô¾¡Á¿²»ÒªÔÚwhereÖаüº¬×Ó²éѯ;
¡¡¡¡¹ØÓÚʱ¼äµÄ²éѯ£¬¾¡Á¿²»ÒªÐ´³É£ºwhere to_char(dif_date,'yyyy-mm-dd')=to_char('2007-07-01','yyyy-mm-dd');
¡¡¡¡¡ôÔÚ¹ýÂËÌõ¼þÖУ¬¿ÉÒÔ¹ýÂ˵ô×î´óÊýÁ¿¼Ç¼µÄÌõ¼þ±ØÐë·ÅÔÚwhere×Ó¾äµÄĩβ;
¡¡¡¡from×Ó¾äÖÐдÔÚ×îºóµÄ±í(»ù´¡±í£¬driving table)½«±»×îÏÈ´¦Àí£¬ÔÚfrom×Ó¾äÖа ......
ÓÐÀý±í£ºemp
emp_no name age
001 Tom 17
002 &nb ......
ÈçºÎ²é¿´SQL Server²¹¶¡°æ±¾ [http://www.cnblogs.com/yitian/articles/1285021.html]
1¡¢ÓÃIsql»òÕßSQL²éѯ·ÖÎöÆ÷µÇ¼µ½SQL Server£¬Èç¹ûÊÇÓÃIsql£¬ÇëÔÚcmd´°¿ÚÊäÈëisql -U sa,È»ºóÊäÈëÃÜÂ룬½øÈ룻Èç¹ûÊÇÓÃSQL²éѯ·ÖÎöÆ÷£¬Çë´Ó³ÌÐòÖÐÆô¶¯£¬ÊäÈësaºÍÃÜÂ루Ҳ¿ÉÒÔÓÃwindowsÑéÖ¤£©¡£
2¡¢ÔÚISQLÖÐÊäÈ ......
ÈçºÎ²é¿´SQL Server ²¹¶¡µÄ°æ±¾ [http://blog.sina.com.cn/s/blog_4a5bf0b7010008bz.html]
ÈçºÎ²é¿´SQL Server ²¹¶¡µÄ°æ±¾£¿Õâ¸öÌâÄ¿ÌýÆðÀ´Ê®·ÖÞÖ¿Ú£¬Ó¢ÎÄÓ¦¸ÃÕâÑùд“How to find the service pack version installed on SQL Server using”£¬Õâ¸öÎÊÌâÎÒÒ»Ö±ÔÚÕÒ£¬SQL ServerһֱûÓÐÏñÆ ......