Page 1 of 1

Import Table Definition from Command Line

Posted: Wed Jan 19, 2011 11:08 pm
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!

Posted: Thu Jan 20, 2011 12:04 am
by datisaq
Refer the docs for "dsimport" or "dscmdimport" command this two commands are used for importing the elements(jobs,table defns etc)

Posted: Thu Jan 20, 2011 4:25 am
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.

Posted: Thu Feb 03, 2011 11:09 pm
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

Posted: Thu May 19, 2011 8:17 am
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 ..