Sebastião Santos
Sebastião Santos

Reputation: 191

Create start database in multiple db2 instance

I'm using 2 instances of DB2 in one machine.

I need to create an database instance in my new and fresh instance. When using db2.exe, I'm trying to change from one instance to another to manage the database.

But, setting DB2INSTANCE variable in Windows command pronpt do not work, using db2env or db2swtch too.

What can I do to change to another instance so db2.exe can create an startup database ? There's another way to create my startup database ?

Upvotes: 0

Views: 333

Answers (2)

LoneWolf
LoneWolf

Reputation: 16

If you already have your two instances created you can change between the different instances using the "db2 attach to " command. Now any DB2 commands you issue with go against that instance you just attached to. Once you're done, you "db2 detach" to detach from that instance.

Hope that helps.

Upvotes: 0

AngocA
AngocA

Reputation: 7693

You do not have to bother with db2.exe. You just need to load the profile of the new instance. The same db2.exe could be used for different instances.

When using Windows, it is better to open a new windows with the corresponding profile. Just check the db2 clp shortcuts properties to understand all.

Upvotes: 0

Related Questions