error of exporting a sql data table from IBM netezza database to a txt file on win 7

0

I would like to export a data table from IBM netezza SQL daatbase in Aginity workbench to a txt file on win 7.

I called The sql query from C# in visual studio 2013:

 CREATE EXTERNAL TABLE 'C:\\path\\my_name.txt'
 USING
 (
    Y2BASE 2000
    ENCODING 'internal'
    REMOTESOURCE 'ODBC'
    ESCAPECHAR '\'
 )
 AS 

 SELECT *
      FROM admin.my_table 

I logged in as admin in the database. But, I got error:

  Exception captured: System.Data.Odbc.OdbcException (0x80131937): 
  ERROR [HY000]    ERROR:  CREATE EXTERNAL TABLE: permission denied.

Also, I got the same error when I used "export table" wizard in Aginity workbench.

But, I can export the table by running SQL query in Aginity workbench.

Any help would be appreciated.

sql
database
export
netezza
asked on Stack Overflow Nov 28, 2014 by user3601704 • edited Nov 28, 2014 by user3601704

1 Answer

0

Can you please clarify what you mean here ?

But, I can export the table by running SQL query in Aginity workbench.

My guess would be that you are right clicking and exporting to excel or csv. This is quite different than an external table.

The external table is a special privilege that must be granted by the DBA.

http://colbran.co.za/wordpress/2011/07/14/netezza-external-tables/

answered on Stack Overflow Dec 15, 2014 by frankjustme2004

User contributions licensed under CC BY-SA 3.0