Outbound SQL Connections
Aug 16, 2007
Hello Everyone,
I have two SQL 2005 clusters, one at a Corporate HQ and another at a hosting site. On each cluster there are several SQL instances each tied to a seperate Cluster Group meaning that there is a virtual cluster IP address assigned to the cluster group which should translate to the instance.
The issue that I am seeing is that in the connection manager, the IP addresses aren't listed correctly and there is sometimes just junk in there -- up to 10 IP addresses listed. There are many replication and service broker jobs running between the clusters all tied to specific IP addresses and ports which map to NAT and ACLs on the firewalls.
Here is the crux of it: While I can change the listening port and IP in the connection manager, how to I ensure that the outbound replication traffic is coming from the right source? If I add the correct IP address into the connection manager for the instance and disable the others, will it send from that IP address?
I have inherited this system and we are making the first strides into intagling this mess, but I am trying to surgically fix this rather than opening up all kinds of security holes in the interim.
Suggestions?
Ryan
View 1 Replies
ADVERTISEMENT
Jul 18, 2007
Hi
I've implemented an SQL-CLR stored procedure which makes an HTTP connection using the WebClient class to a server where the processing on the web server takes 10 seconds.
If I fire off a bunch of requests to the stored procedure, e.g. 80 in 1 second I noticed that SQL Server 2005 (Express Edition) only allows 2 concurrent network connections at a time.
I can confirm this by looking at the timing of the results when they come back, basically I get 2 results every 10 seconds and by doing a 'netstat -a' on the web server I notice that there are never more than 2 HTTP connections from the SQL Server at a time.
Is this some sort of sheduling policy in terms of the number of concurrent external network accesses allowed by CLR objects running in SQL Server? Or some side effect of the way the WebClient class blocks in terms of waiting for a network response?
I was expecting all 80 of the requests to block waiting on a network response almost immediately and then for all 80 of them to pretty much complete and return 10-11 seconds later.
[Microsoft.SqlServer.Server.SqlProcedure]
public static int CreditAuthorisation(string Name, decimal Amount)
{
WebClient client = new WebClient();
string result = client.DownloadString("http://someserver/Test.aspx");
return int.Parse(result);
}
Cheers
View 4 Replies
View Related
Jan 11, 2008
I'm using a SQL-2005 DB to manage TFS Build Information. I need to create a SOAP web service call in response to an INSERT in the Builds table.
I am, however, thoroughly confused about the most efficient way to do this. The best I can come up with is to create a CLR function that takes the build number from the DB Insert statement, creates the XML and sends the msg to my already published (and already being used) WebService. The CLR function would be called in a trigger set of by the insert.
I don't suppose there is a native way to generate outbound SOAP msgs based upon DML events?
View 3 Replies
View Related
Feb 10, 2006
When you begin a dialog, you do so between source and target. A conversation is begun on both source and target, and messages flow between the two. What would cause messages to build up on the source in sys.transmission_queue and not get transmitted to the target, with no error in the transmission_status column of sys.transmission_queues? The dialogs on the source have a state of 'co', indicating that messages should be flowing....
I checked the status of the queue I am having a problem with in sys.service_queues; all my queues have the is_receive_enabled and is_enqueue_enabled set to 1. I altered the state of the endpoint on each server to started, even though they were already started. I visited remus's blog and went down the checklist of things to look for when troubleshooting dialogs.
I attached the profiler to both source and target. Didnt see anything on the source to indicate an error (textdata simply said conversing for EventClass Broker:Conversation, and nothing for EventClass Broker:MessageClassify)
On the target I see stuff related to service broker, but no errors.
I created new dialogs between the source and the target and they are working fine.
What else do I need to check? Is there any way to see what sender conversation maps to which target conversation? Is there anyway to move messages from one conversation to another conversation (not to another conversation group)?
Thanks
View 5 Replies
View Related
May 17, 2005
Hi there,
Here we have got a
asp.net application that was developed when database was
sitting on SQL server 6.5. Now client has moved all of their databases
to SQL server 2000. When the database was on 6.5 the previous
development team has used oledb connections all over. As the databases
have been moved to SQL server 2000 now i am in process of changing the
database connection part. As part of the process i have a login
authorization code.
Private Function Authenticate(ByVal username As String, ByVal password As String, ByRef results As NorisSetupLib.AuthorizationResult) As Boolean
Dim conn As IDbConnection = GetConnection()
Try
Dim cmd As IDbCommand = conn.CreateCommand()
Dim sql As String = "EDSConfirmUpdate" '"EDSConfirmUpdate""PswdConfirmation"
'Dim cmd As SqlCommand = New SqlCommand("sql", conn)
cmd.CommandText = sql
cmd.CommandType = CommandType.StoredProcedure
NorisHelpers.DBHelpers.AddParam(cmd, "@logon", username)
NorisHelpers.DBHelpers.AddParam(cmd, "@password", password)
conn.Open()
'Get string for return values
Dim ReturnValue As String = cmd.ExecuteScalar.ToString
'Split string into array
Dim Values() As String = ReturnValue.Split(";~".ToCharArray)
'If the return code is CONTINUE, all is well. Otherwise, collect the
'reason why the result failed and let the user know
If Values(0) = "CONTINUE" Then
Return True
Else
results.Result = Values(0)
'Make sure there is a message being returned
If Values.Length > 1 Then
results.Message = Values(2)
End If
Return False
End If
Catch ex As Exception
Throw ex
Finally
If (Not conn Is Nothing AndAlso conn.State = ConnectionState.Open) Then
conn.Close()
End If
End Try
End Function
''' -----------------------------------------------------------------------------
''' <summary>
''' Getting the Connection from the config file
''' </summary>
''' <returns>A connection object</returns>
''' <remarks>
''' This is the same for all of the data classes.
''' Reads a specific
connection string from the web.config file for the service, creates a
connection object and returns it as an IDbConnection.
''' </remarks>
''' -----------------------------------------------------------------------------
Private Function GetConnection() As IDbConnection
'Dim conn As IDbConnection = New System.Data.OleDb.OleDbConnection
Dim conn As IDbConnection = New System.Data.SqlClient.SqlConnection
conn.ConnectionString = NorisHelpers.DBHelpers.GetConnectionString(NorisHelpers.DBHelpers.COMMON)
Return conn
End Function
in the above GetConnection() method i
have commented out the .net dataprovider for oledb and changed it to
.net dataprovider for SQLconnection. this function works fine. But in
the authenticate method above at the line
Dim ReturnValue As String = cmd.ExecuteScalar.ToString
for some reason its throwing the below error.
Run-time exception thrown : System.Data.SqlClient.SqlException - @password is not a parameter for procedure EDSConfirmUpdate.
If i comment out the
Dim conn As IDbConnection = New System.Data.SqlClient.SqlConnection
and uncomment the .net oledb provider,
Dim conn As IDbConnection = New System.Data.OleDb.OleDbConnection
then it works fine.
I also have changed the webconfig file as below.
<!--<add
key="Common" value='User ID=**secret**;pwd=**secret**;Data
Source="ESMALLDB2K";Initial Catalog=cj_common;Auto
Translate=True;Persist Security Info=False;Provider="SQLOLEDB.1";'
/>-->
<add key="Common" value='User ID=**secret**;pwd=**secret**;Data Source="ESMALLDB2K";Initial Catalog=cj_common;' />
Please help. Thanks in advance.
View 4 Replies
View Related
Jul 20, 2005
Just a quick question about connection management. My application willnever need more than 1 or 2 connections about at any given time. Also, I donot expect many users to be connected at any given time. For efficiency, Iwould like to keep connections alive throughout the lifetime of the objectsrequiring them, rather than opening a new connection, executing code andthen closing it again. What is the most efficient way of doing this?Should I perform the open/close or just one open when I create the objectand a close when I dispose of it?
View 1 Replies
View Related
Dec 27, 2007
Hi I have some simple questions of for MS SQL. Say I have a database with a table Called Company. In this table I have Employee's with these columns(EmployeeID<PK>, FirstName, LastName) Now I am inserting some data like this.EmployeeID FirstName, LastName------------------------------------------------------- 1 Bob Smith2 Joe Mitter Now Say I have this situation(this will look weird for this example but for another examples and the stuff I am working on it make sense). Say I have a new Employee Called Jessica White. Jessica must be the second record. So I need to insert it between the 1st and 2nd record. Like I said I am very noob at doing this stuff so I am not sure how I would do it. I first was going to my table and then went to modify. This brought up a blank grid with all my column names. I then started to add all my data in. I found out later to make my life easier I need to enter in certain spots null rows in it to help with formating(otherwise I would have had to figure out a way to do make null rows with c# code). I then went back to this grid and I tried to add a record before the data just like you if you used excel. I quickly found out you can not do that. This resulted me having to recreate the table and reput the all the data back in(this told me I was doing something very very wrong). I was then thinking of writing it with a query and I been playing around with it and still running into problems like say I had a table called test with a coloum called id<PK> and testss(yes bad names just playing around though).So if I did something like this:INSERT INTO testVALUES(2)INSERT INTO testVALUES(1)SELECT * FROM testNow I am trying to figure out how to insert something between rows 1 and 2. Would I have to drop the table or delete all the data and then run a saved copy of my script with the added change or what?My second question is what is a good site that has examples of all the commands(I don't want to read a book on it I have had a oracle sql course and well it was just boring and I did not learn too much.). I think the best way for me to learn is just continue doing my site and picking it up on the file and when I got a problem read about it and ask on the forums. Thanks
View 11 Replies
View Related
Jul 13, 2001
Very strange event. Installed new machine into NT 4 network, which has a PDC and a BDC. We have copies of all SQL databases on both the PDC and the BDC. I installed SQL 7 on new workstation. Throught Control Panel/ODBC connections I can reach the SQL files on bith the PDC and BDC. Howver when I try to use Enterprise Manager, I can connect to the tables on the PDC, but not the BDC. SQL lists both machines in the server group, but only allows me to access tables on PDC! Here is the Event information that I recived on the BDC:
The computer IVR1 tried to connect to the server NTBACKUPSERVER using the trust relationship established by the MASSCOM domain. However, the computer lost the correct security identifier (SID) when the domain was reconfigured.
How do I fix this?
View 2 Replies
View Related
Apr 14, 2000
HI all,
I have a problem here. I am having two computers both are loaded windows NT 4.0 AND SERVICE PACK 4 AND ALSO I INSTALLED SQL SERVER 7.0.
Now i want to connect those two servers , so pls anyone suggest me how i have to do.I connected both servers thru HUB.
Pls suggest me..
thank u..
--ram
View 1 Replies
View Related
Oct 9, 1998
I figure anyone who has done VB and SQL Server might have run into this.
>
> I am set up as a DBO on SQL Server with access to db1 and db2. My default
> is set to db2. From my local machine, I can log through VB(DSN-less) in
> to
> either one without a problem. BUT, if I go to another machine and try to
> log in through VB(DSN-less) to db1, it rejects my login. Here is my
> connect
> string :
>
> UID=xxxxxxx;PWD=pedro;DATABASE=db2;DRIVER={SQL
> Server};SERVER=Athens;DSN=``;
>
> The only thing that changes when I log into db1 is the database parameter-
> "DATABASE=db1".
>
> Am I doing something wrong here? Is there something that needs to be
> setup
> differently in SQL Server? Do I need to put something else into the
> connect
> string?
>
> This happens for the other developers as well, not just me.
>
> Any help would be GREATLY appreciated.
View 2 Replies
View Related
Apr 12, 2001
I am looking for some ideas on the following DTS challenge: I need to import the data from an Access 97 database into a set of tables(about 25). The location of the database can be anywhere on the users drive(s) and I will need to get the location of the database from a registry setting and use it to define the connection.
Thanks
View 1 Replies
View Related
Jun 11, 2004
We have a case where a user is using Excel sheet to connect the database on SQL2K and generally his connection runs in the upper 150 in numbers. He generally gets more than 150 connections open.
I know that it's not a good thing, but is there a way to limit it or even kill it after it reaches max?
What are the disadvantages of opening too many connections?
View 1 Replies
View Related
Sep 7, 2006
I'm getting the classic message "The timeout period elapsed prior to obtaining a connection from the pool" etc when connecting to my SQL Server 2005 Express from a .Net application.
Then I try connecting, simultaneously, from a simple ASP.net thing I wrote just for testing and this works fine. So, then the connection pool can't be full, can it? Or, does each application have its own pool??
View 6 Replies
View Related
Apr 16, 2004
Ok, yeah, I'm being lazy...
Any comments?
View 8 Replies
View Related
Feb 9, 2006
Hi
I have heard that SQL Server can support upto 10,000 users,
What if my application , connects to the sql & does not do antything then , why does the SQL server slow down with just 700 users.
I mean just the connection is established & NOTHING further is done.
Thanks
View 6 Replies
View Related
Nov 29, 2007
hi,
have been looking for ages for somewhere that might be able to answer my question so thought i'd try here.
anyhows, my place of work have goldmine 6.7 running on a server. the problem is that some of the client machines seem to be taking 2 connections to the server when logged into goldmine and some only 1.
when looking at the open sessions it shows a second for some users accessing pipesqlquery. all users show this but only some show it as a second connection.
please any ideas
View 5 Replies
View Related
Dec 21, 2007
Is there any type of performance gain to using DSN connections? Or any real advantage to using them over DSN-Less connections?
--
If I get used to envying others...
Those things about my self I pride will slowly fade away.
-Stellvia
View 5 Replies
View Related
Jul 23, 2005
As most of you are aware, when you close a VB.NET connectrion to a SQLserver, the connection doesn't actually drop right then and there.From my tests, using VB.NET 2003 and SQL2K, the connection doesn'ttimeout and drop off for 6 1/2 minutes. How can one force thisconnection to immediately drop off with code?
View 12 Replies
View Related
Oct 25, 2005
HiI am a dba for sql server recently we are facing problems with the no ofconnections.we have a database called ( x ) every day almost million users is using thatdatabse after some time the cpu showing 100 percent utilization an errorthrowing like odbc error connection so in that case no one is able to connectto the server.when we pause it then restart the server for some time it looksgood then again it will go to 100 % utilization.but there is no blockingoccuringif anyone knows this problem please helpyour help would be appreciated.Thanks--Message posted via SQLMonster.comhttp://www.sqlmonster.com/Uwe/Forum...eneral/200510/1
View 4 Replies
View Related
Dec 26, 2006
Hi I would like to know about connections of sa, where SQL store thenumber of connections
View 1 Replies
View Related
Mar 28, 2007
im writing a service that will be on a app serverthis is one of many service's to process Recordsets from Sql Server...1 service may have 20 Processes to Completeexamplemain class PreProcess()method CleanNames();method updateNames();methodr ValidateContracts();Various things must be completedSuedo Example belowMy question isin the main class make my connection and keep it for all sub membersor connect in each memberA. This Way opens connection...closes connectmethod cleanNames()1 get connection2 get recordset3. Close Connection4 process Recordset5. Open Connection4 Commit Changes6. Close Connection()finished cleanames()ormethod cleanNames()1 get connection2 get recordset3 process Recordset4 Commit Changes5. Close Connection()finished cleanames()orthis final way is in the parent Class or Calling Functionsends in the connections holds it open till the service iscompleted of all jobs its Suppose to dothen releases the connectionmethod cleanNames(oconn) connection as parameter1 get recordset2 process Recordset3 Commit Changesfinished cleanames()ThanksDaveP
View 1 Replies
View Related
Jul 7, 2007
I have a c# winapp and use SqlHelper to CRUD operation wint an sql server 2005 database, every time mi data access layer opens an connections, I do Close() and Dispose() after the transaction, and I execute SP_WHO and the database server shows me that my winapp has generated a lot of connections, I dont understand why since i clean every connection, Also, I m not using pooling since my connection string. Has someone has faced this before??
Best Regards
Joseph
View 5 Replies
View Related
Jan 29, 2007
I have .net 2.0 framework and SQL V 8.0 on my web server.
I am trying to create a DSN and I am not given the OLEDB provider for SQL as an option for my list of providers. Is there a download that will add this ? What do I do to get it????
View 3 Replies
View Related
May 5, 2006
Hi everybody,
I need a little help...
I created several packages, that after their creation should not be changed again; that's why I created a Package Configuration File in which I set all the Connections I need, so that this is the only file I have to modify.
I set there also the path of the connections for my log file and for my error files (which are both text files), but if I change their paths in the configuration file this change doesn't affect the package, and the path of the log remains the same.
That's an image of one of those packages....
The fact is that I cannot change the ConnectionString of the connection called "log_pkg", but it always remains the same...
How can I resolve this problem??
Thanks everyone
View 1 Replies
View Related
Mar 14, 2007
Hello,
This might not be the right forum, but I'll go ahead and ask anyways -
How does SQL server's per seat/user licensing work ? What I'm hoping to find out is that - if some one has procured a 2 user/seat license - will the number of connections that the two users are allowed to open be limited to 2 ?
Or can the two users open any number (reasonable number) of connections ? I'm asking this in the context of the possibility of having multiple connections service our desktop application. Or am I tied to having a maximum of one connection per client/user by virtue of the licensing restrictions ?
Thanks,
Avinash
View 3 Replies
View Related
Jan 13, 2007
Forgive me if this is the wrong forum, but it does have to do with data access. Just a quick question: When using an ADO Component /Object to connect to a database, C# or whatever, that connection that is established - How likely is it that data being retrieved from the database is intercepted, is that channel encrypted/secured, and if not for either questions, how do i secure that channel?
View 1 Replies
View Related
Aug 22, 2006
HiI have written the following function public System.Data.SqlClient.SqlDataReader ExcuteReader(string strQuery, string strConnection) { System.Data.SqlClient.SqlCommand myCommand; System.Data.SqlClient.SqlDataReader myReader; myCommand = new System.Data.SqlClient.SqlCommand(strQuery, new System.Data.SqlClient.SqlConnection(strConnection)); myCommand.Connection.Open(); myReader = myCommand.ExecuteReader(); return myReader; }to return a datareader for me but right now I am facing the problem that it seems this function isn't closing the connection by itself which is resulting in an error saying "Timeout expired. The timeout period elapsed prior to
obtaining a connection from the pool. This may have occurred because
all pooled connections were in use and max pool size was reached" and if I close it manually I will lose the data in the readerso are there any suggestions of what I should do?thank you
View 4 Replies
View Related
Mar 7, 2007
I am getting an error like this
View 5 Replies
View Related
Aug 7, 2007
Hi.
We have developed as quite simple ASP.Net webpage that fetches a number of information from a SQL 2005 database. We are having some problems though, becuase of a firewall that is beetween the webserver and the SQL server, and I think this is because of bad code from my part. I'm not that experiensed yet, so I'm sure that there is much to learn.
Usualy when I do a query against a SQL database, I do something like this:
Function GO_FormatRecordBy(ByVal intRecordBy As Integer) Dim dbQueryString As String Dim dbCommand As OleDbCommand Dim dbQueryResult As OleDbDataReader dbQueryString = "SELECT Name FROM tblRegistrators WHERE tblRegistratorsID = '" & intRecordBy & "'" dbCommand = New OleDbCommand(dbQueryString, dbConn) dbConn.Open() dbQueryResult = dbCommand.ExecuteReader(CommandBehavior.CloseConnection) dbQueryResult.Read() dbConn.Close() dbCommand = Nothing Return dbQueryResult("Name") End Function
Now, lets say that I have a DataList that I populate with Integer values, and I want to "resolve" the from another table, then i do a function like the one above. I guess that this means that I open and close quite alot of connections against the database server when I have a large tabel. Is there any better way of doing this? Chould one open a database connection globaly in lets say the ASA fil? Whould that be a better aproch?
When I added the CommandBehavior.CloseConnection to the ExecuteReader statment, I noticed that it was a bit faster, and I think there was fewer connections in the database, so maby there is more to the "closing connections" then I usualy do.
Any tips on this?
Best reagrds,Johan Christensson
View 6 Replies
View Related
Jan 13, 2008
Hi all, In a select sql statement, I have to query 2 databases from 2 different servers. The only way I found to do this, is to call OPENDATASOURCE like this :<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:bdConnectionString1 %>" SelectCommand="SELECT * FROM [Table1] t1 left join OPENDATASOURCE('SQLOLEDB','Data Source=servername;Initial Catalog=xxx;Persist Security Info=True;User ID=xxx;Password=xxx').dbname.dbo.table2 t2 on t1.id = t2.id"> </asp:SqlDataSource>My question is the following :Is there a way to connect to the second server without using the full server declaration into the sql statement ? For information, the server connection is already declare into my web.config like that :<add name="bdConnectionString2" connectionString="Data Source=servername;Initial Catalog=xxx;Persist Security Info=True;User ID=xxx;Password=xxx" providerName="System.Data.SqlClient" />so is there a way to use 'bdConnectionString2' directly ?If not, is there a way to connect to the second server without entering informations like User ID and Password ? My problem being that I'm not sure it's safe to send this informations directly from the asp.net page. Thank you
View 4 Replies
View Related
Feb 20, 2004
Hi, can anyone tell me whats the maximum number of connections you can have to MSDE? Eg, is it enough to host an intranet site for a relativly small business?
View 2 Replies
View Related
Mar 16, 2004
Hey,
MSDE 2000 allows 25 concurrent connections.
If these are all used up, and a 26th connection comes in. What happens? is the connection rejected? or does it sit in a queue, waiting to be given a connection?
Thanks,
-Ashleigh
View 2 Replies
View Related
Apr 27, 2004
Hey all, not sure if this is even possible but is there a way to connection an SQL server with ASP.NET using my username and password as the trusted connection? As I am a trusted connection but the ASP.NET working process isnt. Anything can be done about this apart from addeing the ASP.NET account as a trusted connection?
Thanks
Luke
View 4 Replies
View Related