All Forums Tools
18 Feb 2014
How to Run Fast Export

Hello All,
I am trying to run the below script in fxp:
.LOGTABLE DB.errors
.LOGON jugalDB/JBhatt,jugal
.BEGIN EXPORT
.EXPORT OUTFILE samples111
Sel top 10 * from db.table1
.END EXPORT
.LOGOFF
In the Interactive Mode i gave it as below:
fxp < fxpExample.txt
I am getting an error. This is the 1st time i am learning about FastExport. Please help me how to proceed.. THanks
 

dnoeth 4628 posts Joined 11/04
18 Feb 2014

You should always specify which error you get.
FastExport commands must start with a period. Both Fexp and SQL commands must be terminated by a semicolon:

.LOGTABLE DB.errors;
.LOGON jugalDB/JBhatt,****;
.BEGIN EXPORT;
.EXPORT OUTFILE samples111;
Sel top 10 * from db.table1;
.END EXPORT;
.LOGOFF;

 

Dieter

Adeel Chaudhry 773 posts Joined 04/08
18 Feb 2014

Dieter's example should work, otherwise whats the error? Something to do with HOSTS file?

-- If you are stuck at something .... consider it an opportunity to think anew.

18 Feb 2014

Hi Dnoeth,
I had forgot to include the semicolon while posting this issue. Sorry for that.
While runnin the script in my PC i had included period in the beginnin and a semicolon in the end of the code.
I got the answer from google.
fxp < /home/jugal/fexport.txt
 
 

19 Feb 2014

When i write a FastExport Script with the .ACCEPT Command.. How should i give the data in param_file. Is there a particular format???

.LOGTABLE DB.errors;
.LOGON jugalDB/JBhatt,****;
.ACCEPT col1,col2 from param_file;
.BEGIN EXPORT;
.EXPORT OUTFILE samples111;
Sel top 10 * from db.table1
where col1='&col1' and col2='$col2';
.END EXPORT;
.LOGOFF;

19 Feb 2014

correction:
where col1='&col1' and col2='&col2';

You must sign in to leave a comment.