Importing data from one workspace to another workspace - oracle-apex-5

In oracle apex export of data from table is done in .csv format and during loading the data into another workspace it shows an error ORA-01843: not a valid month
I tried to import the data in .xml format but it also produces an error:
ORA-31011: XML parsing failed ORA-19202: Error occurred in XML processing LPX-00222: error received from SAX callback function ORA-02291: integrity constraint (RETAIL_CLOUD.RCM_CUSTOMER_FK2) violated - parent key not found
Could someone help me to sort out this error

You got something wrong. A workspace is a container for your Apex applications, it doesn't contain user data. That's what your question suggests ("export data in a CSV format"). Data is stored in a table (which resides in a tablespace) and belongs to a certain user.
As of an invalid month: check whether NLS settings are equal for both source and target. For example, 20.03.2018 can't be valid if date format is set to YYYY-MM-DD. Or, if your dates were stored in a VARCHAR2 column and now should be inserted into a DATE data type column, you should beware invalid dates (such as Feb 30th or 30.42.2018 etc.).
Trying to do that via XML produces an error which doesn't have anything to do with the previous one - it says that you are trying to load child values into some table, but its parent doesn't exist yet which violated the foreign key constraint.
If I were you, I wouldn't migrate data with CSV nor XML files, but use Oracle's (Data Pump) Export & Import utilities which are designed for such things. I encourage you to investigate Data Pump, or - at least - original EXP and IMP utilities.
[EDIT: example of a simple EXP/IMP utilities usage]
User SCOTT has table named DEPT. I'd like to export it, and then import it to MIKE's schema (which currently doesn't have that table):
SQL> connect mike/lion#orcl
Connected.
SQL> select * from tab where tname = 'DEPT';
no rows selected
SQL> $exp scott/tiger#orcl tables=dept file=my_export.dmp
Export: Release 11.2.0.2.0 - Production on Pet O×u 9 08:23:13 2018
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Tes
Export done in EE8MSWIN1250 character set and AL16UTF16 NCHAR character set
About to export specified tables via Conventional Path ...
. . exporting table DEPT 4 rows exported
Export terminated successfully without warnings.
Export has been done. Now, import:
SQL> $imp mike/lion#orcl file=my_export.dmp full=y
Import: Release 11.2.0.2.0 - Production on Pet O×u 9 08:23:29 2018
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Tes
Export file created by EXPORT:V11.02.00 via conventional path
Warning: the objects were exported by SCOTT, not by you
import done in EE8MSWIN1250 character set and AL16UTF16 NCHAR character set
. importing SCOTT's objects into MIKE
. importing SCOTT's objects into MIKE
. . importing table "DEPT" 4 rows imported
Import terminated successfully without warnings.
It has also finished successfully. Finally, let's check whether MIKE now has the DEPT table and what's in there:
SQL> show user
USER is "MIKE"
SQL> select * From dept;
DEPTNO DNAME LOC
---------- -------------- -------------
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON
SQL>
As you can see, it is quite simple. Both EXP and IMP have numerous parameters you can use; once again - check the documentation.

Related

creating excel template with default data populated

I am creating an excel template for user data upload , where I need one column to be populated from a underlying table so user can select description column instead of putting some wrong value and i have to again lookup in base table to get Id of that particular value.
I have tried downloading excel file using table data with template column but i am not able to write data into new sheet and linking to excel column as drop down select list.
Provide and possible solution work for any excel version either for csv or xlxs format.
I am using Oracle apex 22.1 with Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

Problems Loading data from CSV into a PostgreSQL table with PGADMIN

I am at a loss. I am on a mac using PG Admin 4 with PostgreSQL I tried to use the import/export data wizard when you right click on the table I created...and get this error ERROR: extra data after last expected column...all of the colomns match up and there is no additional data. I don't know what needs to change...
So then I tried to create it with the quarry tool with the following code (renaming things to put here):
create schema schema_name;
create table schema_name.tablename( column1 text, column2 text...); ***all the columns are a text data type***
copy schema_name.tablename
from '/Users/me/downloads/filename.csv'
delimiter ',' header csv;
and get this error message:
ERROR: could not open file "/Users/me/downloads/filename.csv" for reading: Permission denied
HINT: COPY FROM instructs the PostgreSQL server process to read a file. You may want a client-side facility such as psql's \copy.
SQL state: 42501
Going to properties for that database, and then to security, and privileges I made public all privileges. But that did nothing. And so I am here to ask yall for help.
Successfully import the data from the CSV.

Why does my SSIS package not pull all the data from a specific table in Oracle?

Situation: I have created an SSIS package that has a OLE DB Source that is an Oracle Database and an OLE DB destination of SQL Server. I use [Oracle Provider for OLE DB] connection.
Problem: when I execute the package it will run short and only return 220,000 out of 4 million records. The package runs with no errors and no warnings. Just successfully completes but will not go past 220,000 records. I found one similar problem on this site however it pointed to a date format issue and this table has no date data types in its structure.
Troubleshooting so far:
I extracted the table as a flat file and ran the package to the same destination table, this runs fine. All 4 million records will load from flat file to destination ok.
I have tried running the package as a fast load and a normal - no change
I have tried different buffer combinations and Auto Adjust Buffer Size - no change
I have uninstalled and reinstalled, VS, Oracle 12c, SSDT - No change
I thought maybe it could be memory or size issue, no luck, I load many other tables that are larger in size memory wise.
Environment Specs:
VS V 15.9.14
Oracle Developer Tools for Visual Studio 12.2.0.1.0
SSDT 15.1.61906.3120
SSIS 15.0.1301.433
SQL Server 2016 13.0.4 - SP1
Has anyone dealt with something like this what are somethings I could try or look into?
Thanks!

how to add sql file to import tables to oracle 11g XE

i download .sql file(add_students_table.sql), install oracle 11g XE database and SQL developer, i make connection but how i can add tables from book where i downloaded sql file to import tables so i can follow examples from book...thx
SQL file you downloaded is editable in any text editor, so - open it. What does it contain? There are two options I can think of:
the first one creates user and, afterwards, creates its objects (i.e. runs CREATE TABLE & INSERT INTO statements which populate created tables so that you could practice queries written in the book), or
there's no CREATE USER (which means that you should create it yourself, connecting as a privileged user - that would be SYS in your XE database, I'd say), but does create tables and inserts data into them
On the other hand, does the book not contain instructions which say what should be done with the SQL file?

Exporting Oracle Database Using TOAD

I have this strange error when exporting a database
this is the error report,
Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
About to export specified users ...
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user WELTESADMIN
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user WELTESADMIN
About to export WELTESADMIN's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export WELTESADMIN's tables via Conventional Path ...
EXP-00008: ORACLE error 904 encountered
ORA-00904: "POLTYP": invalid identifier
EXP-00000: Export terminated unsuccessfully
I have granted the DBA access to the executor and this is what happened. Please help me...