If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Unable to run procedure : GET_DBSIZE_INFO

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-11-09, 09:50
aurindam aurindam is offline
Registered User
 
Join Date: May 2009
Posts: 10
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??
Reply With Quote
  #2 (permalink)  
Old 05-11-09, 10:14
aurindam aurindam is offline
Registered User
 
Join Date: May 2009
Posts: 10
I cannot see SYSMON schema in the database. Is it the cause??
Reply With Quote
  #3 (permalink)  
Old 05-11-09, 10:26
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
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
Reply With Quote
  #4 (permalink)  
Old 05-11-09, 10:37
aurindam aurindam is offline
Registered User
 
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
Reply With Quote
  #5 (permalink)  
Old 05-11-09, 11:05
Cougar8000 Cougar8000 is offline
Registered User
 
Join Date: Nov 2005
Location: IL
Posts: 554
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.1.0.2 os 5.3.0.0
Reply With Quote
  #6 (permalink)  
Old 05-11-09, 11:13
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
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
Reply With Quote
  #7 (permalink)  
Old 05-13-09, 09:02
aurindam aurindam is offline
Registered User
 
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.
Reply With Quote
  #8 (permalink)  
Old 05-13-09, 09:49
Cougar8000 Cougar8000 is offline
Registered User
 
Join Date: Nov 2005
Location: IL
Posts: 554
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.1.0.2 os 5.3.0.0
Reply With Quote
  #9 (permalink)  
Old 05-14-09, 04:14
aurindam aurindam is offline
Registered User
 
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
Reply With Quote
  #10 (permalink)  
Old 05-14-09, 04:16
aurindam aurindam is offline
Registered User
 
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
Reply With Quote
  #11 (permalink)  
Old 05-14-09, 07:10
norbertogf norbertogf is offline
Registered User
 
Join Date: Oct 2003
Location: Curitiba - PR - Brazil
Posts: 17
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
Reply With Quote
  #12 (permalink)  
Old 05-14-09, 10:17
aurindam aurindam is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On