-
Rename Table in Oracle
SYNTAX alter table table_name rename to new_table_name; Example alter table employee rename to employee_bak;
-
Long to Varchar2
I got tangled with a problem on the datatype LONG in Oracle which is still being used in a number of applications. Siebel, is actually one of them. When I was tasked to extract some data from one of the tables in EIM using C++, I run into this problem. I googled for answer and…
-
Explain Plan in Oracle SQL*Plus
In case you only have SQL*Plus as your editor, you can use the following codes to show the execution plan of your query. First Step : create plan EXPLAIN PLAN FOR SELECT field1, field2 FROM table; Second Step: show results SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY); You will need the necessary privileges to execute this. You’ll also…
-
Monitor Oracle DB Server Processes
To see DB processes running on your Oracle DB, the code below can be used. Specially handy if you want to check which part of your package or stored procedure is taking time to execute. Indispensable for performance tuning. SELECT sess.sid, sess.serial#, sess.sql_child_number, sess.sql_exec_id, sess.process, sess.status, sess.username, sess.osuser, sess.program, sess.schemaname, sql.sql_text FROM v$session sess, v$sql…
Recent Comments