Topic
  • 3 replies
  • Latest Post - ‏2009-12-29T08:58:18Z by sakumar9
SystemAdmin
SystemAdmin
17917 Posts

Pinned topic db2exc fails after reinstalling with apt-get

‏2009-09-26T07:57:23Z |

Outline

Is it normal, that after removing db2exc (apt-get purge), I still have 371 files left, and two lines about db2 in /etc/services. And is that a problem when I install db2exc again.

Background:

Im using Ubuntu 8.10 (Intrepid Ibex).
I installed db2exc by adding to /etc/apt/sources.list:
deb http://archive.canonical.com/ubuntu hardy partner
deb-src http://archive.canonical.com/ubuntu hardy partner

$sudo aptitude update
$sudo aptitude install db2exc

All was good, untill db2cc started showing a window that was just gray. I was recommended, by fellow students, to reinstall, so I did:

$sudo purge db2exc
$sudo aptitude install db2exc

Now I was at first not able to start db2ce (or any db2*) by typing it anywhere, since some symlinks was missing. But I managed to fix that. I entered db2cc, everything seemed good again.

But I could not work with anything. Unfortunately I have not written down the error messages, but I got the impression that I had to instances of db2 running. I could not create a new database, and I could not choose any existing, neither in db2 (the command line tool) or in db2cc.

Here is a list of db2 processes:

$ ps -e -o comm,stat  | grep db2 db2syscr        Sl db2sysc         Sl db2syscr        S db2syscr        S db2syscr        S db2fmp          Sl


These are the services listed containing db2:

$ cat /etc/services | grep db2 db2c_db2inst1         50000/tcp db2c_db2inst2         50001/tcp DB2_db2inst2          60000/tcp DB2_db2inst2_1      60001/tcp DB2_db2inst2_2      60002/tcp DB2_db2inst2_END    60003/tcp


Right now

I uninstalled db2exc again
$ sudo purge db2exc

And now I have no db2 processes running ("$ ps -e | grep db2" yields nothing).

But still:

$ cat /etc/services | grep db2 db2c_db2inst1         50000/tcp db2c_db2inst2         50001/tcp


Is it an error that these two lines were not removed?

And "locate db2", still yields 371 files. Many of them distributed in these:
/home/db2inst1/
/home/db2inst2/
/home/db2fenc1/
/home/db2fenc2/

Is it an error that these files were not removed?

How to fix it

What should I do now?

My best guess is to manually delete these files (of course carefulle making sure that they dont seem to belong to other apps), and manually delete these two lines in /etc/services.

But I really dont know, and I am afraid to mess things up further.

