Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

CONNECT statement in DB2 to connect to a local database.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: CONNECT statement in DB2 to connect to a local database.
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    Post subject: Re: CONNECT statement in DB2 to connect to a local database.
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Connect:Direct - RC=000000FF MSG=SVTM... R.Manivannan All Other Mainframe Topics 3 Fri Apr 21, 2017 1:30 am
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts VALIDATE NULL VALUE IN DB2 CASE STATE... useit DB2 5 Thu Feb 09, 2017 4:34 pm
No new posts -913/-911 Deadlock during UPDATE stat... NoSleep319 DB2 5 Fri Nov 18, 2016 12:37 am
No new posts IMS Database backup info ashek15 IMS DB/DC 14 Wed Nov 16, 2016 5:29 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us