oracle sql expdp -> database pump while users a writing to the databse - oracle

I use Oracle 11GR2 on openSuse and we do a Oracle Data Pump with the command expdp of all the schemas.
My Question is: what happens if a user updates the database trough the application while the expdp command runs on the server.
Am I guaranteed to get a consistent state?

No your are not unless you specify: flashback_time or flashback_scn
here is the link to the documentation:
https://docs.oracle.com/cd/E11882_01/server.112/e22490/dp_export.htm#SUTIL850

Related

Oracle XE 18c impdp dump from 19c

I have a dump file that is created using expdp from Oracle 19c (exported with version parameter 18). Is it even possible to import the dumpfile to an Oracle 18c XE database?
The structure and everything else from the 19c database is unknown to me. I just got the 13gb dumpfile.
While using impdp it says:
Connected to: Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production
ORA-39002: invalid operation
Thats it.
In /opt/oracle/diag/rdbms/xe/XE/trace/alert_XE.log it says:
XEPDB1(3):DW00 started with pid=62, OS id=23288, wid=1, job SYSTEM.SYS_IMPORT_FULL_01
2020-12-09T15:25:55.364764+00:00
XEPDB1(3):Resize operation completed for file# 9, old size 266240K, new size 276480K
Is there a another logfile I don't know about?
Anyways, my command looks like this:
impdp user/password#localhost/xepdb1 DIRECTORY=import_dir DUMPFILE=dump.expdp nologfile=y version=18 full=y
Yes, the user is privileged to do so.
Yes, the import_dir is set with CREATE DIRECTORY and the user is also privileged to use this directory.
I'm lost.
edit: I used stackoverflow for many years now and this is my very first question since I'm NEW to oracle in general and as I stated above: I'm lost.
2nd edit:
It's still the same error even after I try to partially import the dump with parameters like tables=
Perhaps your dump file is too big. Oracle XE has some limitations.
See the Oracle documentation:
https://www.oracle.com/database/technologies/appdev/xe.html
Resources:
Up to 12 GB of user data
Up to 2 GB of database RAM
Up to 2 CPU threads
Up to 3 Pluggable Databases

Oracle Database Backup in DBeaver

