how to export schema and import it to another schema in PL\SQL Developer - oracle

I am using PL\SQL Developer by AllroundAutomations.
My task is to import schema named EN to another schema (it doesn't exist now) called E9.
I managed to make a dump of a scheme using Tools --> Export User Objects, so now I have EN.sql file
So, here are my questions?
How can I make EN.dump file?
To import it to another scheme, I need firstly to create new (E9) scheme from sysdba user?
And is there any opportunity to import scheme from PL\SQL Developer interface? For some reason I can't connect to sqlplus which makes things worse.
Thank you in advance.
update: i just reinstalled my instant client from ver 11_2 to 12_2 with the tools and sql*plus

PL/SQL Developer has tools Export Tables and Import Tables witch can import/export dmp files using EXP and IMP utilites. See PL/SQL Developer's help :
Export Tables:
The Export Tables tool allows you to export one or more table definitions and their data into a file, so that you can import the tables later. After starting the Export Tables tool, you can select the user and the
tables you wish to export, choose an export method (Oracle Export, SQL Inserts, or PL/SQL Developer), and set various options that apply to the export method...
Import Tables:
The Import Tables tool allows you to import table definitions and data from a file that was previously exported with the Export Tables tool described in the previous chapter. Just like with the Export Table
tool, there are 3 methods to import tables, each with its own file format...
P.S. As you see schema where you want import to must already exists.
But in such a way you can export/import only tables.
So if you want export whole schema use utility througth command line, see example:
Command to export a schema:
exp userid=dba/dbapassword OWNER=username DIRECT=Y FILE=filename.dmp
This will create the export dump file.
To import the dump file into a different user schema, first create the new user in SQLPLUS:
SQL> create user newuser identified by 'password' quota unlimited users;
Then import the data:
imp userid=dba/dbapassword FILE=filename.dmp FROMUSER=username TOUSER=newusername

Related

Export & Import in SQL DEVELOPER without datapump

I want to export below things from SQL developer
1-Only schema (tables structure)
2-Only data in excel form
3-Schema with data
after exporting this i want to import the same to the another database
So what steps should i follow for export and import?
I can not use DATA PUMP as i don't have DBA privilege
As you use Oracle 11g, I'd suggest you to forget about SQL Developer and use the original EXP and IMP utilities. Doing so, you'd avoid DBA-related-problems as these utilities don't require access to the directory (an Oracle object which points to (usually database server's) filesystem directory, and - in order to be able to use it - you'd need to have read/write privileges on it).
So - if you don't already have these, install Oracle Client which contains EXP/IMP and use them.

ORACLE DB exp with FULL=y option cannot export all user tables but expdp can

I am trying to use the exp tool to backup the whole DB.
The command is "exp userid=system/manager#test inctype=complete buffer=65535 file=/home/oracle/backup/exp_full.dmp log=/home/oracle/backup/exp_full.log full=y".
But from the exp log, it can only export some user tables, not all, even though those tables cannot exported indeed have content. Only these users can be exported from the log as below:
. about to export SYSTEM's tables via Conventional Path ...
. about to export OUTLN's tables via Conventional Path ...
. about to export ORDDATA's tables via Conventional Path ...
. about to export OLAPSYS's tables via Conventional Path ...
etc.
But when I try to use expdp with command expdp system/manager dumpfile=expdp_full.dmp logfile=expdp_full.log full=y, it can export all user tables successfully.
The ORACLE DB version is 11.2.0.1.0.
Appreciate for your help.
you need to specify which schema you want to export , by expdp user/password schema=abc dumpfile=abc.dmp logfile=abc.log directory=abcdirectory
Oracle Database Online Documentation Library, 11g Release 2 (11.2)
Original Export is desupported for general use as of Oracle Database
11g. The only supported use of original Export in Oracle Database 11g
is backward migration of XMLType data to Oracle Database 10g release 2
(10.2) or earlier. Therefore, Oracle recommends that you use the new
Data Pump Export and Import utilities, except in the following
situations which require original Export and Import: You want to
import files that were created using the original Export utility
(exp).
You want to export files that will be imported using the original
Import utility (imp). An example of this would be if you wanted to
export data from Oracle Database 10g and then import it into an
earlier database release.

