0509-150 Dependent module libskgxp11.so could not be loaded

The following Error was faced after cloning the Oracle database from one server to another one, after that when i tried to use “sqlplus” i faced the below error:

Enter password:

exec(): 0509-036 Cannot load program oracleoradbd14 because of the following errors:

        0509-150   Dependent module libskgxp11.so could not be loaded.

        0509-022 Cannot load module libskgxp11.so.

        0509-026 System error: A file or directory in the path name does not exist.

ERROR:ORA-12547: TNS:lost contact

 

My Environment was:

Oracle11gR2 (11.2.0.3.8)

ArcSDE 10.0

Server: IBM AIX

 

The solution:

chmod  6751 $ORACLE_HOME/bin

ls –l oracle

also,

chmod  6751 $ORACLE_HOME/lib

Then, use the unix command:

relink all 

Try starting up ArcSDE and it will work.

 

 

how to find ArcSDE Geodatabase Version

To Search for an ArcSDE version within your Enterprise Geodatabase, you have three ways:

1. form the oracle database table unser SDE user schema: SDE.VERSIONS 

2. using ArcSDE Command Line: sdeversion -o describe -u sde -p XXXX -i 5151 -s server_name

3. from ArcCatalog (version 10.1) from Geodatabase Administration -> under ‘Versions’ tab.

Image

ORA-01439: column to be modified must be empty to change datatype

When trying to do conversion on fly of a column data type from Number to VARCHAR2, you will receive the error (ORA-01439: column to be modified must be empty to change datatype)

SQL> ALTER TABLE SCHOOL.STAFF_RECORDS

  2  MODIFY(REVIEWED_BY VARCHAR(10));

MODIFY(REVIEWED_BY VARCHAR(10))

       *

ERROR at line 2:

ORA-01439: column to be modified must be empty to change datatype

 

To resolve this issue:

 

1.      Create a new empty table SCHOOL.STAFF_RECORDS_2 with the “modified/new” data type column being set.

 

CREATE TABLE SCHOOL.STAFF_RECORDS_2

(

  STAFF_NUMBER           NUMBER(15)                   NOT NULL,

  HIRE_DATE    DATE                         NOT NULL,

  REVIEWED_BY      VARCHAR2(10 BYTE)            NOT NULL,

)

 

 

2.       Then, insert records in the new table from the original table:

 

insert  into SCHOOL.STAFF_RECORDS_2  select * from SCHOOL.STAFF_RECORDS;

 

3.       create indexes similar to the original table in the new table.

 

4.       Grant the same permissions on the original table to the new table.

 

5.       Rename the old table with a different name, and the new table with the new one:

 

 

alter table SCHOOL.STAFF_RECORDS  rename to SCHOOL.STAFF_RECORDS_ORIGINAL;

 

alter table SCHOOL.STAFF_RECORDS_2 rename SCHOOL.STAFF_RECORDS;

 

 

Remark: if you face the error (ORA-14047: ALTER TABLE|INDEX RENAME may not be combined with other operation) while re-naming the table, this is because the new table does not need the schema identified to be defined.

Geodatabase KEYSET Tables in Oracle

KEYSET tables are one of the most “hidden” tables, that ArcSDE Geodatabase Administrator will not notice on frequent basis. The reason behind that, is that these tables can only be viewed within the database management system (not from ArcCatalog or ArcGIS platform).

Question: How does KEYSET tables being created in the geodatabase ( in Oracle RDBMS) ?

KEYSET tables are being created in Oracle database whenever a selection is being made by the ArcGIS Desktop. OR, by starting an editing session.

*.* If the schema user who is editing Lacks “create table” privilege, these KEYSET tables will be created under the ‘SDE’ schema. Otherwise, the KEYSET tables will be created under the schema owner editing session.

This is the KEYSET table definition in Oracle:

<user_schema>.keyset_<process_id>

where process_id is the associated with current “live” ArcSDE process in the “process_information” table under “SDE” schema.

 

Question: I see orphan KEYSET tables in my database, how should i deal with it ?

First, use the following SQL queries to gather information about the (number of KEYSET tables), and the owner of the KEYSET tables.

select count(*) from all_tables where table_name like ‘KEYSET_%’;

select distinct(owner) from all_tables where table_name like ‘KEYSET_%’;

These orphan tables in your Oracle Geodatabase is because of the abnormal termination of the editor’s session.

To clean it up, use the following PL/SQL Code:

//=========================================================================//

set SERVEROUTPUT ON

DECLARE

