ÓÃOracleµÄtkprof·ÖÎöSQLÖ´ÐÐЧÂÊ
ÓÃOracleµÄtkprof·ÖÎöSQLÖ´ÐÐЧÂÊ
1¡¢´ò¿ª¸ú×Ù
SQL> alter session set sql_trace=true;
2¡¢Ö´ÐÐSQL
SQL> select count(*) from xxxx;
3¡¢¹Ø±Õ¸ú×Ù
SQL> alter session set sql_trace=false
4¡¢ÕÒµ½trcÎļþ
Ä¿±êÎļþĿ¼ÔÚ£º
SQL> select value from v$parameter where
name='user_dump_dest';
5¡¢±ä»»trcÎļþΪ¿É¶Á¸ñʽ
tkprof ora10g_ora_26292.trc tkprof0702 explain=username/password
sort=exeela
sortÓÐexeela£ºÖ´ÐÐʱ¼ä£»prsela£ºÓï·¨·ÖÎöʱ¼ä£»fchela£ºÌáȡʱ¼ä
Ïà¹ØÎĵµ£º
import java.sql.*;
/*
* JAVAÁ¬½ÓACCESS£¬SQL Server,MySQL,OracleÊý¾Ý¿â
*
* */
public class JDBC {
public static void main(String[] args)throws Exception {
Connection conn=null;
//====Á¬½ÓACCESSÊý¾Ý¿â ......
http://www.umgr.com/blog/PostView.aspx?bpId=36294
1. Ö´ÐÐsqlÓï¾ä
int sqlite3_exec(sqlite3*£¬ const char *sql£¬ sqlite3_callbacksql Óï·¨
£¬ void *£¬ char **errmsg );
Õâ¾ÍÊÇÖ´ÐÐÒ»Ìõ sql Óï¾äµÄº¯Êý¡£
µÚ1¸ö²ÎÊý²»ÔÙ˵ÁË£¬ÊÇÇ°Ãæopenº¯ÊýµÃµ½µÄÖ¸Õ롣˵ÁËÊǹؼüÊý¾Ý½á¹¹¡£
µÚ2¸ö²ÎÊýconst char ......
ÎÒÔÚ°ÑoracleÊý¾Ýµ¼ÈësqlserverÖÐʱ£¬·¢ÏÖÔÚoracleÖÐ×ֶζ¨ÒåΪΨһË÷Òýʱ£¬²»Í¬¼Ç¼µÄ´Ë×Ö¶ÎÈç¹ûΪ¿Õ²»±»ÈÏΪÊÇÖØ¸´µÄ£¬µ«ÔÚsqlserverÖÐÈç¹û´Ë×Ö¶ÎΪΨһË÷Òý×ֶΣ¬²»ÔÊÐíÓÐ2¸öÒÔÉϵĿÕÖµ¡£ÓôÃÆ¡£ËùÒÔÖ»ºÃ½«sqlserverÖеÄΨһË÷Òý×Ö¶ÎÊÖ¹¤ÐÞ¸ÄΪ¼¸¸ö·Ç¿ÕµÄÖµ£¬µ«ÕâÑù³ÌÐò¿Ï¶¨Òª½øÐÐÐÞ¸ÄÁË¡£ÐèÒªÔÚ³ÌÐòÖÐΪ´Ë×Ö¶ÎÉèÖò»Öظ´ ......
ÔÚORACLEÖиø±í¡¢ÁÐÔö¼Ó×¢ÊÍÒÔ¼°¶ÁȡעÊÍ
1¡¢¸ø±íÌî¼Ó×¢ÊÍ£ºSQL>comment on table ±íÃû is '±í×¢ÊÍ";
2¡¢¸øÁмÓ×¢ÊÍ£ºSQL>comment on column ±í.ÁÐ is 'ÁÐ×¢ÊÍ';
3¡¢¶ÁÈ¡±í×¢ÊÍ£ºSQL>select * from user_tab_comments where comments is not null;
4¡¢¶ÁÈ¡ÁÐ×¢ÊÍ£ºSQL>select * from user_col_commnents wh ......
Oracle ´¥·¢Æ÷ÓÐÓï¾ä¼¶´¥·¢Æ÷ºÍÐм¶´¥·¢Æ÷
Óï¾ä¼¶´¥·¢Æ÷ µ±É¾³ý²¿ÃűíÖеIJ¿ÃźÅʱ£¬Í¬Ê±É¾³ýµôÔ±¹¤±íÖв¿ÃźÅΪ£ºold.deptnoµÄ¼Ç¼
create or replace trigger del_dept_id
after delete on dept
for each row
begin
delete from emp where deptno=:old.deptno;
end;
µ±Íù²¿Ãűí²åÈëʱ£¬Í¬Ê±ÔÚÔ±¹¤±íÖ ......