IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

CONNECT statement in DB2 to connect to a local database.


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
red_roses

New User


Joined: 31 Oct 2005
Posts: 27

PostPosted: Mon Sep 18, 2006 10:21 pm
Reply with quote

I know that CONNECT is used to connect to a Databse on a remote server.
Can i use CONNECT to connect to a database that is on the same server as the executing process.

I.e. If i use a CONNECT statement to access tables that are a part of the Db2 database on the mainframe. will be execute successfully or fail?

if it executes successfully then what would be the performance considerations? (I am thinking on the lines that since it is not really necessary to execute this statement but i would anyways)
Back to top
View user's profile Send private message
anamikak

New User


Joined: 10 May 2006
Posts: 64
Location: Singapore

PostPosted: Tue Sep 19, 2006 9:07 am
Reply with quote

you can use the connect statement to connect to the same server as your application process is running in without encountering an error. When you issue connect statement, the cuurent server special register is set to the name of the server you are trying to connect. So when you connect to the same application server, Db2 checks and finds that the server name has not changed and contues executing normally. I do not think there is any performance considerations associated with this, excepting that there can be only one server to which your application process can be connected at a time.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Connect Direct 6.3 for Z/OS All Other Mainframe Topics 20
No new posts What database does Jobtrac use CA Products 4
No new posts Capturing COBOL job and program names... All Other Mainframe Topics 2
No new posts JOIN STATEMENT PERFORMANCE. DFSORT/ICETOOL 12
No new posts Products/Tools to Optimize Adabas Dat... Compuware & Other Tools 2
Search our Forums:

Back to Top