CURSOR all_keysets IS
SELECT owner, table_name
FROM all_tables
WHERE table_name LIKE ‘KEYSET_%’;

sess_id INTEGER;
valid_sess INTEGER;
lock_name VARCHAR2(30);
lock_handle VARCHAR2(128);
lock_status INTEGER;
cnt INTEGER DEFAULT 0;

BEGIN

FOR drop_keysets IN all_keysets LOOP

sess_id := TO_NUMBER(SUBSTR(drop_keysets.table_name, 8));

SELECT COUNT(*) INTO valid_sess FROM sde.process_information WHERE owner = drop_keysets.owner AND sde_id = sess_id;

IF valid_sess = 1 THEN

lock_name := ‘SDE_Connection_ID#’ || TO_CHAR (sess_id);
DBMS_LOCK.ALLOCATE_UNIQUE (lock_name,lock_handle);
lock_status := DBMS_LOCK.REQUEST (lock_handle,DBMS_LOCK.X_MODE,0,TRUE);

IF lock_status = 0 THEN

DELETE FROM sde.process_information WHERE sde_id = sess_id;
DELETE FROM sde.state_locks WHERE sde_id = sess_id;
DELETE FROM sde.table_locks WHERE sde_id = sess_id;
DELETE FROM sde.object_locks WHERE sde_id = sess_id;
DELETE FROM sde.layer_locks WHERE sde_id = sess_id;
dbms_output.put_line(‘Removed orphaned process_information entry (‘||sess_id||’)’);

EXECUTE IMMEDIATE ‘DROP TABLE ‘||drop_keysets.owner||’.’||drop_keysets.table_name;
cnt := cnt + 1;

END IF;

ELSE

EXECUTE IMMEDIATE ‘DROP TABLE ‘||drop_keysets.owner||’.’||drop_keysets.table_name;
cnt := cnt + 1;

END IF;

END LOOP;

dbms_output.put_line(‘Dropped ‘||cnt||’ keyset tables.’);

END;
/

//=========================================================================//

save the PL/SQL script for example as “keyset_cleanup.sql” and then run it using sqlplus

SQL> @keyset_cleanup.sql

*.* the script will check the process_id information in the table name, if it has an assoicate “active” ArcSDE connection or not. if it does not have active connection, it will drop it.

Cleaning Up Geodatabase KEYSET tables could improve your ArcSDE Geodatabase performance, and these junk tables would be removed.

Remark: this script worked fine with ArcGIS 10.1 Geodatabase version.

References:

http://webhelp.esri.com/arcgisserver/9.3/dotnet/index.htm#geodatabases/keyset_t235544603.htm

http://www.sspinnovations.com/blog/2013/11/09/cleaning-gunk-out-your-oracle-gdb

http://support.esri.com/cn/knowledgebase/techarticles/detail/34258

 

 

ORA-00054: resource busy and acquire with NOWAIT

i tried to drop an oracle user and i faced the following error:

ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired

the resolution:

use the following query to find where the lock is occurring

 

SELECT O.OBJECT_NAME, S.SID, S.SERIAL#, P.SPID, S.PROGRAM,S.USERNAME,

S.MACHINE,S.PORT , S.LOGON_TIME,SQ.SQL_FULLTEXT

FROM V$LOCKED_OBJECT L, DBA_OBJECTS O, V$SESSION S,

V$PROCESS P, V$SQL SQ

WHERE L.OBJECT_ID = O.OBJECT_ID

AND L.SESSION_ID = S.SID AND S.PADDR = P.ADDR

AND S.SQL_ADDRESS = SQ.ADDRESS;

check the results and kill whatever sessions that is causing the lock.

 

 

Could not load data from the data source.If you can correct the problem, press the refresh button to reload data.Possible problems can include bad network connection, invalid field,etc. Underlying DBMS error [Error executing stored procedure .logfile_util.logfile_pool_get_id::ORA-01403: no data found]

The below errors were faced while trying to edit layers (feature classes):

Could not load data from the data source.If you can correct the problem, press the refresh button to reload data.Possible problems can include bad network connection, invalid field,etc.
Underlying DBMS error [Error executing stored procedure <schema>.logfile_util.logfile_pool_get_id::ORA-01403: no data found]

underlying DBMS error[ORA-01536:space quota exceeded for tablespace ‘TS_SDE_LOG_DATA_01’

have been fixed by changing the parameter “maxblobsize” under “SERVER_CONFIG” table in SDE schema.

The command to use:

sdeconfig -o alter -u sde -v maxblobsize=5000000 -i XXXX -s XX

XXXX: sde port number
XX: your server name (hosting your SDE)