Sincerely, Thomas
Updated on 2009-12-29T08:58:18Z at 2009-12-29T08:58:18Z by sakumar9
  • SystemAdmin
    SystemAdmin
    17917 Posts

    Re: db2exc fails after reinstalling with apt-get

    ‏2009-09-26T22:18:48Z  
    Ok, left with no better choice, I manually deleted every sign of db2. And I installed it over again using aptitude.

    This time I noted something different from last time.
    
    * Checking 
    
    for previous DB2 installations...                            [ OK ] *      No DB2 installation(s) found * Checking 
    
    for existing DB2 instance data...                            [ OK ] *  No DB2 instances found.
    


    Last time, it did find some "existing DB2 instance data".

    However, it did not solve the problem. db2ce (and all the other db2*, I think) starts with no problems. But:

    db2ce - Add

    When I press "Add" (database) in db2ce, I get:

    
    SQL1031N  The database directory cannot be found on the indicated file system.   Explanation:   The system database directory or local database directory could not be found. A database has not been created or it was not cataloged correctly.   The command cannot be processed.   User response:       Verify that the database is created with the correct path specification. The Catalog Database command has a path parameter which specifies the directory where the database resides.   sqlcode: -1031   sqlstate: 58031
    

    db2ce - CREATE DATABASE FOO;

    When I execute this command, I get an error:
    
    ------------------------------ Commands Entered ------------------------------ create database foo; ------------------------------------------------------------------------------ SQL1042C  An unexpected system error occurred.   Explanation:   A system error occurred. Some possible reasons 
    
    for 
    
    this error are: *  The database manager is not installed correctly or the environment is not set up correctly. *  On UNIX-based systems, db2iupdt may need to be run in order to update the DB2 instance to enable acquisition of a 
    
    new system configuration or access to function associated with the installation or removal of certain product options, FixPaks, or modification levels.   The command cannot be processed.   User response:     *  To update the instance to acquire a configuration or access to function run DB2IUPDT <InstName>. *  If the error occurred 
    
    while trying to connect to a database, get a trace (instructions below) and call IBM support.   If the problem falls outside of the above suggestions, ensure that the system time and date is correctly set, and make sure your system has enough memory and swapping/paging space available.   Resubmit the current command.   If the error continues, stop the database manager and restart it.   If the error still continues, reinstall the database manager.   If trace was active, invoke the Independent Trace Facility at the operating system command prompt. Contact your technical service representative with the following information:   Required information: *  Problem description *  SQLCODE or message number *  SQLCA contents 
    
    if possible *  Trace file 
    
    if possible.   Federated system users: 
    
    if necessary isolate the problem to the data source rejecting the request (see the Troubleshooting Guide 
    
    for procedures to follow to identify the failing data source). If the problem is with a data source follow the problem determination procedures 
    
    for that data source.   sqlcode: -1042   sqlstate: 58004
    


    db2 CLP - CREATE DATABASE FOO;

    I can open db2 CLP, but when I try to...

    
    db2 => create database bar; SQL1001N  
    "bar;" is not a valid database name.  SQLSTATE=2E000
    

    I've tried googling for the errors, but I could not work it out.
  • sgarbo
    sgarbo
    1 Post

    Re: db2exc fails after reinstalling with apt-get

    ‏2009-12-20T21:24:52Z  
    Ok, left with no better choice, I manually deleted every sign of db2. And I installed it over again using aptitude.

    This time I noted something different from last time.
    <pre class="jive-pre"> * Checking for previous DB2 installations... [ OK ] * No DB2 installation(s) found * Checking for existing DB2 instance data... [ OK ] * No DB2 instances found. </pre>

    Last time, it did find some "existing DB2 instance data".

    However, it did not solve the problem. db2ce (and all the other db2*, I think) starts with no problems. But:

    db2ce - Add

    When I press "Add" (database) in db2ce, I get:

    <pre class="jive-pre"> SQL1031N The database directory cannot be found on the indicated file system. Explanation: The system database directory or local database directory could not be found. A database has not been created or it was not cataloged correctly. The command cannot be processed. User response: Verify that the database is created with the correct path specification. The Catalog Database command has a path parameter which specifies the directory where the database resides. sqlcode: -1031 sqlstate: 58031 </pre>

    db2ce - CREATE DATABASE FOO;

    When I execute this command, I get an error:
    <pre class="jive-pre"> ------------------------------ Commands Entered ------------------------------ create database foo; ------------------------------------------------------------------------------ SQL1042C An unexpected system error occurred. Explanation: A system error occurred. Some possible reasons for this error are: * The database manager is not installed correctly or the environment is not set up correctly. * On UNIX-based systems, db2iupdt may need to be run in order to update the DB2 instance to enable acquisition of a new system configuration or access to function associated with the installation or removal of certain product options, FixPaks, or modification levels. The command cannot be processed. User response: * To update the instance to acquire a configuration or access to function run DB2IUPDT <InstName>. * If the error occurred while trying to connect to a database, get a trace (instructions below) and call IBM support. If the problem falls outside of the above suggestions, ensure that the system time and date is correctly set, and make sure your system has enough memory and swapping/paging space available. Resubmit the current command. If the error continues, stop the database manager and restart it. If the error still continues, reinstall the database manager. If trace was active, invoke the Independent Trace Facility at the operating system command prompt. Contact your technical service representative with the following information: Required information: * Problem description * SQLCODE or message number * SQLCA contents if possible * Trace file if possible. Federated system users: if necessary isolate the problem to the data source rejecting the request (see the Troubleshooting Guide for procedures to follow to identify the failing data source). If the problem is with a data source follow the problem determination procedures for that data source. sqlcode: -1042 sqlstate: 58004 </pre>

    db2 CLP - CREATE DATABASE FOO;

    I can open db2 CLP, but when I try to...

    <pre class="jive-pre"> db2 => create database bar; SQL1001N "bar;" is not a valid database name. SQLSTATE=2E000 </pre>
    I've tried googling for the errors, but I could not work it out.
    I get the exact same problem (SQL1042C: An unexpected system error occurred) as "velle" when trying to create a database from within db2cc. I would love to know how to resolve it.
  • sakumar9
    sakumar9
    79 Posts

    Re: db2exc fails after reinstalling with apt-get

    ‏2009-12-29T08:58:18Z  
    • sgarbo
    • ‏2009-12-20T21:24:52Z
    I get the exact same problem (SQL1042C: An unexpected system error occurred) as "velle" when trying to create a database from within db2cc. I would love to know how to resolve it.
    Drop and recreate the instance. You can catalog existing databases if needed.

    BTW, "bar;" cannot be used as the database name. Remove the semicolon(;) from end of line.