Results 1 to 11 of 11
  1. #1
    Join Date
    Oct 2010
    Posts
    18

    Unanswered: 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

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    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
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

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

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

  5. #5
    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 =

  6. #6
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    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
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  7. #7
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,369
    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

  8. #8
    Join Date
    Oct 2010
    Posts
    18

    Red face

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

  9. #9
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by ashwinjoshi View Post
    my procedures are not getting extracted through db2 look...
    How do you know if you have any procedures?

  10. #10
    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. #11
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

Posting Permissions

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