Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Query about DSN and DSN less Connection??

 
Bikash Paul
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all friends,
I am confused about DSN connection and DSN less connection concept. Can any one plz tell me In what situation I should use DSN connection and In what situation I should use DSN less connection and what are advantages and Disadvantges one over other and vice versa Or give me some links so that I can take guide from there.
Regards
Bikash
 
Prashanth menon
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure what you mean by DSN less connection.
Basically I think its the driver types that the issue is about.
One of the methods used to connect to database would be a Bridge connection (JDBC-ODBC). Here you would be using a DSN name. You can also use native drivers provided by the database vendor like oci driver of oracle. There can also be pure native drivers. In this case as is Oracle Thin Driver, we communicate directly to the database process. Either way the connection string used in each case may be called as a Data Source.
Prash
 
Bikash Paul
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Prashanth,
I mean DSN less connection when we connect database through driver and using driver,user,password,Data Source and DSN connection means when we connect database through bridge connection(JDBC-ODBC)then we use DSN,user,password.I want to know that Is there any advantages and disadvantages one over other or both connections are same.
Regards
Bikash
 
Prashanth menon
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bikash Paul:
Hi Prashanth,
I mean DSN less connection when we connect database through driver and using driver,user,password,Data Source and DSN connection means when we connect database through bridge connection(JDBC-ODBC)then we use DSN,user,password.I want to know that Is there any advantages and disadvantages one over other or both connections are same.
Regards
Bikash

The driver is always required to communicate to the database. The only quetion is what kind of driver. Yes native drivers are faster than the bridge.
Further if it is thin driver it directly communicates with the DB listener.
Example
Connection conn =
DriverManager.getConnection ("jdbc racle:thin:@machine:1521 bmsname",
"scott", "tiger");
As you can see we directly give the port number and ip address.
But there are some features (in oracle it might not support heavy transactions)
regards
Prash
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic