Avatar of NiceMan331
NiceMan331
 asked on

export/import user from cleint on server

hi
as a cleint , i want to export one user from one database on server , then import it to another user on another database on another server
i'm connection to the both servers
could i do it through toad ? or there is another way ?
Oracle Database

Avatar of undefined
Last Comment
NiceMan331

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
johnsone

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Sanjeev Labh

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Sanjeev Labh

However, you need to have export import previliges or you will be allowed to do that for your own schema only.
johnsone

As per the documentation here -> http://docs.oracle.com/cd/E35137_01/appdev.32/e35117/intro.htm#sthref131

SQL Developer does not do an export.  It generates flat files in one of many formats that need to be loaded by another tool.  Not sure how well it will handle BLOBs if you have them.

I believe that TOAD export works the same way.

I would prefer to work with the expdp/impdp or exp/imp tools.  They will handle data transfers between Oracle databases better.
Sean Stuber

Yes Toad generates a script (or multiple scripts)

Database -> Export -> Generate Schema Script

In addition to the user and any of that user's objects, the script can also include ddl to create tablespaces, roles and profile for the user.

In order to execute the script you'll need administrative privileges on the target database.  This is true of any of the methods or tools.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Sanjeev Labh

If you see the screenshot toad-exp2.jpg it shows as data pump. You have the provision to do Data pump as well as the normal export utility.
Sanjeev Labh

Attached is the screenshot of sql developer help which clearly states that you can do data pump.
data-pump-sql-dev.JPG
NiceMan331

ASKER
Hi all.                                                                I performed successful export through toad , it generate dmp and log files ,   But when I tried to do import it fail , I don't know why
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Sanjeev Labh

Probably will have to check the log files for more details of the error.
slightwv (䄆 Netminder)

Datapump creates a DMP file on the database server.  Did you manually move the file from server1 to server2 before trying to import?
NiceMan331

ASKER
No slightw , I didn't , I'm still doing all from my machine
Your help has saved me hundreds of hours of internet surfing.
fblack61
slightwv (䄆 Netminder)

Again, datapump creates a file on the database server.  It does not, and cannot, create a file on the client machine.

As johnsone posted in the very first post:  Classic exp/imp will create a file on the remote client machine.

I would go that route and forget all about GUIs.  Some times the command line is the way to go.
NiceMan331

ASKER
Actually toad creates dmp file on my machine , but if you said to import it should transfer the file manually to the other server , in this case , I understood , but also through command cannot import it , I will quit
slightwv (䄆 Netminder)

I'm not a Toad user but from what was posted above, the only 'export' it can create is by using datapump.

From what others posted, the script that is local is just that, a script, not an export DMP file.

If the file is local, there should be no need to transfer it to the server.

then it goes back to you letting us know what errors you are getting.

Not being a Toad user, I'll let others comment.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Sean Stuber

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
NiceMan331

ASKER
ok , now as a result , expport done by toad from my machine and the file is on my local drive
what is the final design for imp , it could be possible in any way or not without moving the file to the server ?
Sean Stuber

depends on the type of export you did.

did you do datapump?  If so, then no, you'll have to move it to the server

if you did old "classic" export then you should be able to use Toad's import wizard.   It will be dependent on versions though as noted previously.

if you did a schema export, you should be able to connect to the new database and run the script from within the editor window


if you used one of the other types then there will be additional steps
NiceMan331

ASKER
i used : export utility wizard , it creates the dmp on my machine
then when i tried to use : import utility wizard , it start import but immediately finished without any import
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Sean Stuber

what's in your log file?
SOLUTION
David VanZandt

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
NiceMan331

ASKER
what's in your log file?
here is the text file for exporting the user
exp-h2002-rud.log
slightwv (䄆 Netminder)

I believe what sdstuber was wanting was the log file for the import so we could see why it was failing.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
NiceMan331

ASKER
THE LOG file fr import is empty
David VanZandt

Any chance you are looking in the wrong place, wrong file?  Or that the particular job execution is still running?  Even if there were errors in the first line, something gets logged.
NiceMan331

ASKER
So what dvz ? I didn't get your idea
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
slightwv (䄆 Netminder)

If the import fails, there has to be some error messages somewhere.  Imports almost always provides a log.
NiceMan331

ASKER
ok
let me repeat the process again and send you the error
David VanZandt

Log files are either in the default directory (from which  the datapump job was begun), if not specified in the command line.   If the command includes a parameter file, then the logfile path and name may be in the parameter file.  HTH
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
NiceMan331

