DB2 connect to database connection data error

Source: Internet
Author: User
Tags db2 client db2 connect db2 connect to

Today, the application reported an error. I tried to restart the db2 service and reported an error:
[Db2inst1 @ localhost db2dump] $ db2stop
03/16/2012 14:13:04 0 0 SQL1025N The database manager was not stopped because databases are still active.
SQL1025N The database manager was not stopped because databases are still active.

Then execute force close:
[Db2inst1 @ localhost db2dump] $ db2stop force
03/16/2012 14:14:52 0 0 SQL1064N DB2STOP processing was successful.
SQL1064N DB2STOP processing was successful.
Disabled successfully

Start the database again:
[Db2inst1 @ localhost db2dump] $ db2start
03/16/2012 14:15:00 0 0 SQL1063N DB2START processing was successful.
SQL1063N DB2START processing was successful.

Then an error is reported when you connect to the database:
[Db2inst1 @ localhost db2dump] $ db2
(C) Copyright IBM Corporation 1993,2007
Command Line Processor for DB2 Client 9.7.5

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 => connect to newhis
SQL0752N Connecting to a database is not permitted within a logical unit
Work when the CONNECT type 1 setting is in use. SQLSTATE = 0A001
When you set a class connection, you cannot connect to the database in a logical unit of work.
Explanation:
Issue COMMIT or ROLLBACK
Before the statement, try to connect to another database or the same database. In CONNECT 1
This request cannot be processed in the class environment.
Exit reset execution
Execute again,

[Db2inst1 @ localhost ~] $ Db2 connect reset
[Db2inst1 @ localhost db2dump] $ db2 connect to newhis

 
Database Connection Information

Database server = DB2/LINUX 9.7.5
SQL authorization ID = DB2INST1
Local database alias = NEWHIS

Everything is normal
[Db2inst1 @ localhost db2dump] $ db2
(C) Copyright IBM Corporation 1993,2007
Command Line Processor for DB2 Client 9.7.5

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 => connect to newhis

Database Connection Information

Database server = DB2/LINUX 9.7.5
SQL authorization ID = DB2INST1
Local database alias = NEWHIS



Author longqidong

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.