Thursday, December 27, 2007

ORA-01031

ORA-01031: insufficient privileges

Cause: An attempt was made to change the current username or password without the appropriate privilege. This error also occurs if attempting to install a database without the necessary operating system privileges. When Trusted Oracle is configure in DBMS MAC, this error may occur if the user was granted the necessary privilege at a higher label than the current login.

Action: Ask the database administrator to perform the operation or grant the required privileges. For Trusted Oracle users getting this error although granted the the appropriate privilege at a higher label, ask the database administrator to regrant the privilege at the appropriate label.

Sde.log:
[03/07/2007 11:11:06;SdeId=33266;Client=GISPC] DB_table_create_view() Execute Error (1031)

All Oracle errors in the blog can be found at: Oracle errors
All ESRI ArcSDE errors in the blog can found at: ArcSDE Errors

ORA-01008

ORA-01008: not all variables bound

Cause: You tried to execute an SQL statement that contained substitution variables where all variables were not bound.

Action: The options to resolve this Oracle error are:
In OCI, try using an OBIND or OBINDN call to substitute the values.

All Oracle errors in the blog can be found at: Oracle errors
All ESRI ArcSDE errors in the blog can found at: ArcSDE Errors

ORA-01003

ORA-01003: no statement parsed

Cause: A host language program call referenced a cursor with no associated parsed SQL statement. A SQL call (for example, OSQL3) must be used to pass a SQL statement to Oracle and to associate the statement with an open cursor. A cursor must already have an associated SQL statement if referenced in any of the following calls: DESCRIBE, NAME, DEFINE, BIND, EXECUTE, and FETCH.

Action: Do the SQL call, for example, OSQL, to pass the required SQL statement before referencing the cursor.

Sde log:
db_sda_execute_stmt::OCIStmtExecute (1003)

All Oracle errors in the blog can be found at: Oracle errors
All ESRI ArcSDE errors in the blog can found at: ArcSDE Errors

ORA-01000

ORA-01000: maximum open cursors exceeded

Cause: A host language program attempted to open too many cursors. The initialization parameter OPEN_CURSORS determines the maximum number of cursors per user.

Action: Modify the program to use fewer cursors. If this error occurs often, shut down Oracle, increase the value of OPEN_CURSORS, and then restart Oracle.

All Oracle errors in the blog can be found at: Oracle errors
All ESRI ArcSDE errors in the blog can found at: ArcSDE Errors

ORA-00959

ORA-00959: tablespace 'string' does not exist

Cause: A statement specified the name of a tablespace that does not exist.

Action: Enter the name of an existing tablespace. For a list of tablespace names, query the data dictionary.

ArcSDE:
shp2sde returns the following error without using -k option:
SDE code 959: *** INVALID_ERROR_CODE ***

The reason is that in $SDEHOME/etc/dbtune.sde, in the #DEFAULTS keyword section, one of the tablespace names is not spelled correctly, that is, it does not match the name of the desired tablespace name.

Refer to http://support.esri.com/index.cfm?fa=knowledgebase.techarticles.articleShow&d=13763

All Oracle errors in the blog can be found at: Oracle errors
All ESRI ArcSDE errors in the blog can found at: ArcSDE Errors

ORA-00947

ORA-00947: not enough values

Cause: This error occurs when a SQL statement requires two sets of values equal in number, but the second set contains fewer items than the first set. This can occur in a WHERE or HAVING clause in which a nested SELECT returns too few columns as in WHERE (A,B) IN (SELECT C FROM ...). Another common cause of this error is an INSERT statement in which the VALUES or SELECT clause does not contain enough values needed for the INSERT, as in INSERT INTO EMP(EMPNO,ENAME) VALUES('JONES')

Action: Check the number of items in each set and change the SQL statement to make them equal.

All Oracle errors in the blog can be found at: Oracle errors
All ESRI ArcSDE errors in the blog can found at: ArcSDE Errors

ORA-00942

ORA-00942: table or view does not exist

Cause: The table or view entered does not exist, a synonym that is not allowed here was used, or a view was referenced where a table is required. Existing user tables and views can be listed by querying the data dictionary. Certain privileges may be required to access the table. If an application returned this message, the table the application tried to access does not exist in the database, or the application does not have access to it.

Action: Check each of the following:
the spelling of the table or view name.
that a view is not specified where a table is required.
that an existing table or view name exists.
Contact the database administrator if the table needs to be created or if user or application privileges are required to access the table.
Also, if attempting to access a table or view in another schema, make certain the correct schema is referenced and that access to the object is granted.

ArcSDE:
Verify whether the reported tables or view really exist or not. If not, remove those entries from the table TABLE_REGISTRY and see if you are still getting the error.

All Oracle errors in the blog can be found at: Oracle errors
All ESRI ArcSDE errors in the blog can found at: ArcSDE Errors

More Oracle DBA tips, please visit Oracle DBA Tips 

ORA-00936

ORA-00936: missing expression

Cause: A required part of a clause or expression has been omitted. For example, a SELECT statement may have been entered without a list of columns or expressions or with an incomplete expression. This message is also issued in cases where a reserved word is misused, as in SELECT TABLE.

