Notes by Dr. Xi

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 March 05, 2011 15:17:58    Last update: March 05, 2011 15:19:51
To change the default character set of a database: ALTER DATABASE database_name CHARSET charset_name or ALTER DATABASE database_name COLLATE collation_nam... but this only changes the default character set or collation, it doesn't change the charset or collation of existing tables. Use ALTER TABLE to change the charset of an existing table: Change the default charset or collation for a table (existing columns are untouched!): ALTER TABLE table_name CHARSET charset_name | COLL... Convert a table to a new charset: ALTER TABLE table_name CONVERT TO CHARSET charset_... Warning: character set conversion may not be a simple process, c.f.: Converting Database Character Sets .
Created by Dr. Xi on March 05, 2011 14:39:42    Last update: March 05, 2011 14:40:35
Select from information_schema : mysql> select cc.character_set_name -> from... Other columns available from the information_schema tables: mysql> desc tables; +-----------------+--------... Note that show create table <table_name> also works.
Created by Dr. Xi on March 05, 2011 14:31:44    Last update: March 05, 2011 14:32:21
Select from information_schema.tables : mysql> select table_collation from information_sch... Or, show create table mysql.host; CREATE TABLE `host` ( `Host` char(60) collate...
Created by Dr. Xi on August 31, 2008 20:43:44    Last update: January 22, 2011 12:48:08
It's probably more useful to make the JavaScript executor a bookmarklet. That way it gains access to the page on which it is invoked. Therefore, more helpful while debugging. Here's the code: <html> <body> <a href="javascript:(funct... Or, you can add this link to your bookmarks, name it "JS Executor". For a full featured JavaScript console, you may need Jash
Created by Dr. Xi on March 18, 2010 21:37:41    Last update: March 18, 2010 21:37:41
You run an update and it hangs. Use this query to find out who's locking the table. select o.object_type, o.object_nam...
Created by Dr. Xi on February 18, 2010 21:17:34    Last update: February 18, 2010 21:17:34
-- add a foreign key to abother table alter tab...
Created by Dr. Xi on February 18, 2010 21:04:13    Last update: February 18, 2010 21:04:13
-- disable foreign key alter table my_table...
Created by Dr. Xi on January 07, 2010 23:40:28    Last update: February 09, 2010 03:24:35
This is a utility to generate SQL insert statements for Oracle for one table, or a set of tables. It doesn't cover all possibilities but should be good enough for most cases. import java.io.*; import java.sql.*; import ... To generate insert statements for multiple tables, simply put the table names in a file, one per line, and use the -f switch.
Created by Dr. Xi on February 06, 2010 00:25:00    Last update: February 06, 2010 00:26:50
Solution: grant unlimited tablespace to <user> or alter user <user_name> quota 250m on <tablespace_n... Example: SQL> create table customer ( 2 id number(9),...
Previous  1 2 3 4 5 6 Next