| |
|
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.
|
 |

10-28-10, 06:55
|
|
Registered User
|
|
Join Date: Oct 2010
Posts: 18
|
|
|
Cant able to bind packages and procedures through db2look
|
|
I am newbie to DB2 and cant able to bind packages and procedures through db2look utility. When I run db2look utility
[db2inst1@brahmagupta ~]$ db2look -d VISILOG2 -e > visilog21.ddl
-- No userid was specified, db2look tries to use Environment variable USER
-- USER is: DB2INST1
-- Creating DDL for table(s)
and I cant see message like
-- Binding package automatically ...
-- Bind is successful
Please help me in this regard
|
|

10-28-10, 10:06
|
|
Registered User
|
|
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
|
|
the bind is only for first execution..
where is the problem ? has visilog21.ddl any rows ?
you can specify -o on db2look command
-l would also give ddl for tablespaces.....
db2look -d xxx -e -l -o db2look.out
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
|
|

10-28-10, 10:16
|
|
Registered User
|
|
Join Date: Oct 2010
Posts: 18
|
|
|
|
Hi przytula_guy,
Thnx for your reply....
my visilog21.ddl consists of all ddl statements like create tables,views,sequences,functions, etc... except packages and procedures.
I am not in confusion that how the procedures and packages are getting missed out from .ddl file...
Do I need to give any extra privilege to my new database...
Please suggest
|
|

10-28-10, 10:17
|
|
Registered User
|
|
Join Date: Oct 2010
Posts: 18
|
|
Hi przytula_guy,
Thnx for your reply....
my visilog21.ddl consists of all ddl statements like create tables,views,sequences,functions, etc... except packages and procedures.
I am in confusion that how the procedures and packages are getting missed out from .ddl file...
Do I need to give any extra privilege to my new database...
Please suggest
|
|

10-28-10, 11:22
|
|
Registered User
|
|
Join Date: Oct 2010
Posts: 18
|
|
And when I am trying to extract packages and procedures through dasuser I am getting following error:
[db2inst1@brahmagupta ~]$ db2look -d VISILOG2 -e -i dasusr1 -w dasusr1 > visilog21.ddl
-- No userid was specified, db2look tries to use Environment variable USER
-- USER is: DB2INST1
-- Creating DDL for table(s)
--An error has occured during Binding
Error Message =
SQL0551N "DASUSR1" does not have the required authorization or privilege
to perform operation "EXECUTE" on object "NULLID.DB2L0H00".
SQLSTATE=42501
SQLCA
Size = 136
SQLCODE = -551
Tokens = DASUSR1 þ EXECUTE þ NULLID.DB2L0H00
RDS fn = SQLRA138
RC = 0x801A006D = -2145779603
Reason = 0x0000 = 0
Reason2 = 0x0000 = 0
Line # = -20
Warning flags =
|
|

10-28-10, 12:41
|
|
Registered User
|
|
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
|
|
packages are not in db2look only sql procedures
why executing this from dasusr1 - this is the admin server for remote clients
as indicated - missing authorization
execute it from instance owner instead..
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
|
|

10-28-10, 17:43
|
|
∞∞∞∞∞∞
|
|
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
|
|
The following info was just recently added to the manual:
"By default, the instance owner has the EXECUTE privilege on db2look packages. For other users to run the db2look command, the instance owner has to grant the EXECUTE privilege on db2look packages. To determine the db2look package names, the db2bfd command can be used as follows:
cd .../sqllib/bnd
db2bfd -b db2look.bnd
db2bfd -b db2lkfun.bnd
db2bfd -b db2lksp.bnd
"
Check the "Usage notes" section here:
IBM DB2 9.7 for Linux, UNIX and Windows Information Center
|
|

11-02-10, 12:23
|
|
Registered User
|
|
Join Date: Oct 2010
Posts: 18
|
|
As mentioned... I have executed
cd .../sqllib/bnd
db2bfd -b db2look.bnd
db2bfd -b db2lkfun.bnd
db2bfd -b db2lksp.bnd
commands....
still facing the same problem...
Please suggest me...
my procedures are not getting extracted through db2 look...
I am logging through db2inst1 user...
|
|

11-02-10, 14:21
|
|
:-)
|
|
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
|
|
Quote:
Originally Posted by ashwinjoshi
my procedures are not getting extracted through db2 look...
|
How do you know if you have any procedures?
|
|

11-03-10, 03:28
|
|
Registered User
|
|
Join Date: Oct 2010
Posts: 18
|
|
Yeah I have only procedure in my whole database and I have crossed checked through IBM DATA STUDIO...
|
|

11-03-10, 09:25
|
|
Registered User
|
|
Join Date: May 2003
Location: USA
Posts: 5,198
|
|
Anytime you do a db2look and want all objects in the database (other than those that are created by default when the database is created) you should use the -a -e -l options.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|