Action: Check the statement syntax and specify the missing component.

Sde.log
Instance initialized for GISUSER . . .
db_sda_execute_stmt::OCIStmtExecute (936)
.
[03/27/2007 13:31:22;SdeId=4107103;Client=GISPC] db_array_fetch_spix_recs OCI Fetch Error (936)
[03/27/2007 13:31:22;SdeId=4107103;Client=GISPC] load_buffer error -51

All Oracle errors in the blog can be found at: Oracle errors
All ESRI ArcSDE errors in the blog can found at: ArcSDE Errors

ORA-00933

ORA-00933: SQL command not properly ended

Cause: The SQL statement ends with an inappropriate clause. For example, an ORDER BY clause may have been included in a CREATE VIEW or INSERT statement. ORDER BY cannot be used to create an ordered view or to insert in a certain order.

Action: Correct the syntax by removing the inappropriate clauses. It may be possible to duplicate the removed clause with another SQL statement. For example, to order the rows of a view, do so when querying the view and not when creating it. This error can also occur in SQL*Forms applications if a continuation line is indented. Check for indented lines and delete these spaces.

ORA-00923

ORA-00923: FROM keyword not found where expected

Cause: In a SELECT or REVOKE statement, the keyword FROM was either missing, misplaced, or misspelled. The keyword FROM must follow the last selected item in a SELECT statement or the privileges in a REVOKE statement.

Action: Correct the syntax. Insert the keyword FROM where appropriate. The SELECT list itself also may be in error. If quotation marks were used in an alias, check that double quotation marks enclose the alias. Also, check to see if a reserved word was used as an alias.

All Oracle errors in the blog can be found at: Oracle errors
All ESRI ArcSDE errors in the blog can found at: ArcSDE Errors

ORA-00920

ORA-00920: invalid relational operator

Cause: You tried to execute an SQL statement, but the WHERE clause contained an invalid relational operator.

Action: The options to resolve this Oracle error are:
Correct the WHERE clause. Valid relational operators are as follows:
= != ^= <> < <= > >= ALL ANY
BETWEEN NOT BETWEEN EXISTS NOT EXISTS IN NOT IN IS NULL
IS NOT NULL LIKE NOT LIKE

All Oracle errors in the blog can be found at: Oracle errors
All ESRI ArcSDE errors in the blog can found at: ArcSDE Errors

ORA-00918

ORA-00918: column ambiguously defined

Cause: A column name used in a join exists in more than one table and is thus referenced ambiguously. In a join, any column name that occurs in more than one of the tables must be prefixed by its table name when referenced. The column should be referenced as TABLE.COLUMN or TABLE_ALIAS.COLUMN. For example, if tables EMP and DEPT are being joined and both contain the column DEPTNO, then all references to DEPTNO should be prefixed with the table name, as in EMP.DEPTNO or E.DEPTNO.

Action: Prefix references to column names that exist in multiple tables with either the table name or a table alias and a period (.), as in the examples above.

sde.log
Instance initialized for GISUSER . . .
db_sda_execute_stmt::OCIStmtExecute (918)
.
[10/23/2007 10:26:57;SdeId=5256998;Client=GISPC] db_array_fetch_spix_recs OCI Fetch Error (918)
[10/23/2007 10:26:57;SdeId=5256998;Client=GISPC] load_buffer error -51
db_sda_execute_stmt::OCIStmtExecute (918)

ORA-00917

ORA-00917: missing comma

Cause: A required comma has been omitted from a list of columns or values in an INSERT statement or a list of the form ((C,D),(E,F), ...).

Action: Correct the syntax.

All Oracle errors in the blog can be found at: Oracle errors
All ESRI ArcSDE errors in the blog can found at: ArcSDE Errors

ORA-00908

ORA-00908: missing NULL keyword

Cause: You tried to execute an SQL statement, but you missed entering the NULL keyword.

Action: This error can occur if you try to execute an SQL statement using the IS NULL or IS NOT NULL clause, but miss entering the NULL keyword.

sde log:
db_array_fetch_attrs OCI Fetch Error (908)
load_buffer error -51

All Oracle errors in the blog can be found at: Oracle errors
All ESRI ArcSDE errors in the blog can found at: ArcSDE Errors

ORA-00904

ORA-00904: string: invalid identifier

Cause: The column name entered is either missing or invalid.

Action: Enter a valid column name. A valid column name must begin with a letter, be less than or equal to 30 characters, and consist of only alphanumeric characters and the special characters $, _, and #. If it contains other characters, then it must be enclosed in double quotation marks. It may not be a reserved word.

All Oracle errors in the blog can be found at: Oracle errors
All ESRI ArcSDE errors in the blog can found at: ArcSDE Errors

ORA-00903

ORA-00903: invalid table name

Cause: You tried to execute an SQL statement that included an invalid table name or the table name does not exist.

Action: The options to resolve this Oracle error are:
Rewrite your SQL to include a valid table name. To be a valid table name the following criteria must be met:
The table name must begin with a letter.
The table name can not be longer than 30 characters.
The table name must be made up of alphanumeric characters or the following special characters: $, _, and #.
The table name can not be a reserved word.

