... until the collector arrives ...

This "blog" is really just a scratchpad of mine. There is not much of general interest here. Most of the content is scribbled down "live" as I discover things I want to remember. I rarely go back to correct mistakes in older entries. You have been warned :)


Oracle NLS

You can make Oracle change the character sort order using the NLSSORT function, eg:

select * from (
  select 'ab' x from dual
  union select 'Az' from dual
  union select 'Bz' from dual
  union select 'äm' from dual
  union select 'ba' from dual ) x
order by nlssort(x, 'NLS_SORT=LATIN')

will give the results:


You can obtain a list of valid sort orders by running the query:

select * from v$nls_valid_values where parameter='SORT' order by 1, 2



I stumbled across an interesting freeware robot tool for driving Win32 applications:



Windows XP Find Bug

The 'Find Files' feature in Windows XP can never seem to find files that contain text.  The problem appears to be caused by the fact the only files with 'known extensions' are searched.  This can be overridden by setting a registry key to DWORD 1:


This can also be done through the UI for the Indexing Service by setting the property 'Index files with unknown extensions'.  Note that it is not necessary to turn on the indexing service.  This is covered in detail in the KB article:


MS SQL Server, invalid dates, and jTDS

We ran into a problem with the way SQL Server handles invalid dates.  If you attempt to execute a query with a date that is outside the SQL Server accept range, you get the message:

Only dates between January 1, 1753 and December 31, 9999 are accepted.

Furthermore, the server logs show messages like:

2004-08-12 15:56:47.77 spid51 Error: 17805, Severity: 20, State: 3
2004-08-12 15:56:47.77 spid51 Invalid buffer received from client.

Any finally, the server feels that the error is severe enough that it terminates the connection.  This is clearly a bug.  It is discussed in the Microsoft knowledge base article:


Notwithstanding the reference of the Microsoft JDBC driver in the article, this behaviour also occurs when using jTDS.  The only solution at this time is make sure that you don't send dates outside the mandated date range to the server.

This bug is particularly nasty when connection pooling is being used.  Pooled connections are rendered broken after this error occurs.  It is important to use some sort of dead connection testing

Blog Archive