how to import a .dmp file in oracle sql developer

How can i import a .dmp file in to sql developer. i had already created schema and i just need to insert data with these dump files. I tried imp and impdb commmands in sql command line but of no use.
You don't use SQL Developer to process data pump or legacy EXPORT dumps.
You CAN use SQL Developer to create a Data Pump job which will process your data pump export - this assumes the file is avail on a DB directory.
For a better answer, tell us exactly what kind of 'dmp' file you have.
If it's a Oracle Export dmp, the only way to import it is with the Import utility.

Oracle Import dump files to another user(schema)

I am very new to DBA works. I have already exported (expdp) table and saved the dump files in a directory. I don't know the password of SCOTT user (default & example user). I want to import my tables to scott, but how can I? I am able to import (impdp) the table to system schema because I can do impdp system/password ..... because I know it's password.
First, run impdp help=y and go over the options.
Second, if you have privs for the sys schema you can access every other schema using it's name. e.g scott.emp. If you want to log into it directly you can just change the password.
Lastly, To import one schema into another you can use REMAP_SCHEMA option.

How to create a dump?

I'm one of the junior DBA working in IT company.In my company there are so many schemas is there.Now my question is How to create a dump file(some times i'm working at home.That time how to use that dump file ).Please suggest me
NOTE:I am using Oracle SQL Developer.
Expdp helps in exporting the database and impdp helps in importing the database. you can directly export one schema to another (in different database also) by using network link concept.
If network link concept is used then the creation of separate expdp file is not required.
For example If you have to export a schema called schema1 with password pwd1 from source database to target database then
first you need admin privileges of your target and source schema.
You can create a network link between source and target schema
CREATE PUBLIC DATABASE LINK example_link
CONNECT TO schema1 IDENTIFIED BY pwd1
USING 'server_name:port/service_name';--(put source database server_name,port and service name)
then create a directory in your target server :-
CREATE OR REPLACE DIRECTORY exp_dir AS 'F:/location';
grant read,write on directory exp_dir to schema1;
After this login to your target server and from command line use the below command:
impdp dba_username/dba_pwd network_link=example_link directory=exp_dir remap_tablespace=source_tbs:target_tbs remap_schema=schema1:schema1 parallel=2
You should use the Oracle Data Pump tool. The tool allows you to export your data into a .dmp file and import it into any database. Here is a video showing how to use the data pump tool in SQLDeveloper. I think this is a relatively new feature in SQLDeveloper, so make sure you have the appropriate versions..
Video Tutorial HERE
From the command line, you can use data pump with the expdp and impdp commands like so..
Set your oracle environment by running the below command and providing your oracle SID
. oraenv
Then you can run your export command..
expdp directory=/bu1/dpdump/ dumpfile=myexport.dmp logfile=mylog.log schemas=users,products,sales
The parameters are as follows..
directory - the directory where to create the dumpfile and log
dumpfile - name of the dump file (should end in .dmp)
logfile - name of the log file (should end in .log)
schemas - comma seperated list of the schemas you want to export
NOTE: you need dba privileges to use datapump. It will prompt you for the credentials
Data Pump Documentation is here
Exporting of ORACLE database objects is controlled by parameters. To get familiar with EXPORT parameters type:
exp help=y
You will get a short description and the default settings will be shown.
The EXPORT utility may be used in three ways:
Interactive dialogue
Controlled through bypassed parameters
Parameterfile controlled
Example to the 2nd option:
exp scott/tiger file=empdept.expdat tables=(EMP,DEPT) log=empdept.log
Take a look at these links for further readings:
Original Export and Import
The ORACLE Import/Export Utilities

Resources