RSS feed [root] /database /weblog /vendor



title search:


Thu Dec 22 10:19:08 HKT 2016


(google search) (amazon search)
download zip of files only

Sat Mar 31 16:14:54 HKT 2018 From /weblog/database/vendor


SQL 2005 JDBC fix the resultset re-read throws exception problem. However, you need to use executeUpdate() for insert,update and delete instead of execute() for SQL 2005 JDBC, otherwise will throw exception on this.

Other that, statement.executeBatch() will throws exception:[..]kid=e13a8009-7466-4803-ba19-6bfd4b5f8966

New function of SQL server 2014, In-Memory Optimization tables, suppose to be faster? - MOT table also support native compiled query - , and lock free write?

From microsoft, Use the columnstore index to achieve up to 10x query performance gains over traditional row-oriented storage, and up to 7x data compression over the uncompressed data size. -

A tool from M$ to help sql server user to manage change of database: . Other similar product is DBGhost, also only work for SQL server

There is a free version of SQL server 2005 call SQL server express, which just like MSDE

Here is a comparison:[..]le/ArticleID/49618/sql_server_49618.html , may be we can use that instead of MSDE 2005 and discoutinue support of SQL server 2000 so that we can test one thing less?

Import CSV to SQL server -[..]oad-comma-delimited-file-csv-in-sql.html

Shriking DB cause performance problem... not sure how long this finding is hold -[..]eases-fragmentation-reduces-performance/[..]ver-storage-internals-part-1-basics.aspx

Get the metadata -[..]-metadata-from-sql-server-catalog-views/[..]icrosoft-sql-server-metadata-developers/

Date functions -[..]roduction-to-sql-servers-date-functions/

Enhancement of 2016 -

Tool to rescue sql server -

Prevent locking with NOLOCK / READPAST -[..]-and-readpast-table-hints-in-sql-server/

(google search) (amazon search)

Wed Feb 22 15:10:51 HKT 2017 From /weblog/database/vendor


Few distributed SQL DB vendor information -

Approximation DB -[..]e-200x-faster-without-having-to-pay.html

Discuss and compare difference technology of querying journey(log) data -[..]on-log-and-data-storage-query-techniques

(google search) (amazon search)

Wed Oct 19 01:41:16 HKT 2016 From /weblog/database/vendor


PostgreSQL schema is way fast and easy to change than MySQL, although maybe slower -[..]grating-from-mysql-to-postgresql-slides/

Subindexes that can save you space and make updates faster by reusing an existing multi-column index.
Expression indexes that speed up queries with WHERE clauses matching a function of the columns instead of raw values.
Partial indexes that are much smaller than a complete index because they don't contain data that the app doesn't care about.[..]l-indexing-tricks-that-surprise-everyone

Experience sharing, stored proc is better?

(google search) (amazon search)

Thu Jun 23 07:23:32 HKT 2016 From /weblog/database/vendor


Some comment saying that you cannot complain oracle for non-standard setup... However, should I break anything else just to install oracle? Anyway, may be a useful resource of installing oracle cluster -

Oracle SQL links -

Pure java solution to full text search -[..]nning-lucene-inside-your-oracle-jvm.html

Oracle does allow definitions of user-defined types.Please see[..]er.111/b28286/sql_elements001.htm#i46376

User-defined types can then be used for column definitions. See e.g.
the fourth example given here[..].111/b28286/statements_7002.htm#i2062833

Oracle also allows creation of a table based on one user-defined type,
i.e. an "object table".
See here[..].111/b28286/statements_7002.htm#i2159410

User-defined types can be changed; see[..].111/b28286/statements_4002.htm#i2057828
Oracle even offers an option as to whether existing data in tables
based on previous type definition is converted or not; see[..].111/b28286/statements_4002.htm#i2079300
There are a couple of pages in the Object-Relational Developer's Guide explaining the consequences, briefly...

Note: all links above are to Oracle 11g documentation, but many, if not all, of these features have been available since 9i.

row base permission -[..]/oracle/virtual-private-database-oracle/

How fetch size can affect performance -[..]jdbc-performance-tuning-with-fetch-size/

Recycle bin for Oracle 10g -[..]ecycle-bin-in-database.html#.UNXprSUqthH

Oracle won't put null in index... how can we find the column with issue out? -[..]12/the-index-youve-added-is-useless-why/

You can have java like stacetrace at PLSQL -

Need to be careful about using rownum to limit the result in oracle -[..]racle-limit-returned-records-with-rownum

(google search) (amazon search)

Fri Aug 28 18:19:53 HKT 2015 From /weblog/database/vendor


If you get following exception with Sybase ASE drive:

'System.Reflection.TargetInvocationException, Msg=Exception has been thrown by the target of an invocation.
Exception details: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for 'Sybase.Data.AseClient.AseConnection' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'sybdrvado115a.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at ?.AseGetDriverVersion(StringBuilder A_0, Int32 A_1)
at Sybase.Data.AseClient.AseConnection.?()
at Sybase.Data.AseClient.AseConnection..cctor()
--- End of inner exception stack trace ---
at Sybase.Data.AseClient.AseConnection..ctor(String connectionString)

Please make sure the program can see sybdrvado115.dll, msvcp71.dll and msvcr71.dll in that same directory


Query to check blocking at sybase:
select spid,suser_name(suid),cmd,status,blocked,time_blocked,physical_io from master..sysprocesses where blocked <> 0

(google search) (amazon search)

Mon May 26 15:30:30 HKT 2014 From /weblog/database/vendor


It is surprising for me that it is this easy -

MySQL Proxy for table partition -

NoSQL way to access data in MySQL -[..]0/10/using-mysql-as-nosql-story-for.html

The lock level of mysql -[..]ql-transaction-isolation-levels-and.html

(google search) (amazon search)

Wed Jan 30 17:24:04 HKT 2008 From /weblog/database/vendor

oracle cookbook

After default install of oracle at win32, here is the step of creating user:

1) sqlplus /noloh (enter sqlplus shell without login)
2) connect oracle/oracle as sysdba (super user connection)
grant dba to CITY;

-- Grant/Revoke system privileges
grant create view to CITY;
grant unlimited tablespace to CITY;

imp CITY/city full=y file=c:\xxxxx.dmp

6) sqlplus city (try login)

About create table space

create tablespace TBL01 datafile 'H:\oracle\oradata\ora9\TBL01.dbf' size 50M extent management local segment space management auto;

Other useful views
1) sys.dba_tablespaces;
2) sys.dba_users
3) v$database
4) dba_data_files
5) v$datafile

Start and stop oracle batch
net start OracleCSService
net start OracleDBConsole[db name]
net start OracleOraDb10g_home1iSQL*Plus
net start OracleOraDb10g_home1TNSListener
net start OracleService[db name]

net stop OracleCSService
net stop OracleDBConsole[db name]
net stop OracleOraDb10g_home1iSQL*Plus
net stop OracleOraDb10g_home1TNSListener
net stop OracleService[db name]

An useful link:

How to install oracle in Redhat 9 -

Check store procedure issues: select * from user_errors

If there is join like a.column1 = b.column2, and column1 in DATE datatype while column2 is VARCHAR2 datatype, oracle will auto-cast it in JDeveloper, but always return false if I call that stored procedure using JDBC.

Show plsql function detail implementation: select text from user_source where name = MY_PROCEDURE order by line; -

It is possible to get NullPointerException from oracle driver with IBM JDK... it look like IBM issue -[..]s/forums/message.jspa?messageID=13980641

plsql result caching -[..]ed-up-database-code-with-result-caching/

Oracle date foramt -

(google search) (amazon search)