Re: Using a connection opened by another application.
From: William \(Bill\) Vaughn (billvaRemoveThis_at_nwlink.com)
Date: 01/06/05
- Next message: W.G. Ryan eMVP: "Re: Refresh update, select, and insert command parameter lengths in a dataadapter..."
- Previous message: Patrice: "Re: Is TDS used only if server is local?"
- In reply to: ajitgoel_at_gmail.com: "Using a connection opened by another application."
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 6 Jan 2005 10:04:58 -0800
We have established that this is a Sybase rig which works very much like SQL
Server.
Like SQL Server, Sybase databases can be "stopped" and "started" and might
be in the "stop" or "pause" mode when you try to connect. While I don't know
what interfaces Sybase supports, I do know that SQL DMO can start/stop the
server as can calls to Windows Services APIs. In some cases, it makes sense
to stop the server when the last application that needs it shuts down. In
this case, your code needs to figure out the conundrum: how do you know if
another application is loaded that intends to use the server (but might not
have a connection open). In a simple configuration, you can leave the server
running (and consuming resources) waiting for an application to use it.
However, this often makes users buy more RAM and faster systems to
compensate--an expensive solution to a problem that can be solved with a bit
of code (albeit complex).
hth
-- ____________________________________ William (Bill) Vaughn Author, Mentor, Consultant Microsoft MVP www.betav.com Please reply only to the newsgroup so that others can benefit. This posting is provided "AS IS" with no warranties, and confers no rights. __________________________________ <ajitgoel@gmail.com> wrote in message news:1105005001.583138.241870@c13g2000cwb.googlegroups.com... > Hi Everyone; > > I have a application (application 1) which is connected to a sybase > database. I have another application (application 2) which will be > issuing sql commands on the same database. However when I try to open a > connection against the same database, I get the error "Request to > Start/Stop Database denied.". > > What I want to do is: > > a) create and use a database connection, if the database is not > started(either by application 1 or application 2). > b) use the created database connection, if the database is > started(either by application 1 or application 2). > > Pointers to how to go about doing this are welcome. > Kind Regards; > Ajit Goel >
- Next message: W.G. Ryan eMVP: "Re: Refresh update, select, and insert command parameter lengths in a dataadapter..."
- Previous message: Patrice: "Re: Is TDS used only if server is local?"
- In reply to: ajitgoel_at_gmail.com: "Using a connection opened by another application."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|