I am new to Oracle databases. I have installed DBeaver (never used this before too) to connect to the database.
I have created a connection (which I believe is called database) and now I am able to see the database tables and everything. How do I take the backup of the Oracle Database in DBeaver so I can use it locally for test purposes before making any change on live database?
I can't find any option to take the backup of connection/database.
To do a proper backup of your Oracle Database, you should use the oracle provided utility, Recovery Manager. It's a command line interface that's called from your DB server shell prompt via 'RMAN'
You can also use Data Pump to export all or part of a database that can be used to import to another database...not really used for recovery of an existing database.
I'm not aware of your tool having interfaces for either of these Oracle features.
You might not need a backup at all for your needs, take a look at Oracle Flashback Technology.
DBeaver does not support oracle database export import. See details here:
https://dbeaver.com/docs/wiki/Backup-Restore/
You need to run the sqlplus tool to create a folder where oracle is going to import/export database dumps. Login should happen as sys as sysdba and enter the password you previously entered during database server installation. Example:
sqlplus sys/[your password] as sysdba
After you successfully logged into sqlplus run the following command (don't forget to set to a different folder that you prefer to use):
create or replace directory DATA_PUMP_DIR as 'D:\Database Backups';
Once this is done exit from sqlplus and enter the following command into the command line (again no sqlplus should be used here)
expdp sys/[your password]#localhost:1521/[listener name] file=your-database-dump-file.dmp owner=[your schema]
Once this is done and finished you can zip your database dump if you would like to upload it somewhere else. (I had 9 GB dump and the zipped size was 1.6 GB)

Oracle 12C: ORA-00406: COMPATIBLE parameter needs to be 12.2.0.0.0

We have a 2 current Oracle 10G(10.2.0.1) production databases, and we are planning to migrate to a new database server with Oracle 12C. Since data is for each database is only around 5GB, the best way to create a new instance and use data pump to transfer data. To achieve this, I created a database link from the Oracle 12C database to the 10G, and use that to expdp the data from the 12C database. However when I import the exported data I have around tables that have an error like this:
ORA-39083: Object type TABLE:"USER"."WH_SEARCH_ACT" failed to create with error:
ORA-00406: COMPATIBLE parameter needs to be 12.2.0.0.0 or greater
ORA-00722: Feature "Partition Read Only"
Is there any solution to this other than adding the COMPATIBLE parameter in the production database? This is production so I can't really just update/modify the current production database. Any other solutions here, because i don't like just create the tables before importing the data pump file.
Use the version parameter in the data pump utility. For example:
expdp hr/hr TABLES=hr.employees VERSION=10.2
DIRECTORY=data_pump_dir DUMPFILE=emp10g.dmp LOGFILE=emp.log
Just make sure the version of the export utility is 10g and import utility is 12G. Hope this helps.
In the production database . you can use exp program
exp username/password buffer=64000 file=/path/to/path.dmp full=y
copy exp dump file to oracle 12c and use
imp username/password buffer=64000 file=/path/to/path.dmp full=y

Export database dmp in sql developer

Is there any possible way to export the full database .dmp file in Oracle sql developer Version 4.0.2.15?
If not and should be done by this command:
expdp EMP/EMP#db10g full=Y directory=D:\home dumpfile=emp.dmp logfile=expdpemp.log
where to use this command? and what's "#db10g" in the command? where do i get it?
View > DBA
Add a connection - we assume you have fairly high privs
Go to the data pump node
Right-click, use the Export Wizard
It will guide you through the steps to create and run a job which will run data pump to do your export.
This reminds me I should probably do a blog post on Data Pump support in SQLDev...

How do I export a 'database' from Oracle 11g XE and import it to Oracle 10.2?

Up to this point, I've never done anything serious with an Oracle database. I know that they are different than what I've handled, like MS SQL.
So, coming from an MS SQL perspective, I can backup a database, copy over the .bak file to another server, restore it, creating a complete copy of the database.
I'm not sure how to do the same for Oracle, much less different versions. I've seen it done mostly with command lines, so I tried this:
$exp owner/owner schemas=tkcsdb directory=dumpdir dumpfile=dBaseName logfile=dBaseLog
And then the SQL Plus returns:
Unknown Parameter Name 'Schemas'.
Failed to process parameters.
Export terminated unsuccessfully.
I've since replaced the 'schemas' with 'schema' (same error), and I wanted to try using 'tables', though I'm not sure how that would turn out. I'm not even 100% if 'tkcsdb' is the name of the database I'm looking for - I've been unable to list all the databases I have.
What I want to do (which I've done with MS SQL, MySQL, and even IBM DB2 of all things) is looking to be quite difficult to replicate in Oracle.
As with the title, how do I export a 'database' from Oracle 11g XE and import it to Oracle 10.2?
I'm using Windows 7, the target machine is a Linux Fedora of some sort.
EXP and IMP are ancient - do not use them unless you absolutely have to. They cannot handle some of the features of newer Oracle versions.
The tools of choice are EXPDP and IMPDP (short for EXP datapump and IMP datapump).
Unfortunately, using them is a little more complicated, because you can run them only on the database server (contrary to old-style EXP/IMP, which you could run from any client computer).
So, to get your schema from the 11g source DB to the 10g target DB, you'll have to:
open a terminal session on the 11g DB server
run expdp with version set to 10 (so you can import it on the 10g server)
copy the dump file fom the 11g server to the datapump directory of the 10g server (look for a directory called "dpump")
open a terminal session on the 10g DB server
run impdp with your dump file
Example:
expdp scott/tiger#db11g version=10.2 schemas=SCOTT dumpfile=SCOTT.dmp logfile=expdpSCOTT.log
impdp scott/tiger#db10g schemas=SCOTT dumpfile=SCOTT.dmp logfile=impdpSCOTT.log

Resources