What's the ST_GEOMETRY type in Oracle? - oracle

Table Description is...
COLUMN NAME / DATA TYPE
------------------------------------------
MNUM VARCHAR2(33)
ALIAS VARCHAR2(200)
REMARK VARCHAR2(200)
NTFDATE VARCHAR2(8)
SGG_OID INTEGER
COL_ADM_SECT_CD VARCHAR2(5)
OBJECTID INTEGER
**SHAPE ST_GEOMETRY**
Does anybody know about Spatial information processing?
First of all, One of column's type in oracle is "ST_GEOMETRY" .
What is this kind of type?
And how can we migrate these kind of data to other oracle databse system?

ST_GEOMETRY is not native Oracle type. It is spatial type developed by esri and apparently it is installed on top of oracle database. I would assume that some ArcGIS products are using this database.
You can read more about this type in esri documentation. http://desktop.arcgis.com/en/arcmap/10.3/manage-data/gdbs-in-oracle/stgeometry-oracle.htm
The previous answer is misleading since it describes SDO Geometry which is another completely different spatial type developed by Oracle.

ST_GEOMETRY is a spatial data type. The use of the data type along with other supported data types are part of Oracle database's spatial technology. Apparently ST_GEOMETRY is also part of an ISO standard that Oracle supports.
You can migrate these objects and other data from Oracle database to database using data pump.
Oracle Spatial
Oracle Spatial Data Pump

Related

Oracle CLOB data type to Redshift data type

we are in the process of migrating Oracle tables to redshift tables. We found that few tables are having CLOB data type. In redshift we converted CLOB to Varchar(65535) type. While doing copy command , we are getting
The length of the data column investigation_process is longer than the length defined in the table. Table: 65000, Data: 90123.
Which data type we need to use? Please share your suggestion.
Redshift isn't designed to store CLOB (or BLOB) data. Most databases that do store the CLOB separately from the table contents to not burden all queries with the excess data. A CLOB reference is stored in the table contents and a replacement of CLOB for reference is performed at result generation.
CLOBs should be stored in S3 and references to the appropriate CLOB (S3 key) stored in the Redshift table. The issue is that there isn't a prepackaged tool for doing the CLOB for reference replacement with Redshift AFAIK. Your solution will need some retooling to perform this replacement actions for all data users. It's doable, it's just going to take a data layer that performs the needed replacement.

Is there any performance loss when using ANSI data types in Oracle?

If I use any ANSI supported data types like INTEGER, NUMERIC, REAL etc., as a data type for a column, or a variable in PL/SQL, will it have an additional cost for the database?
What are the pros and cons for using the ANSI supported data types in Oracle database? (Database Version: 19c)
ANSI data-types are just aliases for Oracle data types and will be converted to the equivalent Oracle data type.
From the documentation:
ANSI, DB2, and SQL/DS Data Types
SQL statements that create tables and clusters can also use ANSI data types and data types from the IBM products SQL/DS and DB2. Oracle recognizes the ANSI or IBM data type name that differs from the Oracle Database data type name. It converts the data type to the equivalent Oracle data type, records the Oracle data type as the name of the column data type, and stores the column data in the Oracle data type based on the conversions shown in the tables that follow.
ANSI SQL Data Type
Oracle Data Type
NUMERIC[(p,s)]DECIMAL[(p,s)] (Note 1)
NUMBER(p,s)
INTEGERINTSMALLINT
NUMBER(38)
FLOAT (Note 2)DOUBLE PRECISION (Note 3)REAL (Note 4)
FLOAT(126)FLOAT(126)FLOAT(63)
What are the pros and cons for using the ANSI supported data types in Oracle database?
There are no performance benefits or penalties as the type will be converted to the equivalent Oracle type. The main benefit would be the portability of code between different RDBMS.

What Oracle data type is easily converted to BIT in MSSQL via SSIS?

I have a Data Flow from an Oracle table to an MSSQL table with one field of data type BIT. The Oracle table is using the characters Y and N at the moment (I'm unsure of the data type and have no way of checking), but the MSSQL table needs to be data type BIT. What type of cast can I use on the Oracle query so that the data is pulled smoothly over?
Use char(1) and then use a derived column transformation like this:
(DT_BOOL)(OracleField == "Y"?1:0)
Give this column a name like OracleFieldAsBool
and then use it instead of the original column in the rest of your data flow.

How to read NCLOB, CLOB data values from Oracle database using Classic ASP pages?

I am getting the following error:
Microsoft OLE DB Provider for Oracle: Data type is not supported.
Could somebody help me figure out this please...
Situation:
Recently migrated database from SQL Server 2005 to Oracle 11g. One of the table has some columns of the data type ntext in SQL Server, which were converted to NCLOB during migration to Oracle. Client is Classic ASP page (VBScript) accessing the Oracle Database through OLEDB connection.
When the execution reaches the query (Select query) that reads the column of type NCLOB it is throwing the Microsoft OLE DB Provider for Oracle: Data type is not supported error. When I take out that particular column then the query is running fine...
QUESTION: How to read NCLOB, CLOB data values from Classic ASP pages?
Plz let me know if you need more information.....
Thank You..
I know that Microsoft's ODBC Driver for Oracle didn't support any of the LOB types-- I would wager that its OLE DB Provider didn't either given the error. Can you upgrade to the Oracle OLE DB Provider?
As an aside, since you are migrating from SQL Server to Oracle, do you really need to use the NCLOB data type? Since Oracle allows the database character set to be Unicode, you normally don't need (and don't want) to use the NVARCHAR2 or NCLOB data types unless you're stuck supporting an old database that requires a non-Unicode character set. For data that is English or Western Eurpoean in nature, storing data in a CLOB has substantial benefits in terms of storage space since the CLOB would store the data in UTF-8 rather than UTF-16 in an NCLOB (assuming that you picked a Unicode character set for the database). Eliminating the NVARCHAR2 and NCLOB columns also tends to make it much easier for front-end tools to handle the data.

importing data "BLOB" type from one DB to another in oracle

i am facing problem, while importing data from one DB to another. The problem is with when i want to import a table which contains BLOB type data. Can any one please help me, how to import BLOB type data or how to move BLOB type data from one DB to another.
Please help me.
Do you want to simply move a table from one Oracle DB to another? Use Oracle Data Pump.
Copy data from one Oracle DB into another Oracle DB, perhaps into a different table structure? Use PL/SQL with DBMS_LOB package.
Also, have a look at the Large Objects Applilcation Developer's Guide.

Resources