Import Table Definition from Command Line

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
U
Participant
Posts: 230
Joined: Tue Apr 17, 2007 8:23 pm
Location: Singapore

Import Table Definition from Command Line

Post by U »

Can orchdbutil (or any other command) be used from the command line to import a table definition into the repository?

If you have the correct syntax for that I would really appreciate it!
datisaq
Participant
Posts: 154
Joined: Wed May 14, 2008 4:34 am

Post by datisaq »

Refer the docs for "dsimport" or "dscmdimport" command this two commands are used for importing the elements(jobs,table defns etc)
IBM Certified - Information Server 8.1
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I suspect that the question relates to importing a table definition from a database, rather than from an exported, already-imported table definition.

I'm not sure that - despite what the graphical importer claims about orchdbutil being used under the covers - that there's any public documentation about exactly how this is achieved.
Orchestrate User's Guide wrote:orchdbutil is a stand-alone command that interacts with the DB2, Oracle, and Informix databases to perform such tasks as creating, dropping, and clearing tables, displaying the schema for a table, executing SQL statements, and so on.
But I can't find any more documentation than that.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Entering the command with its help option or with no option gives a syntax summary but I still can't read anything in that about how to import.

Code: Select all

$ orchdbutil
##I IIS-DSEE-TFCN-00001 16:06:36(000) <main_program>
IBM WebSphere DataStage Enterprise Edition 8.5.0.5746
Copyright (c) 2001, 2005-2008 IBM Corporation. All rights reserved



##I IIS-DSEE-TFCN-00006 16:06:36(001) <main_program> conductor uname: -s=Linux; -r=2.6.18-194.26.1.el5; -v=#1 SMP Fri Oct 29 14:21:16 EDT 2010; -n=blueberry.zenith.com.au; -m=x86_64
##E IIS-DSEE-TCDU-00001 16:06:36(002) <main_program>
Usage:
  orchdbutil
   [exists | show | drop | locator | clear | create | check | exec | tablenames] <options>

   All subcommands require the -dbtype option. Values for dbtype
   include: db2, informix, informix_xps, oracle, teradata, netezza,
   sqlserver, iway, sybaseiq, sybasease and odbc.  Options accepted
   by all subcommands include: -server, -dbname, -dboptions, -db_cs.

   exists <tablename>
      Sets the command's status to 0 if the table exists, 1 otherwise.

   show <tablename>
      Display the ORCHESTRATE schema for the specified table.

   locator <tablename>
      Display the Locator Information for the specified table.

   drop <tablename>
      Drop the specified table from the database.

   clear <tablename>
      Delete all rows from the specified table.

   create <tablename>
      Create a new table in the database. The -schema or -schemafile
      option is required. Additional options accepted:

      -truncate
         Truncate the length of field names that exceed the maximum
         allowed by the database.

      -stringlength <n>
         Specify a max string length for unbounded length strings/raws.

      -createoptions 'options'
         Specify database specific creation options

   check
      Check a query and display schema of the resulting dataset.
      This can take one of two forms:

      -table <tablename> [-selectlist <selectlist>] [-filter <filter>]

      - OR -

      -query <query>

      These are analogous to the standard database read operator forms.

   nodemap
      Check a query and display the nodemap that will be used to
      place the database read operator, if appropriate. This takes
      one of two forms:

      -table <tablename>

      - OR -

      -query <query> [-partitiontable <table>]

      These are analogous to the standard database read operator forms.

   exec 'sql'
      The specified SQL statement is passed to the database for
      execution. Use with care.

   tablenames
      -owner <owner>
      Prints out the tables owned by the specified user
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
rameshrr3
Premium Member
Premium Member
Posts: 609
Joined: Mon May 10, 2004 3:32 am
Location: BRENTWOOD, TN

Post by rameshrr3 »

I know this is an old thread, but I had gone through ALL orchestrate manuals that were available and did not see this command documented in detail anywhere . ( A 2 or 3 line description did not qualify as a 'detailed' )

orchadmin by contrast is documented in the Orchestrate admin and Install guide.

The only detailed info for this command is what you can get by typing 'orchdbutil' on the command line - if you are fortunate enough to have command access and all env variables are set up so that orchestrate commands can be succesfully executed. Since i work on a windoze env right now , it was a pain to just get the command execute ..
Post Reply