If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > tape backup & instance creation

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-19-08, 06:32
nittal nittal is offline
Registered User
 
Join Date: Jul 2008
Posts: 131
Question tape backup & instance creation

hi all,
m using db2 v8.1 ESE on windows.
1. what is the use of adding a new instance on server. the defalut instance is db2.now i tried adding a new instance. i created some database in this instance. if i refresh any instance from control center, the databases created in the new instance all comes in the default instance i.e db2 and the newly added instance has nothing in it to display. so my question is, whats the use of adding a new instance?

2. can we take backup of instance itself?

3. i need to take database backups on a tape which is not on the db2 server. how do i do that? i mean, how do i specify the path where the tape actully resides from the server while executing a backup command?
Reply With Quote
  #2 (permalink)  
Old 08-19-08, 06:41
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
I never use cc, but creating instances, allowes you to stop and start a group of db belonging to a same instance
if some specific dbm setting are required ..
many reasons for having multi instances
being in command window
db2ilist - set db2instance=xxx - create db yy will create db below this instance
it can be cataloged in another instance with local instance
tape has to be shared for this machine
I will have a look around and see how others do
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #3 (permalink)  
Old 08-19-08, 06:51
nittal nittal is offline
Registered User
 
Join Date: Jul 2008
Posts: 131
but whats the use of creating an instance when the databases ultimately fall under the default db2 instance
Reply With Quote
  #4 (permalink)  
Old 08-19-08, 06:52
nittal nittal is offline
Registered User
 
Join Date: Jul 2008
Posts: 131
but whats the use of creating an instance when the databases ultimately fall under the default db2 instance?
Reply With Quote
  #5 (permalink)  
Old 08-19-08, 06:55
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
the db is only created in the instance you specify, there is no default instance
what you ask, you will get
in command window check the variable
in cc create the db below the needed instance
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #6 (permalink)  
Old 08-19-08, 07:06
nittal nittal is offline
Registered User
 
Join Date: Jul 2008
Posts: 131
ya this is what i did, i created the db under the instance i wanted to but once u restart the service or even simply refresh the instance, the created database comes under the db2 instance and the newly added instance has nothing in it.
by default i mean the instance which gets created at the time of installating db2
Reply With Quote
  #7 (permalink)  
Old 08-19-08, 07:30
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
so the lesson is : go to command window and take control over your commands instead of having gui doing this and not knowing what you have done..
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #8 (permalink)  
Old 08-19-08, 14:41
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Typically, on Linux and UNIX, DBA's have a different login userid for each instance. So when they login, they are automatically pointing to instance associated with that login id. In fact, the instance name is the same as the login id. When the instance is created, DB2 updates the login profile for that userid to point to that instance.

In Windows, it is a little more complicated since most people don't want to switch user ids to work with a different instance. Changing user id's in Linux/UNIX is much easier. So the default instance is DB2, even though there usually is no userid with that same name.

But you can attach to an instance in Windows before you issue any other commands, and in that case you will now being working within the instance you are attached to. See the attach command in the Command Reference. There is also an attach option in the Control Center if you right click on the instance name.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #9 (permalink)  
Old 08-20-08, 00:53
nittal nittal is offline
Registered User
 
Join Date: Jul 2008
Posts: 131
Hi Marcus,
special thanks for understanding my query....
well i tried working as u said, but things are still not clear. just have a look at what i did.

C:\>db2 get instance

The current database manager instance is: DB2

C:\>db2 attach to del1

Instance server = DB2/NT 8.1.2
Authorization ID = DB2ADMIN
Local instance alias = DEL1

C:\>db2 get instance

The current database manager instance is: DB2

Now why it is again showing me DB2, what is expected is DEL1. so now if i create a database, it is again created in DB2 instance and not DEL1.
Reply With Quote
  #10 (permalink)  
Old 08-20-08, 06:53
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
as indicated before
set db2instance=del1
this will execute all commands in this instance
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #11 (permalink)  
Old 08-25-08, 06:58
nittal nittal is offline
Registered User
 
Join Date: Jul 2008
Posts: 131
but waht i know is, only one instance can remain active at a time...so even if we create 5 instances, only one of these five can remain active and not all five of these can be worked on simultaneouly...so now again the same question mark...!!!
Reply With Quote
  #12 (permalink)  
Old 08-25-08, 09:40
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
this is the case for oracle - not for db2
you can create as many instance as needed with as many db as needed
all can be active at the same time
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On