Results 1 to 14 of 14
  1. #1
    Join Date
    Jul 2003
    Posts
    78

    Question Unanswered: about DB2 V8.1 Restore and create new database from other database backups

    Hello,

    I tried to duplicate a DB2 V8.1 database on another machine. I create the database with restore my current database backups. And it did. Everything was there. And I could connect to the database in command center, but whatever SELECT statement I tried in command center, it shows me "Database connection failed!". Is there something I was missing? Please help. Thanks a lot.

  2. #2
    Join Date
    Aug 2003
    Location
    London
    Posts
    25

    Re: about DB2 V8.1 Restore and create new database from other database backups

    Hi, Can you please elaborate more on the error with the code ?

    Regards

    Originally posted by christine2003
    Hello,

    I tried to duplicate a DB2 V8.1 database on another machine. I create the database with restore my current database backups. And it did. Everything was there. And I could connect to the database in command center, but whatever SELECT statement I tried in command center, it shows me "Database connection failed!". Is there something I was missing? Please help. Thanks a lot.

  3. #3
    Join Date
    Jul 2003
    Posts
    78

    Re: about DB2 V8.1 Restore and create new database from other database backups

    I'm sorry, but this is the only thing I got from the message box, when I execute the select statement.

    Originally posted by sbas
    Hi, Can you please elaborate more on the error with the code ?

    Regards

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: about DB2 V8.1 Restore and create new database from other database backups

    Well, command center and control center are problematic ones ... "Database connection failed" can be because your admin server is down ...

    From your database, is your command centre local or remote ?

    If local -- Start the admin server .. From command line, db2admin start

    If remote -- Using the db2admin start , start the admin server on the remote database and on your client do,
    db2 catalog admin tcpip node remote <hostname>

    and then try using your command centre ...

    If you get the error message again, well, you will have to find if your database has problems .... Go to the command prompt and open a command window using the command db2cmd ... On the new window,
    connect and select from the tables ..

    If it works without problems, your first issue 'Whats wrong with the restore ?' is solved ...

    Cheers

    sAthyaram

    Originally posted by christine2003
    I'm sorry, but this is the only thing I got from the message box, when I execute the select statement.
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  5. #5
    Join Date
    Jul 2003
    Posts
    78

    Re: about DB2 V8.1 Restore and create new database from other database backups

    Thank you for your advise reply, it is very strange, I unchecked the "Automatically display the query result on result page" from command center options. Then it work. I could not explain, I just don't know why.

    Another thing, do I have to install C compiler on deployment machine in order to let the SP running?

    Thanks again.

    Originally posted by sathyaram_s
    Well, command center and control center are problematic ones ... "Database connection failed" can be because your admin server is down ...

    From your database, is your command centre local or remote ?

    If local -- Start the admin server .. From command line, db2admin start

    If remote -- Using the db2admin start , start the admin server on the remote database and on your client do,
    db2 catalog admin tcpip node remote <hostname>

    and then try using your command centre ...

    If you get the error message again, well, you will have to find if your database has problems .... Go to the command prompt and open a command window using the command db2cmd ... On the new window,
    connect and select from the tables ..

    If it works without problems, your first issue 'Whats wrong with the restore ?' is solved ...

    Cheers

    sAthyaram

  6. #6
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: about DB2 V8.1 Restore and create new database from other database backups

    Strange (or may be it is documented somewhere)

    Well, you need a C compiler only when creating a stored procedure ... You do not need one for running the same

    Cheers
    Sathyaram


    Originally posted by christine2003
    Thank you for your advise reply, it is very strange, I unchecked the "Automatically display the query result on result page" from command center options. Then it work. I could not explain, I just don't know why.

    Another thing, do I have to install C compiler on deployment machine in order to let the SP running?

    Thanks again.
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  7. #7
    Join Date
    Jul 2003
    Posts
    78

    Question Re: about DB2 V8.1 Restore and create new database from other database backups

    But now when I tried to run a SP from development center, it is failed because:

    A database manager error occured.[IBM][CLI Driver][DB2/NT] SQL0444N Routine "*REENTAGS" (specific name "SQL030729122551967") is implemented with code in library or path "...roc\CAPTEST\TEST\P2255196", function "pgsjmp" which cannot be accessed. Reason code: "4". SQLSTATE=42724

    ???

    Please help!

    Originally posted by sathyaram_s
    Strange (or may be it is documented somewhere)

    Well, you need a C compiler only when creating a stored procedure ... You do not need one for running the same

    Cheers
    Sathyaram

  8. #8
    Join Date
    Jul 2003
    Posts
    78

    Re: about DB2 V8.1 Restore and create new database from other database backups

    This error still there after I copied all the SP .dll file to the path. I'd appreciate your idea.

    Originally posted by christine2003
    But now when I tried to run a SP from development center, it is failed because:

    A database manager error occured.[IBM][CLI Driver][DB2/NT] SQL0444N Routine "*REENTAGS" (specific name "SQL030729122551967") is implemented with code in library or path "...roc\CAPTEST\TEST\P2255196", function "pgsjmp" which cannot be accessed. Reason code: "4". SQLSTATE=42724

    ???

    Please help!

  9. #9
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: about DB2 V8.1 Restore and create new database from other database backups

    My reply is based on the assumption that you are talking about SQL Stored Procedures ...

    You cannot copy the dlls from one machine to another and create stored procs ..

    In the Useful DB2 Stuff Thread on FAQs , there is a link to Deploying Stored Procedures ...

    Am I missing something very obvious here ... mmm ... Feels like ..



    See if that helps

    Cheers
    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  10. #10
    Join Date
    Jul 2003
    Posts
    78

    Question Re: about DB2 V8.1 Restore and create new database from other database backups

    Thank you for your prompt reply. I know deploy, just my client configuration could not find the another machine's database. So I was thinking to make it up. So what else does deploy do? Thanks a lot.


    Originally posted by sathyaram_s
    My reply is based on the assumption that you are talking about SQL Stored Procedures ...

    You cannot copy the dlls from one machine to another and create stored procs ..

    In the Useful DB2 Stuff Thread on FAQs , there is a link to Deploying Stored Procedures ...

    Am I missing something very obvious here ... mmm ... Feels like ..



    See if that helps

    Cheers
    Sathyaram

  11. #11
    Join Date
    Jul 2003
    Posts
    78

    Question Re: about DB2 V8.1 Restore and create new database from other database backups

    You are right I am talking about stored procedure. So to duplicate a database on another machine, restore from the backup is not enough?

    Thanks a lot.

    Originally posted by sathyaram_s
    My reply is based on the assumption that you are talking about SQL Stored Procedures ...

    You cannot copy the dlls from one machine to another and create stored procs ..

    In the Useful DB2 Stuff Thread on FAQs , there is a link to Deploying Stored Procedures ...

    Am I missing something very obvious here ... mmm ... Feels like ..



    See if that helps

    Cheers
    Sathyaram

  12. #12
    Join Date
    Jul 2003
    Posts
    78

    Question Re: about DB2 V8.1 Restore and create new database from other database backups

    You are right I am talking about stored procedure. So to duplicate a database on another machine, restore from the backup is not enough? Then what else should I do?

    Thanks a lot.


    Originally posted by christine2003
    You are right I am talking about stored procedure. So to duplicate a database on another machine, restore from the backup is not enough?

    Thanks a lot.

  13. #13
    Join Date
    Jul 2003
    Posts
    78

    Wink Re: about DB2 V8.1 Restore and create new database from other database backups

    Just want to let you know, even I tried to copy every single file related to SP to the other machine, it does not work. Only through deploy, luckily it can find the other database now. Thanks a lot for your replies. I really have fun.

    Originally posted by christine2003
    You are right I am talking about stored procedure. So to duplicate a database on another machine, restore from the backup is not enough? Then what else should I do?

    Thanks a lot.

  14. #14
    Join Date
    Oct 2003
    Posts
    1

    Deploy database V8.3

    Hello,

    I have a similar (or the same??) problem when deploying a DB2 V8 database, on Win2K, containing SQL stored procedures... after I create the DB from a backup on the target machine, stored procedure calls are failing with

    [IBM][CLI Driver][DB2/NT] SQL0444N Routine '*C_INTERN' (specific name 'SQL031009154956669' is implemented with code in library or path '...roc\SUCC\DB2ADMIN\P5495669', function 'pgsjmp' which cannot be accessed. Reason code: '4'. SQLSTATE=42724

    I sometimes received a different strange error (also on database created from backup):

    [IBM][CLI Driver][DB2/NT] SQL0302N The value of a host variable in the EXECUTE or OPEN statement is too large for its corresponding use. SQLSTATE=22001.

    The same stored procedures, called with the same parameters, against the same database, containing the same data, are working fine on maschines with Visual C++ installed, the language used to compile the procedures.

    Since the only thing I found related to these errors is a bug on a V8.1 edition, for some stored procedures, containing insert statements, which were working with the 7.2 edition, I downloaded the latest fixpack, but the first error still remains... (the SQL0302N error disappears, however, the SQL0444N still remains).

    I have no ideea what to do, I dropped and recreate the procedures again and again, but there is useless.

    I noticed that the newly deployed database (restored from backup), in the sqlproc directory (something like SQLLIB\FUNCTION\ROUTINE\sqlproc\SUCC\DB2ADMIN) has one .dll file less then on the original maschine... but I tried to copy the file manually, without any result...

    There is any other possibility to deploy a database with SQL stored procedures, on a computer without C++ compiler? I do not know any other ways, and it seems like the restore function might have some problems with these libraries... it has anybody any idea, what to do to make my the stored procedures to work?

    Thanks a lot,
    Andras

Posting Permissions

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