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 > Sequences

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-06-09, 01:06
ratheeshknair ratheeshknair is offline
Registered User
 
Join Date: Jan 2009
Posts: 153
Sequences

Hi Experts,

I have two databases and one contain all the sequences and the other contains tables.

Is it possible to insert data into tablesin database2 using the sequence from database1?

TIA
Reply With Quote
  #2 (permalink)  
Old 05-06-09, 02:42
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Different answer: have you considered using DB2's SEQUENCE objects? Have a look at the CREATE SEQUENCE statement.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #3 (permalink)  
Old 05-06-09, 04:05
ratheeshknair ratheeshknair is offline
Registered User
 
Join Date: Jan 2009
Posts: 153
Thanks for the reply stolze...

I have created sequences in Db1 and tables in Db2 ...i want to insert data on to tables in db2 using the sequences in db1.

Is it possible to do that?
Reply With Quote
  #4 (permalink)  
Old 05-06-09, 05:42
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
What do you mean with "created sequences in DB1"? Which version of DB2 are you using on which platform?

In DB2 z/OS, a database is basically just a qualifier for tablespaces (plus some privilege management). Aside from that, you can ignore it. In DB2 LUW, a database represents a fully encapsulated entity for your data and database objects. If you want to do cross-database operations in DB2 LUW, you need federation.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #5 (permalink)  
Old 05-06-09, 07:01
ratheeshknair ratheeshknair is offline
Registered User
 
Join Date: Jan 2009
Posts: 153
Thanks Stolze ,

I mean i have created sequences in the first database.

How to do federation or how can i achieve that?

TIA
Reply With Quote
  #6 (permalink)  
Old 05-06-09, 07:14
ratheeshknair ratheeshknair is offline
Registered User
 
Join Date: Jan 2009
Posts: 153
Can you please tell me how to access an object from databaseA when we are connected to databaseB

TIA
Reply With Quote
  #7 (permalink)  
Old 05-06-09, 08:21
ratheeshknair ratheeshknair is offline
Registered User
 
Join Date: Jan 2009
Posts: 153
Is it possible to query like this

SELECT * FROM DATABASE1.ADMINISTRATOR.CARDT
When I am connected to DATABASE2
Reply With Quote
  #8 (permalink)  
Old 05-06-09, 11:57
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Once you answer the question on the DB2 version and platform, we can tell you whether federation is applicable for you. Regarding federation, have a look at the manuals. This topic has been discussed there and also here in the forum extensively.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #9 (permalink)  
Old 05-07-09, 04:19
ratheeshknair ratheeshknair is offline
Registered User
 
Join Date: Jan 2009
Posts: 153
DB2 Version:9.5c Express
OS Version:Windows XP
Reply With Quote
  #10 (permalink)  
Old 05-07-09, 07:45
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
I don't know if your edition/license entitles you to use DB2's federation feature.

You will find the DB2 manuals here: IBM DB2 9.5 Information Center for Linux, UNIX, and Windows
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #11 (permalink)  
Old 05-07-09, 09:26
Cougar8000 Cougar8000 is offline
Registered User
 
Join Date: Nov 2005
Location: IL
Posts: 554
federation future is not free in Express

IBM DB2 9.5 Information Center for Linux, UNIX, and Windows
__________________
--
IBM Certified DBA on DB2 for Linux, UNIX, and Windows

DB2 v9.1.0.2 os 5.3.0.0
Reply With Quote
  #12 (permalink)  
Old 05-07-09, 12:09
ratheeshknair ratheeshknair is offline
Registered User
 
Join Date: Jan 2009
Posts: 153
Thanks Cougar,


which is the free version available with federation applicable?

What is the price for DB2 versions?

TIA
Reply With Quote
  #13 (permalink)  
Old 05-07-09, 12:29
Cougar8000 Cougar8000 is offline
Registered User
 
Join Date: Nov 2005
Location: IL
Posts: 554
follow the link that I have provided.
__________________
--
IBM Certified DBA on DB2 for Linux, UNIX, and Windows

DB2 v9.1.0.2 os 5.3.0.0
Reply With Quote
  #14 (permalink)  
Old 05-07-09, 14:13
ratheeshknair ratheeshknair is offline
Registered User
 
Join Date: Jan 2009
Posts: 153
I went through the link but I am unable to find any pricing details of DB2 9.5 Express
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