Wednesday, January 17, 2007
How to decide whether any of the two strings is null in Oracle?
I ran into a problem in my project, I have to decide whether there is a string in a list of strings is null or not. The problem is we have two columns from the Oracle DB: first_name, last_name, both of them could be null, we need to format the fullname like "last_name, first_name", but we do not to have the ',' if either last_name or first_name is null. Here comes my solution:
select last_name || nvl2(length(last_name) * length(first_name), ',', null) || first_name from contact_info;
select last_name || nvl2(length(last_name) * length(first_name), ',', null) || first_name from contact_info;
The terminal server has exceeded the maximum number of allowed connections?!
From time to time, I ran into the following warning(errors) when I tried to remote desktop to one of our development box. Here is something I found to figure out who has left his connected connections on the desktop, maybe you can boot them out, if you have permission:
1. mstsc /v:00.00.00.00 /console
Replace 00.00.00.00 with your server's IP Address.
2. Start Terminal Services Manger (Administrative Tools -> Terminal Services Manager, or tsadmin.exe).
Here are some details.
1. mstsc /v:00.00.00.00 /console
Replace 00.00.00.00 with your server's IP Address.
2. Start Terminal Services Manger (Administrative Tools -> Terminal Services Manager, or tsadmin.exe).
Here are some details.
Thursday, January 11, 2007
Having trouble to install Oracle Lite Win32?!
Senario1: For some unknown reason, I screwed up my local installation of the Oracle Lite Win32 client.
Every time when I try to install Oracle Lite Win32 client on my desktop, the setup program always stops at "Stopping clients", finally I found out a workaround for it:
Just remove or rename the c:\windows\odbc.ini and c:\windows\polite.ini file, give the installation a retry.
Now you should have a smoother ride ;-)
Senario2: If your Oracle Lite WIN32 uninstallation program halt on "Loading 'Oracle Lite WIN32'", then you could try to kill the Oracle Lite Device Manger process (dmagent), retry the uninstallation process. You can use command line: taskkill /F /T /IM dmagent.exe
Every time when I try to install Oracle Lite Win32 client on my desktop, the setup program always stops at "Stopping clients", finally I found out a workaround for it:
Just remove or rename the c:\windows\odbc.ini and c:\windows\polite.ini file, give the installation a retry.
Now you should have a smoother ride ;-)
Senario2: If your Oracle Lite WIN32 uninstallation program halt on "Loading 'Oracle Lite WIN32'", then you could try to kill the Oracle Lite Device Manger process (dmagent), retry the uninstallation process. You can use command line: taskkill /F /T /IM dmagent.exe
Thursday, October 5, 2006
Oracle 10g Recyclebin
To disable the recycle bin:
ALTER SESSION SET recyclebin = OFF;
ALTER SYSTEM SET recyclebin = OFF;
To enable the recycle bin:
ALTER SESSION SET recyclebin = ON;
ALTER SYSTEM SET recyclebin = ON;
To check what objects are in the recycle bin:
select * from user_recyclebin;
select * from dba_recyclebin;
To purge the objects in the recycle bin:
purge recyclebin;
purge dba_recyclebin;
ALTER SESSION SET recyclebin = OFF;
ALTER SYSTEM SET recyclebin = OFF;
To enable the recycle bin:
ALTER SESSION SET recyclebin = ON;
ALTER SYSTEM SET recyclebin = ON;
To check what objects are in the recycle bin:
select * from user_recyclebin;
select * from dba_recyclebin;
To purge the objects in the recycle bin:
purge recyclebin;
purge dba_recyclebin;
Tuesday, October 3, 2006
How to default java to -server
You can change <InstallationDir>/jre/lib/jvm.cfg (the default installation on Solaris would be /usr/j2se) to have -server as the first uncommented line in the file. This will cause -server to be used as the default.
Frequently Asked Questions About the Java HotSpot VM
technorati tags:JVM
Wednesday, September 27, 2006
Check account status on Oracle 10g
How to check your DB account status? Is it locked? Here is the SQL to be used:
SELECT USERNAME, PROFILE, ACCOUNT_STATUS, password FROM DBA_USERS
SELECT USERNAME, PROFILE, ACCOUNT_STATUS, password FROM DBA_USERS
Tuesday, September 19, 2006
Oracle Lite default limit on the client changes could be synchronized to the Mobile Server
During our load test, we noticed that the TCP window from the Mobile Server is closed when we try to send a client change bigger than 16M, after some digging, we found that there is an Oracle undocumented poperty, RESUME_FILE_SIZE, could be set in the Consolidator section of the Webtogo.ora to break this limit.
For example, if you want the spool file size as big as 128M, you can set the property like:
RESUME_FILE_SIZE=128
technorati tags:OLite
Subscribe to:
Posts (Atom)