Tuesday, October 27, 2009

ORA-22992 How to deal with LOB locators in remote tables

Problem:

"ORA-22992: cannot use LOB locators selected from remote tables" error message
while selecting from table over database link having blob data type column.

Cause:

LOB columns referenced over dblink together with other columns.

From Oracle documentation:

"In statements structured like the preceding examples, only standalone LOB columns are allowed in the select list".

Solution:

In order to select into or CTAS from remote table containing LOB field (CLOB in my case), you must insert without selecting LOB column and then making an update only selecting LOB column.

update myschema.mytable t1
set lob_column=(select lob_column from myschema.mytable@REMOTE_LIVE t2
where t1.id=t2.id);

It is also strange that; below statement is not working:

select lob_column from  myschema.mytable@REMOTE_LIVE

Thanks to







user628981

http://forums.oracle.com/forums/thread.jspa?messageID=1252302


Friday, October 9, 2009

Host credentials when using DBControl 10gR2 on WINDOWS

Problem:
Going to Preferences > Preferred Credentials > Host > Set Credentials and
entering the correct username and password also results in:

Error Connection to as user failed: ERROR: Wrong
password for user

Cause:
The Windows operating system user does not have the required 'Log on as a
batch job' system privilege.

The 'Log on as a batch job' system privilege is required by the user whose
credentials are used for the preferred credentials for a Host. The user
needs to be able to log on as a batch job in order to execute jobs such as
backup jobs in the background.

Solution:
To implement the solution, please execute the following steps:

1. Go to Start > Control Panel > Administrative Tools > Local Security Policy
2. Open Security Settings > Local Security Policies > User Rights Assignment
3. Double-click on Log on as a batch job from the list of privileges in
the right pane.
4. Click on Add User or Group ... and enter the name of the OS user whose
credentials are being used as the preferred credentials for the host.
5. Click 'OK' twice.
6. Retry the preferred credentials test for the user at Preferences >
Preferred Credentials > Host > Set Credentials

Excerpt from: http://www.lazydba.com/oracle/0__122689.html
Thank you Juliano for the solution!

Windows (powershell) counterparts of Linux commands

You may find Windows mostly powershell equivalent of frequently used Linux commands here. I will update this post, with newer ones by the ti...