EXPORT in SQL-Plus

Hi,

From our client (an NT Workstation), we want to lunch an export that would create a DMP file on our server (HP-Unix 11). For security reason, we're only allowed to use SQL-Plus.
 
Is there an SQL command that we could use to start an export in SQL-Plus (NOT from the OS command line)?

michonfrAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Mark GeerlingsConnect With a Mentor Database AdministratorCommented:
If you have the Oracle utilities (export, import, SQL*Loader) installed on the client, and if it is the same (or higher) Oracle version than your server's Oracle version then yes, you can run export on the client.  And yes, under some circumstances you can create the dump file on the server, but this is true only if your client can map a drive to a directory on the server and if your client has write privileges in that directory.  There is also the issue of network traffic though with this approach.

No, you cannot from SQL*Plus on a client launch Oracle export to run on a separate Oracle server.
0
 
jtriftsMI and AutomationCommented:
Have you tried issueing a HOST command from within SQL*PLUS?

Host is able to run an executable that is actually sitting on the host machine...thus mimicking running from the command line.

(I have used it to run SQLLDR successfully)

JT
0
 
saschekCommented:
No, but you can invoke the export utillity with a double click too.
Or aren't you allowed to start programs on your client?

If you can connect via SQL*Plus, you can establish any access to
the db over Net8-Protocoll. The export utillity connects just this way.
It should allready be installed at your NT-client as
[ORACLE_HOME]/bin/exp.exe - if not install it!
You can launch it from the command line (best) or with double click.
-- Sven
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
jkstillCommented:
If I were you, I would examine the security policy
regarding the use of import/export and other exe's
and talk with the security folks to help them understand
the implications of their policy.

They're certainly not affording any protection by
preventing you from using export, but allowing you
to use sqlplus.

0
 
jammalkCommented:
Yeah..!
You need to use the following 2 commands.
1. Host exp userid=name/passwd .... (This creates dump file on the client)
2. ftp server_name .....! (to send it to UNIX)
Let me know if it works!
Jammalk

0
 
jtriftsMI and AutomationCommented:
I think the correct syntax for host is to simply pass the command (and switches) in as a parameter (i.e. in brackets):

HOST(exp username/password@database);

You should not need to specify the location of exp assuming that Oracle settings are already in the registry...

I suspect that you also have the option to leave out the password in the call (as it is not blanked out)...then exp will probably prompt you for the password (that's the way sqslldr works too...)

As for FTP syntax...I'm not sure of that, but I'd appreciate it if you'd post it after you've got it working so we'll all know...

JT
0
 
ddaCommented:
HOST command will launch a program at NT box, and the question was about executing exp on the server. I think that it is impossible.
0
 
ddaCommented:
HOST command will launch a program at NT box, and the question was about executing exp on the server. I think that it is impossible.
0
 
ddaCommented:
HOST command will launch a program at NT box, and the question was about executing exp on the server. I think that it is impossible.
0
 
ddaCommented:
Sorry for multiple input, our proxy is getting mad.
0
 
jtriftsMI and AutomationCommented:
dda...

you can run exp80 on a client machine though...or am I missing something here?
0
 
jtriftsMI and AutomationCommented:
ahhh....they want to launch it on the client but have the export occur on the server...

That may indeed be impossible...

When you run an export, can you specify the output directory?

If so, then you could set up a Samba share on the client pointing to the server, run the exp using HOST in SQL*PLUS, writing to the Samba share...

BUt don't ask me about Samba as I always get Tech Svcs to set them up...
0
 
ddaCommented:
This is all network solutions, and they want to do server-based export. So I think that is impossible.
0
 
leolkkCommented:
i want to know too
0
 
ianandCommented:
Hi
I don't think there is any such facility available. But you can try a roundabout way.

Steps
1.  Create a SHELL script in Unix as below and run on server at startup.
## Start of Shell script
while [ "a" = "a" ]
do
  i=`cat abc.txt`
  if [ $i = "1" ]
  then
    exp username/password@database ...
    echo "0" > abc.txt
  else
    sleep 5    # Check after every five seconds
  fi
loop
## End of Shell script

2.  Create a file abc.txt with permissions 666 containing character "0".
3.  Use UTL_FILE in PL/SQL to overwrite the file abc.txt to "1" whenever you want the export to run.
    example : run_export.sql
    DECLARE
      g_file_ptr     utl_file.file_type ;
    BEGIN
      g_file_ptr := fopen('<directory>','abc.txt','w');
      utl_file.put_line(g_file_ptr,'1');
      utl_file.fclose(g_file_ptr);
    END ;
    /

This will help you in a roundabout way to run your export.

Best of luck.

Anand

0
 
ianandCommented:
Hi,

Just to add ...

Steps 1 and 2 are to be run in the Server.
Step 3 is to be run in the Client SQL-Plus.

Anand
0
 
ddaCommented:
ianand: all this stuff require too much privilegies, I suppose, they do not have shell access at all :)
0
 
michonfrAuthor Commented:
I realy need an SQL command. We don't have the privilegies to use the command line and the space to create an export on the client side.
0
 
ddaCommented:
I guess that you should ask server admin to create some cron job for you to perform export. Anyway, what is the benefit of having export file on server without access to that file?
0
 
ishickCommented:
One of the way to create data on other server  from SQL  is simple copy command

copy from system/password@<tnsnames alien> to system/password@<tnsmanes> -
append <owner>.<table_name> -
using -
select * from <owner>.<table_name>
To run this command open sql plus where data needs to be insert
you may create dynamic sql to populate # on copies or create hard sql

Thanks


0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.