0
votes

I want to install DB2 UDW in my machine for learning purpose but I am having a hard time configuring the local instance. Any help would be highly appreciated.

I installed DB2 express edition -c . I have selected all the default choices. I am trying to connect using IBM data Studio 4.1, In the "DB2 first Steps" GUI I have chosen to create SAMPLE Database. I am getting the below error

Creating database "SAMPLE" on path "C:"... Existing "SAMPLE" database found... The "-force" option was not specified... Attempt to create the database "SAMPLE" failed 'db2sampl' processing complete.

I tried connecting from Data Studio using the following options

Database- SAMPLE Port- 50000 host - localhost

Error I am getting

Explanation: An attempt was made to access a database that was not found, has not been started, or does not support transactions. User response: Ensure that the specified database name exists in the system database directory. If the database name does not exist in the system database directory, either the database does not exist or the database name has not been cataloged. If needed, issue a db2start command and then resubmit the current command. SQL4499N A fatal error occurred that resulted in a disconnect from the data source. SQLSTATE: 08004

Problem is I am having zero knowledge in DB2. If I need to run db2start command from where I should run this? Please help

1

1 Answers

0
votes

Probably the instance is not started.

Once you have installed DB2, you need to have an started instance in order to use any database. The instance could be created at the same time of the installation. You can verify which instances exist in your computer by issuing:

/opt/IBM/db2/V10.1/instance/db2ilist

The output should give you a set of users, where an instance has been configured. You can change to that user and start the instance. For example if the user is db2inst1

su - db2inst1
db2start

Once the instance is started, you can now create a database and then connect to it.