ASKER
i tried the process again
the import not performed
and here is the snapshot of the result

note : log file still empty
Toad.bmp
Toad-log.bmp
Sanjeev Labh

There is no log file attached. The second one seems to be the parameter file which the import process uses. The log will have the details of import and errors in case of failure.
NiceMan331

ASKER
the log file is empty as i mentioned above
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
slightwv (䄆 Netminder)

The TOUSER looks odd to me.  Never seen a username with a '.' in it.  I know one can be created by using double quotes but if you did that, I would strongly suggest you rethink that approach.
NiceMan331

ASKER
yes because it is in another database , its sid = dev and the user = jun15
so i named the touser  dev.mar15
slightwv (䄆 Netminder)

>>so i named the touser  dev.mar15

If you created the user using double quotes, maybe you need the double quotes in the param file as well?

As I mentioned, I've never used a user with a '.' in the name.  Maybe it is causing issues.

As a test, can you create a user without using quotes and without a '.' and try importing a single table into the new user?
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
NiceMan331

ASKER
The user mar15 I created without couts , it's name in its database dev is like this : mar15 , the import process here within user h2002 , when it ask me about user from user , h2092 available in the list , then to select : trouser , here I just refer to user mar15 followed after it's database name dev , I'm i correct ?
slightwv (䄆 Netminder)

TOUSER should be mar15.
NiceMan331

ASKER
But how it will understand where mar15 in which database is ?
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
slightwv (䄆 Netminder)

mar15 is a user in whatever database you tell it to import into.

When you run the import command, you provide connection information for the database.

Are you trying to apply the SQL Server definition of a database to Oracle?

SQL Server and Oracle use very different terms when referring to databases and schemas.
NiceMan331

ASKER
No , it's oracle , I'm not using SQL server ,
slightwv (䄆 Netminder)

I understand you are using Oracle.

I was asking if you were using the SQL Server definition of 'database' when you asked:
But how it will understand where mar15 in which database is ?

If not, I do not understand what you were asking.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
NiceMan331

ASKER
Sorry , let me try again using mar15 only to see if it will solve the problem
NiceMan331

ASKER
look at the first shoot , here to select users
from user is ok , i can easly select the existing user h2002 in the current database
in the other field , the list not contain user mar15 which is logic , because it is from another database
and in this field i typed : mar15 , then i pressed button add
same result , empty log file , and no process, see the parameter file please
select.png
param.png
slightwv (䄆 Netminder)

You said you created the user mar15 in post http:#a40325738.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
NiceMan331

ASKER
Yes I did , but in another database , I mean this wizard gives you a list of all users in the current database , if I want to select user mar15 which is from different database it will not be included in those lists ,  but they mentioned in the same step of the wizard , user from another database may selected
SOLUTION
slightwv (䄆 Netminder)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
NiceMan331

ASKER
It's like this : userB already exists inside databaseB
slightwv (䄆 Netminder)

I'm confused.

You said mar15 didn't exist in the database you are importing into.  It needs to.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
NiceMan331

ASKER
No , it is existing in the database I'm importing into , but not available in the list provided by wizard of toad because it show only users of current database
slightwv (䄆 Netminder)

I'm not a Toad user but if the user isn't listed in the TOUSER dropdown, then I'm thinking that user doesn't exist or you aren't connecting to the database you think you are connecting to.

I would suggest you give up trying to use the GUI and use the command line.  You already have the basics of the PARFILE.  Open up a CMD prompt and do it from there.
Sanjeev Labh

When you are doing import to another user it would fail as the another user will not be having full database import privileges, also remap option he might not be able to do it.

If doing from toad it would be much safer to do from and to the same user from source to destination.

SQL Developer has option to do this kind of operation but in that first it connects to both database and then list out the users from both sides to select. But you will need DBA or full database export privileges to do that.

If this is quite confusing you can go for straight forward simple export import with or without datapump from the server in command line mode.
Your help has saved me hundreds of hours of internet surfing.
fblack61
Sean Stuber

Why the penalty grade?
NiceMan331

ASKER
No penalty , it is by mistake only , the net interrupted suddenly then I have no authorization to change it , plz re open again then I can correct it
NiceMan331

ASKER
Dear All
i just accept your answers as an appreciating to your participation to solve my problem , but in actual , my problem not yet solved , i will try to use my account in "ToadWorld" to see if i got an answer
thanx to all
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.