Recent Notes

Displaying keyword search results 1 - 10
Created by Dr. Xi on February 06, 2012 12:14:11    Last update: February 07, 2012 15:39:35
Oracle sqlplus command line tools does not support command line editing out-of-the-box. But on Linux there's a handy utility that enables command line editing with any command line tool: rlwrap - readline wrapper. Install rlwrap: $ sudo apt-get install rlwrap Create a keywords file .sql.dict (optional, but convenient): false null true access add as asc begin by chec... It would be nice to add the tables names also. Create an alias for sqlplus (put it in .bashrc ): alias sqlplus='rlwrap -f $HOME/.sql.dict sqlplus'
Created by Dr. Xi on August 19, 2009 03:44:35    Last update: August 19, 2009 03:44:35
C:\>sqlplus sys@xe as sysdba SQL*Plus: Rele...
Created by Dr. Xi on August 15, 2009 17:15:59    Last update: August 15, 2009 17:28:29
Operations Privileges Required CREATE/DROP/MONITOR own queues Must have EXECUTE rights on DBMS_AQADM ENQUEUE/DEQUEUE to own queues Must have EXECUTE rights on DBMS_AQ ENQUEUE/DEQUEUE to other's queues Must have EXECUTE rights on DBMS_AQ Queue owner must grant privileges using DBMS_AQADM.GRANT_QUEUE_PRIVILEGE CREATE/DROP/MONITOR any queues Must have EXECUTE rights on DBMS_AQADM Must be granted AQ_ADMINISTRATOR_ROLE ENQUEUE/DEQUEUE to any queues Must have EXECUTE rights on DBMS_AQ Must be granted " ENQUEUE_ANY " or " DEQUEUE_ANY " system privileges using DBMS_AQADM.GRANT_SYSTEM_PRIVILEGE Examples: -- Create an admin CREATE ROLE MY_AQ_ADMIN_ROLE...
Created by Dr. Xi on September 05, 2007 22:33:13    Last update: July 28, 2009 23:33:36
Create a synonym: -- create a private synonym CREATE SYNONYM emp ... Remove a synonym: -- Drop public synonym DROP PUBLIC SYNONYM emp;... View synonyms: select * from dba_synonyms where TABLE_OWNER = 'SC...
Created by Dr. Xi on November 14, 2008 23:11:05    Last update: November 14, 2008 23:11:05
SQL> drop table update_queue_tab; drop table up... Following a tip on dbaforums.org , I entered alter session set events '10851 trace name context... And was able to drop the table with drop table update_queue_tab
Created by Dr. Xi on November 13, 2008 17:32:38    Last update: November 13, 2008 17:34:18
-- Drop both package spec and body -- SCHEM...
Created by Dr. Xi on September 11, 2008 03:27:50    Last update: September 11, 2008 03:27:50
-- To drop a procedure DROP PROCEDURE my_test_p...
Created by Dr. Xi on September 10, 2008 22:24:48    Last update: September 10, 2008 22:32:10
Drop one column: alter table my_table drop column column1; Drop two columns: -- no column keyword here alter table my_table...
Created by Dr. Xi on August 29, 2008 18:45:25    Last update: August 29, 2008 18:45:25
This is the syntax to drop a foreign key: ALTER TABLE my_table DROP CONSTRAINT fk_my_fore...
Created by Dr. Xi on April 03, 2008 23:05:21    Last update: April 03, 2008 23:05:21
alter table my_table modify the_column null;