简体   繁体   中英

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

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.

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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM