HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: export script with query option
Operating System - HP-UX
1827279
Members
3374
Online
109717
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2003 04:02 PM
06-09-2003 04:02 PM
export script with query option
I run Oracle 8.1.6 on Hp-UX 11.0
kindly help me with an export script that would use the query option.
i want to backup: select * from actb where trn_dat between '01-jun-2003' and '10-jun-2003'.
Thanks aot.
kindly help me with an export script that would use the query option.
i want to backup: select * from actb where trn_dat between '01-jun-2003' and '10-jun-2003'.
Thanks aot.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2003 08:43 PM
06-09-2003 08:43 PM
Re: export script with query option
You aren't going to be able to do this with 8i. This feature was added in 9i. You could do something like the following (as a shell script):
#!/bin/sh
sqlplus/ <> logfile.log
create table actb_temp as select * from actb where trn_dat between ...;
exit;
!
exp userid=/ file=file.dmp tables=actb_temp
sqlplus/ <> logfile.log
drop table actb_temp;
exit;
!
Hope this helps,
Brian
#!/bin/sh
sqlplus
create table actb_temp as select * from actb where trn_dat between ...;
exit;
!
exp userid=
sqlplus
drop table actb_temp;
exit;
!
Hope this helps,
Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2003 10:13 PM
06-09-2003 10:13 PM
Re: export script with query option
Hi, you can also with 8.1.6
exp user/password tables=actb query="'select \* from actb where trn_dat between \'01-jun-2003\' and \'10-jun-2003\''"
You will have to play a little because the query must be enclose in single quotes ', but S.O. will try to expand, so you must wrap with duoble quotes and escape the wildchar * .
Massimo
exp user/password tables=actb query="'select \* from actb where trn_dat between \'01-jun-2003\' and \'10-jun-2003\''"
You will have to play a little because the query must be enclose in single quotes ', but S.O. will try to expand, so you must wrap with duoble quotes and escape the wildchar * .
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2003 01:21 AM
06-10-2003 01:21 AM
Re: export script with query option
hi,
instead of using:
exp userid=useryd/passyd tables=actb query=\"where trn_dat between '01-jun-2003' and '10-jun-2003'\"
i would prefer to use a parameter file, exp.par containing the following argument:
query="trn_dat between '01-jun-2003' and '10-jun-2003'"
and now use the command:
exp userid=useryd/passyd tables=actb parfile=exp.par
(this is easier especially when you can have cases when you will have to escape the QUERY strings)
hope this helps!
regards
Yogeeraj
PS. Review your query! You should always compare dates to dates, strings to strings, numbers to numbers and never anything other combination
instead of using:
exp userid=useryd/passyd tables=actb query=\"where trn_dat between '01-jun-2003' and '10-jun-2003'\"
i would prefer to use a parameter file, exp.par containing the following argument:
query="trn_dat between '01-jun-2003' and '10-jun-2003'"
and now use the command:
exp userid=useryd/passyd tables=actb parfile=exp.par
(this is easier especially when you can have cases when you will have to escape the QUERY strings)
hope this helps!
regards
Yogeeraj
PS. Review your query! You should always compare dates to dates, strings to strings, numbers to numbers and never anything other combination
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP