Results 1 to 14 of 14
  1. #1
    Join Date
    Apr 2007
    Posts
    17

    Unanswered: DB2 v9 FP2 Client - SQL1096N The command is not valid for this node type.

    Hi there,

    Firstly, there was a post with a similar the same title before (2003) but I don't think it has anything to do with my problem.

    I have upgraded from DB2 v8 FP10 to DB2 v9 FP2 for both the servers and the clients - I've read the section on the IBM site about migrating and couldn't see any major problems except those listed below. I used <catalog tcpip node DB2NODE remote iedev035 server 50000 with "a description">. If I do a <list node directory> I get:

    ================================================== ========
    Node name = DB2NODE
    Comment = a description
    Directory entry type = LOCAL
    Protocol = TCPIP
    Hostname = iedev035
    Service name = 50000
    ================================================== ========

    I have 2 databases successfully created on the DB2 _server_ with our scripts and our tests run successfully against them. I can create the databases on the client, but when I (or should I say the scripts) try to run <db2batch -d databaseName - a username/password -f mySQLFile.sql -r mySQLFileLog.log> to populate the db etc, I get the following:

    ================================================== ========
    SQLERRP=SQLEUCLT SQL1096N The command is not valid for this node type.
    Unable to configure snapshot monitoring switches
    ================================================== ========

    From what I can see on the IBM website, the <db2batch> command syntax is correct. The syntax of the contents of the sql file (mySQLFile.sql) passed in by the <-f> parameter is correct. However, <db2batch> ran <Embedded dynamic SQL> as the default mode in DB2 v8 and its <CLI mode> by default now in DB2 v9. CLI needs bind files - I tried some binding:

    ================================================== ========
    // open a db2cmd
    // cd to db2 bind folder
    db2 connect to database_alias
    db2 bind @db2ubind.lst messages bind.msg grant public
    db2 bind @db2cli.lst messages clibind.msg grant public
    db2 connect reset
    ================================================== ========

    all of the above to no avail. I also tried to use the <Configuration Assistant> to bind the same way to no avail. I used <db2 get dbm cfg> to get the cfg info on the client. The node type is client - why is the command not valid for this node type as the error states?

    I can only surmise that:
    1). the binding is still wrong.
    2). the node is set up wrong.
    3). that I'm missing some sort of <catalog database [databaseName] at node DB2NODE with "a description" or perhaps an <attach command> - i've tried these - the dbs seem to already be cataloged - probably when they were created - maybe my I set them up wrong.
    4). something else.

    I appreciated the time taken to read this. Thanks in advance.

    Jason.

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    I believe that the MySQLfile.sql file contains a command that can only be executed on the server.

    Andy

  3. #3
    Join Date
    Apr 2007
    Posts
    17
    Hi ARWinner and thanks for the reply. The contents of the first particular sql file that fails is as follows:

    create table MyTable (
    id1 INTEGER NOT NULL,
    id2 INTEGER,
    name1 VARCHAR(8),
    name2 VARCHAR(28),
    num1 SMALLINT,
    num2 SMALLINT NOT NULL,
    num3 SMALLINT NOT NULL,
    CONSTRAINT mct_id1 PRIMARY KEY (id1) )
    NOT LOGGED INITIALLY;

    COMMENT ON TABLE MyTable is 'My Table ';

    I'm not too up on DB2 permissions and authorisation - maybe the user which the client is logged in as has not got sufficient privileges?

    Thanks again,

    Jason.

  4. #4
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    You would get a permission error, not an error that it is not allowed at the node type. Those statements are allowed from a remote node. Are those the only statements in the file?

    Andy

  5. #5
    Join Date
    Apr 2007
    Posts
    17
    Hi Andy,

    Yes, those are the only statements in the file (apart from comments). That is why I think there is something wrong with my configuration of the client or my client environment (ie moving from embedded dynamic SQL to CLI and not having bind files).

    Process:
    1). Install Client
    2). Catalog Node
    3). Run our Scripts (using a mix of bat / ksh / sql files)

    1) Install Client
    DB2v9FP2 Client Installation Guide
    Ensure you have no previous client installations and if so, ensure you uninstall and check the folder structure and system path to ensure all previous oracle entries have been removed.
    Get the appropriate installation file - it should be DB2v9FP2 Client - there is no need to install the DB2v9FP1 client first and then upgrade it - the actual FP2 upgrade is also a full installer.
    Extract this installer to a temporary location.
    Double Click on <setup.exe>.
    Ensure you machine meets all the prerequisites.
    Begin the Installation of the product.
    <DB2 setup wizard - DB2 Client - DB2COPY1>
    <Welcome screen> - Click <Next>.
    <License agreement> - click the <Accept> radio button. Click <Next>.
    <Select the installation, response file creation or both> - select <Install client & create response file> radio button. Select a location for the response file. Click <Next>.
    <Select the features to install> - select the components you want installed. Specify a location to install the client. Ensure the location path is relatively short as DB2 adds several system path entries and the system path has a finite length. Click <Next>.
    <Select the languages to install> - <English> should be the default in the <Selected languages> listbox. Review the installation folder details. Click <Next>.
    <Set the DB2 copy name> - you can change this or leave it as the default <DB2COPY1>. Click <Next>.
    <Specify the location of the DB2 Information Centre> - leave the default as <On the IBM Web site>.
    <Enable operating system securitiy for DB2 objects> - accept the default of <Enable operating system security> checked. The <DB2 administrators group> should be the default <DBADMNS> and the <DB2 users group> should be the default <DB2USERS>. Click <Next>.
    <Start copying files and create response file> - review the info. Click <Finish>.
    <Setup is complete> - review the info. Click <Finish>.

    2) Run <catalog tcpip node DB2NODE remote iedev035 server 50000 with "DB2v9FP2Node">.

    3). Run Scripts

    Thats my process - as I said, the database creates, but for some reason, its not happy at all with <db2batch> (in DB2 v8 we used to use <db2sql92> but that seems to have been completely removed from the v9 installer) - if I run it without the <-f> and <-r> switches (manually as opposed to letting the script do it) it still gives the <...command is not a valid...>. Its got to be something to do with the environment/configuration - it could be something obvious as I'm not a DBA and don't have much experience with DB2...

  6. #6
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    What happens if you execute the SQL script outside db2batch? (from a DB2 command window -> db2 -tvsf mysqlfile.sql).

    Andy

  7. #7
    Join Date
    Apr 2007
    Posts
    17
    Hi Andy,

    I did the following:

    // get a db2 cmd window with <db2cmd>
    db2 connect to [databaseName] user [theUser] using [thePassword]
    db2 -tvsf [pathToScript\scriptName.sql]
    DB20000I The SQL command completed successfully.

    The command completes successfully - I've checked the db with dbvisualizer and it has created the table on the db. Any ideas what wrong with <db2batch>?

  8. #8
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    I do not know. You can try binding it and see what happens.

    1) change to directory of bind files ~\sqllib\bnd
    2) db2 bind db2batch.bnd blocking all grant public

    Andy

  9. #9
    Join Date
    Apr 2007
    Posts
    17
    Hi Andy, and thanks again for the reply,

    I've done as you have asked but I get the following message:

    LINE MESSAGES FOR db2batch.bnd
    --------------------------------------------------------------------
    SQL0061W The binder is in progress.
    SQL0031C File "D:\DatabaseClients\DB2v9\bnd\db2batch.bnd"
    could not be opened.
    SQL0082C An error has occurred which has terminated
    processing.
    SQL0092N No package was created because of previous errors.
    SQL0091N Binding was ended with "3" errors and "0" warnings.
    --------------------------------------------------------------------

    However I read the following on the IBM website (applies to DB2 v9.1):

    <The db2batch.bnd file is not shipped. The db2batch command no longer requires the db2batch.bnd file and scripts should not attempt to issue a BIND or REBIND command using this file.>

    found @ <http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.rn.doc/doc/c0023664.htm>

  10. #10
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Well, I cannot think of what it could be. Maybe you should open a PMR with IBM on the issue.

    Andy

  11. #11
    Join Date
    Apr 2007
    Posts
    17
    Yeah, It should be interesting to see what they say. Thanks again for the help.

    Jason.

  12. #12
    Join Date
    Jun 2006
    Posts
    471
    also have a look at the support pages of udb. there are some known problems with db2batch like IY91197 with similar symptom
    because of attach and activating some monitor switches...
    Best Regards, Guy Przytula
    DB2 UDB LUW certified V6/7/8

  13. #13
    Join Date
    Apr 2007
    Posts
    17
    Thanks for the reply Guy - I tried to find information on IY91197 for <db2batch> but came up empty - could you point me to the appropriate IBM page if its not too much trouble? Thanks,

    Jason.

  14. #14
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    I looked at that APAR:

    http://www-1.ibm.com/support/docview...UTF-8&lang=all

    And it is for a V9 vlient talking to a V8 DB. Jason stated that he is on V9 for both.

    It maybe related as it pertains to the same error message.

    Andy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •