CMD Run DB2---db21061e the command-line environment is not initialized

Source: Internet
Author: User
Tags db2

Under Windows cmd, you cannot run the DB2 command directly. If you type DB2 directly under CMD, you will get an error, "db21061e not initialized the command-line environment."

The workaround is to type Db2cmd, and then you can type DB2 again.

In fact, a part of the software in the installation of the environment variables to set, but most of the software is automatically add environment variables, for the user is not required additional operations. But there are some that you have to set yourself.

For example, in the installation of JDK, it is necessary to set the environment variables.

and db2,oracle and so on do not need to set their own, we are in the "My Computer----properties----advanced----Environment Variables-----System Variables" can be seen,

Oracle's main bin directory is Oracle_home\ora92\bin, and DB2 's main bin directory is in Db2_home\sqllib\bin.

The difference is that Oracle can run Sqlplus, Sqlldr, and so on directly under CMD, but DB2 must run Db2cmd before it can.

If you want to write the command as a. bat file when running, if you follow Oracle's ideas directly

> Xxx.bat is no good, need

> Db2cmd xxxx.bat That's all I can do.

Otherwise, your DB2 will keep an error.

If you do not want CMD to identify the Db2cmd command, then take the DB2 bin environment variable in path to OK.

CMD Run DB2---db21061e the command-line environment is not initialized

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.