Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Having trouble creating database

Status
Not open for further replies.

SantaMufasa

Technical User
Jul 17, 2003
12,588
US
I'm following our shop's accepted protocols for creating a new database on a newly created DB2 9.1 instance. I issue the following command:
Code:
mkdir /dbsrv/db2/data1/db2v91/recert1
db2 "create database recert1 on '/dbsrv/db2/data1/db2v91/recert1' collate using identity
   catalog tablespace
     managed by system using ('/dbsrv/db2/data1/db2v91/recert1') 
     extentsize 64 prefetchsize 32
   user tablespace
     managed by system using ('/dbsrv/db2/data1/db2v91/recert1')
     extentsize 64 prefetchsize 64
   temporary tablespace
     managed by system using ('/dbsrv/db2/data1/db2v91/recert1')
with 'recert1 database'"
db2 terminate
The response was...
Code:
SQL0298N  Bad container path.  SQLSTATE=428B2
Can you see what I did wrong?

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
Good Morning,

just to make sure:

you did create the directory

/dbsrv/db2/data1/db2v91/recert1

before issuing the create database command, didn't you ?

And do all the directories and subdirectories have the necessary rights (DB User needs read/write permissions) ?

Regards
Thomas
 
Thomas, Thanks for your response.

I confirmed that the "/dbsrv/db2/data1/db2v91/recert1" directory exists, it has "rwxrwxrwx" (777) full-access privileges, and my DB2 v9.1 database owner also owns that directory. I re-ran the same command, and, unfortunately, the same error resulted:
Code:
SQL0298N  Bad container path.  SQLSTATE=428B2
What would you recommend that I look for next?

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
Hello Mufasa,

here's something else from an official IBM site you might check out:

Bad container path.
Explanation:

The container path violates one of the following requirements:

* Container paths must be valid fully-qualified absolute paths or valid relative paths. The latter are interpreted relative to the database directory.
* For EXTEND, REDUCE, RESIZE and DROP operations, the specified container path must exist.
* The path must be read/write accessible to the instance id (check file permissions on UNIX-based systems).
* Containers must be of the type specified in the command (directory, file or device).
* Containers (directories) in system managed table spaces must be empty when designated as containers and must not be nested underneath other containers.
* The containers for one database must not be located underneath the directory of another database, and they may not be underneath any directory that appears to be for another database. This rules out any directory of the form SQLnnnnn, where 'n' is any digit.
* The container must be within the file size limit for the operating system.
* Containers (files) for dropped database managed table spaces can only be reused as containers (directories) for system managed table spaces after all agents terminate and vice versa.
* During a redirected restore, an SMS container was specified for a DMS table space or a DMS container was specified for an SMS table space.
* The specified type of the container for an EXTEND, REDUCE, RESIZE, or DROP operation does not match the type of the container (FILE or DEVICE) that was specified when the container was created.

This message will also be returned if any other unexpected error occurred which prevents DB2 from accessing the container.
User Response:

Specify another container location or change the container to make it acceptable to DB2 (such as changing file permissions) and try again.

Regards
Thomas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top