Using dbservername.cmd to initialize a command-prompt environment

Each time that you open a Windows™ command prompt, it acts as an independent environment. Therefore, environment variables that you set within it are valid only for that particular command-prompt instance.

About this task

For example, if you open one command window and set the variable, ONEDB_HOME, and then open another command window and type set to check your environment, you will find that ONEDB_HOME is not set in the new command-prompt session.

The database server installation program creates a batch file that you can use to configure command-prompt utilities, ensuring that your command-prompt environment is initialized correctly each time that you run a command-prompt session. The batch file, dbservername.cmd, is located in %ONEDB_HOME%, and is a plain text file that you can modify with any text editor. If you have more than one database server installed in %ONEDB_HOME%, there will be more than one batch file with the .cmd extension, each bearing the name of the database server with which it is associated.

To run dbservername.cmd from a command prompt, type dbservername or configure a command prompt so that it runs dbservername.cmd automatically at start.