Topic
3 replies Latest Post - ‏2013-09-28T19:13:05Z by Sreeharsha_Naik
alok.kumar
alok.kumar
3 Posts
ACCEPTED ANSWER

Pinned topic create database hangs on command line

‏2013-09-02T13:36:33Z |

New to db2.

Following the instructions at http://dcon.com.br/db2-cli-install/ to create a database.

I logged in to my machine as db2inst1 user and ran attach to db2int1 which was successful.

I then tried to create a new database and it hangs.

How do I begin to diagnose what the problem is?

Thanks in advance for your help.

 

alok@mylaptop:~$ su - db2inst1
शब्दकूट: 
$ uname -a
Linux cxps044 3.2.0-52-generic #78-Ubuntu SMP Fri Jul 26 16:21:44 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
$ db2
(c) Copyright IBM Corporation 1993,2007
Command Line Processor for DB2 Client 10.5.0
 
You can issue database manager commands and SQL statements from the command 
prompt. For example:
    db2 => connect to sample
    db2 => bind sample.bnd
 
For general help, type: ?.
For command help, type: ? command, where command can be
the first few keywords of a database manager command. For example:
 ? CATALOG DATABASE for help on the CATALOG DATABASE command
 ? CATALOG          for help on all of the CATALOG commands.
 
To exit db2 interactive mode, type QUIT at the command prompt. Outside 
interactive mode, all commands must be prefixed with 'db2'.
To list the current command option settings, type LIST COMMAND OPTIONS.
 
For more detailed help, refer to the Online Reference Manual.
 
db2 => attach to db2inst1
 
   Instance Attachment Information
 
 Instance server        = DB2/LINUXX8664 10.5.0
 Authorization ID       = DB2INST1
 Local instance alias   = DB2INST1
 
db2 => create database mytestdb
 
  • alok.kumar
    alok.kumar
    3 Posts
    ACCEPTED ANSWER

    Re: create database hangs on command line

    ‏2013-09-03T11:52:35Z  in response to alok.kumar

    Well it did get created, as is evident for the output of a later session:

     

     

    $ db2 list applications


    Auth Id Application Appl. Application Id DB # of
    Name Handle Name Agents
    -------- -------------- ---------- -------------------------------------------------------------- -------- -----
    DB2INST1 db2bp 85 *LOCAL.db2inst1.130903105030 MYTESTDB 1 
    DB2INST1 db2bp 86 *LOCAL.db2inst1.130903105031 EIGHTBYT 1 
    DB2INST1 db2bp 99 *LOCAL.db2inst1.130903110149 TUT_DB 1 

     

    However that doesn't explain why the session hanged. Was it just taking longer to execute?

    • alok.kumar
      alok.kumar
      3 Posts
      ACCEPTED ANSWER

      Re: create database hangs on command line

      ‏2013-09-03T13:02:16Z  in response to alok.kumar

      Well it did come out finally. Was just taking time.

       

      
      
      db2 
      => 
      create 
      database 
      mytestd2 automatic storage yes
      DB20000I  The 
      CREATE 
      DATABASE 
      command completed successfully
      .
      db2 
      =>
      
      • Sreeharsha_Naik
        Sreeharsha_Naik
        34 Posts
        ACCEPTED ANSWER

        Re: create database hangs on command line

        ‏2013-09-28T19:13:05Z  in response to alok.kumar

        I have always tried to wonder why it takes so much time. Looks like the problem is with Unix as well. I have faced this on windows. After a while it would either create or throw an error message stating - userID xyz does not have the authority to create the DB.

        Glad that your patience paid off !