All Oracle errors in the blog can be found at: Oracle errors
All ESRI ArcSDE errors in the blog can found at: ArcSDE Errors

ORA-00604

ORA-00604: error occurred at recursive SQL level string

Cause: An error occurred while processing a recursive SQL statement (a statement applying to internal dictionary tables).

Action: If the situation described in the next error on the stack can be corrected, do so; otherwise contact Oracle Support.

Sde log:
db_sda_execute_stmt::OCIStmtExecute (604)

Note: Oracle® Database Error Messages 10g Release 2 (10.2)

All Oracle errors in the blog can be found at: Oracle errors
All ESRI ArcSDE errors in the blog can found at: ArcSDE Errors

ORA-00054

ORA-00054: resource busy and acquire with NOWAIT specified

Cause: Resource interested is busy.

Action: Retry if necessary.

Sde log:
db_sda_execute_stmt::OCIStmtExecute (54)

MetaLink:
Note:18245.1

Note: Oracle® Database Error Messages 10g Release 2 (10.2)

All Oracle errors in the blog can be found at: Oracle errors
All ESRI ArcSDE errors in the blog can found at: ArcSDE Errors

ORA-00001

ORA-00001: unique constraint (string.string) violated

Cause: An UPDATE or INSERT statement attempted to insert a duplicate key. For Trusted Oracle configured in DBMS MAC mode, you may see this message if a duplicate entry exists at a different level.

Action: Either remove the unique restriction or do not insert the key.

Note: Oracle® Database Error Messages 10g Release 2 (10.2)

All Oracle errors in the blog can be found at: Oracle errors
All ESRI ArcSDE errors in the blog can found at: ArcSDE Errors

Monday, December 24, 2007

ArcSDE Administration Commands

Sometime ArcSDE administration commands are referred to as ArcSDe command line utilities. These commands are used by ArcSDE administrator to manage and monitor the use of an ArcSDE service and geodatabase. The commands are divided into two categories: server administration commands and data management commands.

Server administration commands:

Sdeconfig: manages the ArcSDE server configuration table (SERVER_CONFIG). SERVER_CONFIG stores parameters and values that define how the ArcSDE server uses memory.

Sdedbtune: manages parameters of the DBTUNE table. DBTUNE contains parameters and values, grouped by configuration keywords to specify how data is stored in the database.

Sdegcdrules: manages geocoding rules.

Sdegdbrepair: identifies and repairs any inconsistencies between the adds (A) and the deletes (D) tables of a versioned geodatabase.

Sdelocator: manages locators.

Sdelog: administers log files (used primarily for shared log files).

Sdemon: monitors and manages the ArcSDE service.

Sdeservice: manages the ArcSDE service on Windows.

Sdesetup: does the initial geodatabase creation within the DBMS, upgrades the geodatabase, and updates your license file.

Data management commads:

sdeexport: Creates an ArcSDE export file.

sdeimport: Imports data from an ArcSDE export file.

sdegroup: Merges features by combining their geometries into multipart shapes. Features are grouped by tiles or by a business table attribute.

sdelayer: Administers feature classes, including getting ArcSDE geometry information.

sderaster: Manages raster layers.

sdetable: Administers business tables and their data.

sdexinfo: Describes an ArcSDE export file.

sdexml: Administers XML columns.

cov2sde: Converts ArcInfo coverages to geodatabase feature classes.

sde2cov: Converts geodatabase feature classes to ArcInfo coverages.

sde2shp: Extracts features from a geodatabase feature class or log file and writes them to a shapefile.

sde2tbl: Converts geodatabase tables to INFO or dBASE Tables.

sdeversion: Manages geodatabase versions.

shp2sde: Converts shapefiles to geodatabase feature classes.

tbl2sde: Creates a table in the geodatabase, appends data to an existing table in the geodatabase, or replaces records in an existing table in the geodatabase.

Up to ArcSDE 9.2, some operations of data management commands can not be performed by ArcGIS Desktop software (ArcMap and ArcCatalog), including sdeexport, sdeimport, sdegroup, sdelayer, sderaster, sdetable, sdexinfo, sdexml. Functions of commands (cov2sde, sde2cov, sde2shp, sde2tbl, sdeversion, shp2sde, tbl2sde) can be performed by using ArcGIS Desktop software.

Note:
1. ArcSDE data management commands for loading data, such as shp2sde and cov2sde, cannot be used to load data into a feature class that is contained within a Geodatabase feature dataset. Only an ArcObjects application, such as ArcCatalog, ArcMap, and custom-built ArcObjects applications, can be used to load data into a feature class contained within a Geodatabase feature dataset.

2. If a feature class is created in ArcCatalog, using a command to delete it would leave orphaned records in the geodatabase system tables, as the ArcSDE commands are not geodatabase aware. The best way would be to manage them using ArcCatalog itself.

3. It is recommended not to manage standalone feature classes with command line utilities. Layers created with command line should be registered with the Geodatabase to avoid unnecessary issues (such as OBJECTID).

More Oracle DBA tips, please visit Oracle DBA Tips