Results 1 to 12 of 12
  1. #1
    Join Date
    May 2009
    Posts
    10

    Unanswered: Unable to run procedure : GET_DBSIZE_INFO

    New to DB2.

    Using DB2 9.5 running on WinNT server.
    Whenever I try to execute : CALL GET_DBSIZE_INFO(?, ?, ?, -1)
    I get an error message - SQLCODE=-313

    Want to know what am I doing wrong??

  2. #2
    Join Date
    May 2009
    Posts
    10
    I cannot see SYSMON schema in the database. Is it the cause??

  3. #3
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    I do not see why the existence of any schema would cause this. Try calling it fully qualified:

    CALL SYSPROC.GET_DBSIZE_INFO(?, ?, ?, -1)

    Andy

  4. #4
    Join Date
    May 2009
    Posts
    10
    Thanks Andy.
    Tried : call SYSPROC.GET_DBSIZE_INFO(?,?,?,30);
    and got the same error..
    and also this ...
    select snapshot_timestamp,db_size,db_capacity from table(SYSPROC.GET_DBSIZE_INFO(?,?,?,0))
    and got SQLCODE=-418

  5. #5
    Join Date
    Nov 2005
    Location
    IL
    Posts
    557
    that is bizare.

    db2 "CALL GET_DBSIZE_INFO(?, ?, ?, -1)"
    Value of output parameters
    --------------------------
    Parameter Name : SNAPSHOTTIMESTAMP
    Parameter Value : 2009-05-11-09.55.58.314235
    Parameter Name : DATABASESIZE
    Parameter Value : 4733875113984
    Parameter Name : DATABASECAPACITY
    Parameter Value : -1
    Return Status = 0

    It works here.

    Do you have the following
    SYSMON authority
    EXECUTE privilege on the GET_DBSIZE_INFO procedure
    --
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows

    DB2 v9.7.0.6 os 6.1.0.0

  6. #6
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Quote Originally Posted by aurindam
    select snapshot_timestamp,db_size,db_capacity from table(SYSPROC.GET_DBSIZE_INFO(?,?,?,0))
    and got SQLCODE=-418
    This is because this is not valid SQL.

    Back to your original problem, SQLCODE -313 is this:

    Code:
    SQL0313N  The number of host variables in the EXECUTE or OPEN statement
          is not equal to the number of values required.
    
    Explanation:
    
    The number of host variables specified in the EXECUTE or OPEN statement
    does not equal the number of host variables required for the parameter
    markers (?) appearing in the SQL statement.
    
    User response:
    
    Correct the application program so the number of host variables
    specified in the EXECUTE or OPEN statement is correct for the parameter
    markers in the SQL statement.
    
     sqlcode: -313
    
     sqlstate: 07001, 07004
    How are you call the Stored Procedure? Are you using the CLP or from an application?

    Andy

  7. #7
    Join Date
    May 2009
    Posts
    10
    Tried calling it from CLP...
    Did not work.
    I think the problem is with SYSMON authority.. I cannot see anything like SYSMON in the DB.

  8. #8
    Join Date
    Nov 2005
    Location
    IL
    Posts
    557
    run the following

    db2 get dbm cfg

    and see if your id is part of of the groups that are assigned to one of these

    SYSADM group name (SYSADM_GROUP) =
    SYSCTRL group name (SYSCTRL_GROUP) =
    SYSMAINT group name (SYSMAINT_GROUP) =
    SYSMON group name (SYSMON_GROUP) =
    --
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows

    DB2 v9.7.0.6 os 6.1.0.0

  9. #9
    Join Date
    May 2009
    Posts
    10
    Cougar, This is what I get :

    SYSADM group name (SYSADM_GROUP) =
    SYSCTRL group name (SYSCTRL_GROUP) =
    SYSMAINT group name (SYSMAINT_GROUP) =
    SYSMON group name (SYSMON_GROUP) = DB2ADMIN

    I am connected to the DB using DB2ADMIN.
    And I hav execute privilages for all procedures

  10. #10
    Join Date
    May 2009
    Posts
    10
    The error that I keep getting is :

    db2 => call SYSPROC.GET_DBSIZE_INFO(?,?,?,0);
    SQL0443N Routine "*IZE_INFO" (specific name "") has returned an error
    SQLSTATE with diagnostic text "SQL0572 Reason code or token: NULLID.STADMG01
    ". SQLSTATE=38553

  11. #11
    Join Date
    Oct 2003
    Location
    Curitiba - PR - Brazil
    Posts
    18
    db2 ? SQL0572N


    SQL0572N Package "<pkgname>" is inoperative.

    Explanation:

    The package "<pkgname>" is marked as inoperative and must be explicitly
    rebound (without specifying RESOLVE CONSERVATIVE) before it can be used.
    This package cannot be used because one or more user-defined functions
    that it depends upon have been dropped.

    User response:

    Explicitly rebind the named package using either the REBIND (without
    specifying RESOLVE CONSERVATIVE) or the BIND command.

    sqlcode: -572

    sqlstate: 51028


    Please try rebinding that specific or all your db packages.
    Norberto Gasparotto Filho

    IBM Cert. DB2 v9 DBA
    IBM Cert. DB2 v9 App. Developer
    SCJP 5

  12. #12
    Join Date
    May 2009
    Posts
    10
    Thanks norbertogf .
    What I plan to run is :
    db2 bind "%DB2PATH%\bnd\@db2cli.lst" blocking all grant public

    db2cli.lst file contains :
    db2clipk.bnd
    db2clist.bnd

    Is it OK??...
    I have DB2 9.5 running on Windows NT server

Posting Permissions

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