SQL Server Admin 2014 :: How To Close Active Connections Or Create Connection Timeouts

Dec 9, 2014

we have roughly 22 people connected to one database. But after a while, their applications begin to drag due to in and out communication with the server. When i check the active connections on the sql server, some times i see 157 active connections, please how to i set a timeout or connection interval close, so as reduce the heavy load being put on the server. Or how can i automatically close connections when they get higher than 50 connections.

This settings should be sql server 2008 related.

View 5 Replies


ADVERTISEMENT

SQL Server Admin 2014 :: Active Passive Cluster With 5 Instances

Nov 4, 2015

We have a SQL 2014 active passive cluster with 5 instances. When the cluster was installed one of the nodes was a virtual machine. As we started to have problems and this is not a Microsoft supported configuration we decided to replace the virtual node with a phyiscal one. On 3 of these 5 instances we configured static ports (1433 TCP) this was required for applications and firewall implementation.

Now with the physical node joined to the cluster we have issues with these three instances. Whenever one of these instances is moved to the passive node the server authentication is changed from mixed to windows only. I'm no SQL expert at all but to me it looks like the configuration of the instances are not replicated to the passive node? I found some similar problems on the net but these are mostly under sql 2008.

View 4 Replies View Related

SQL Server Admin 2014 :: How To Setup Open Querying Of Active Directory

Mar 9, 2015

I am trying to setup querying Active directory from sql for the first time.

We are running on windows server 2012 and using sql 11.0.2100.60. Have tried the following

sql is on sever dev
AD is on sever DO

EXEC sp_addlinkedserver 'ADSI', 'Active Directory Services 2.5',
'ADSDSOObject', 'adsdatasource'
GO

[Code] ....

I get the following error when I try and query

Msg 7321, Level 16, State 2, Line 2
An error occurred while preparing the query "SELECT name
FROM 'LDAP:// xxxx.internal'
WHERE objectCategory='Person' AND
objectClass = 'contact'" for execution against OLE DB provider "ADSDSOObject" for linked server "ADSI".

View 1 Replies View Related

SQL Server Admin 2014 :: Active Directory Accounts Need To See Only One Database Role

Apr 24, 2015

I have more than 3000 Active Directory Users, I have created Role Level Security on one table by using Suser_name(), Now all the active directory users need to connect sql server and access the database role object. How can I achieve that without Using .net?

I am able to add all active directory users to sql server in one go, but I am also trying to achieve same time to map with database role as well? Is it possible ?

View 2 Replies View Related

SQL Server Admin 2014 :: Remote Connections Not Establishing

Mar 26, 2015

I am getting problem with remote login to the sql instance.

In machine Sql 2008R2 is installed as default later 2014 installed as named instance. Both TCP/IP, shared memory, namedpipes are enabled for both named & default instances. For the default instance I can used the remote connections but the named instance is not allowing remote connections.

View 5 Replies View Related

SQL Server Admin 2014 :: DNS Name Not Match Active Directory Domain Name For Reporting Services

Feb 11, 2015

I am running into a weird issue with a new SQL Reporting Services 2014 server I built. I installed SQL Reporting 2014 on Windows Server 2012 R2 and configured Kerberos, but the site is extremely slow. After some reconfiguration and log captures I have determined the issue has to do with the Kerberos setup, however I am running a similar configuration with SQL Reporting Services 2008 on Windows Server 2008 R2 and do not run into the same errors.

The error I see while using Wireshark is KRB Error: KRB5KDC_ERR_BADOPTION NT Status: STATUS_NO_MATCH. When I drill down the into the error I can see the kerberos string is testprjmnmtreports14.company.com, which is the URL we are using to access the site. I made sure to add that name as an SPN for the service account that is running SQL Reporting Services, however I still receive the error.

Then I tried configuring the site to run without a hostheader, so I accessed the site with the server name, ECTSTSQLRS5, and the site works perfectly fine, no errors are reported either. So it seems I have isolated the issue down to Kerberos but I am not sure how to resolve it. Here is some more information about my environment:

DNS/URL used: testprjmnmtreports14.company.com
Server Name (FQDN): ECTSTSQLRS5.company.int
AD Domain Name: company.int
Server Version: Windows Server 2012 R2
AD Functional Level: 2008 R2

As you can see I am trying to use a .com address but my AD domain is .int which I think is the issue, but I do not have the same problem on my other server that is running Windows Server 2008 R2. What do I need to do to allow my new site on 2012 R2 to work with this DNS Alias?

View 0 Replies View Related

SQL Server Admin 2014 :: Determine Which Server Is Currently Active For Availability Groups

Nov 25, 2014

I want two write a small script to determine which is the currently active (primary) server in the AG.

Right now, I see that using SELECT * FROM SYS.dm_hadr_availability_replica_states I can determine the role. However, when the server goes down and switches to the secondary node, I don't believe that the role changes (or does it?). How do I determine which is the active node?

View 9 Replies View Related

SQL Server Admin 2014 :: Deny SSMS Connections From Remote Servers?

Nov 20, 2014

Is there any way I can deny connection from SSMS only from remote servers?

View 7 Replies View Related

SQL Server Admin 2014 :: Unable To Create Credentials

Jul 23, 2014

What is the needed permission to create credential except for sysadmin?

Already granted securityadmin but still user does not have permission to perform this action.

View 1 Replies View Related

SQL Server Admin 2014 :: Create Format File For BCP

Nov 10, 2014

We have one table where we store all documents in one of the column called "Doc" with varbinary(max) data type.

We want to download those documents from sql table to windows explorer and i wrote BCP in sql 2005. And things were fine.

The format file I used there looks like this,

9.0
1
1 SQLBINARY 0 0 "" 1 Doc ""

Now we are in 2014 and when I try the same code with same format file, it hangs in the middle. So I changed the file to 12.0 instead of 9.0 but still not working.

View 0 Replies View Related

SQL Server Admin 2014 :: Create A Master Key In The Database

Jun 15, 2015

in my environment I am running the SQL Server agent job.i am getting below message.

create a master key in the database or open a master key in the session before performing this operation” error 

View 5 Replies View Related

SQL Server Admin 2014 :: Create Three AGs And Listeners In Same Instance

Jul 28, 2015

I have built a SQL 2014 Always on Cluster. I need to create three Availability groups and listeners in the same instance. Do I need 3 separate IP address for each listener or one IP address can be shared for all 3 Listeners ?

View 3 Replies View Related

SQL Server Admin 2014 :: Can't Create Model After Clean MDS Install

Apr 17, 2015

I have made a clean install of SQL 2014 including MDS on a server with Win Server 2012 R2.

After the installation I cant create new models because on an error saying that "Must declare the scalar variable "@Version_Id". "

I can see that the tables gets created in the MDS database but the models dont show up in the web interface.

I get the same error message when I try to deploy an old model.

View 0 Replies View Related

SQL Server Admin 2014 :: Create Dynamic Columns In Temp Table?

Jun 9, 2014

I want to generate dynamic temp table so, from one strored procedure am getting an some feilds as shown below

CM_id,CM_Name,[Transaction_Month],[Transaction_Year],''[Invoice raised date],''[Payment Received date],''[Payout date],''[Payroll lock date]

for i want to generate table for the above feilds with datatype

View 5 Replies View Related

SQL Server Admin 2014 :: Create Temporary Table With Dynamics Column

Jun 10, 2014

I have created a stored procedure for retrieving column name, as shown below

CM_id, CM_Name, [Transaction_Month], [Transaction_Year], [Invoice raised date],[Payment Received date],[Payout date],[Payroll lock date]

Now I am trying to create a temporary table using the above generated coluimns from Stored Procedure with datatype.

View 3 Replies View Related

SQL Server Admin 2014 :: Window Authentication Using Connection String

May 12, 2015

Is it possible to make window authentication using Connection String.

Like
Data Source="Remote Host"; User ID="user1"; Password="Password"
Integrated Security=SSPI'

user1 have rights on SQL server.

Is it possible user2 logged in on different machine can access SQL server.

user2 does not have rights on SQL Server.

View 3 Replies View Related

SQL Server Admin 2014 :: Database Mirroring Connection Handshake Failed

May 9, 2015

I configured a database mirroring on SQL server 2008 R2 on test environment. However It was not working, after some time. I deleted the mirroring configuration and also deleted database on both primary and mirror instance.

few days later I notices, On Primary, Continuous error events logged with message "database mirroring attempt by user 'domainservice account' failed with error 'connection handshake failed, 'domainservice account' does not have permission on the endpoint state 84.

I want to get rid of this message.

View 2 Replies View Related

SQL Server Admin 2014 :: Capturing Connection Coming From Outside In Server Using Profiler

May 14, 2015

I need to do testing on capturing connection coming from outside using Profiler. Basically I need to do something from other SQL servers connecting to this SQL server and test if it is captured by profiler.

View 4 Replies View Related

SQL Server Admin 2014 :: Correcting Server Connection In Maintenance Plans?

Aug 11, 2015

In SQL 2008 R2, if we clone an environment including SQL server, the maintenance plans retain a connection string to the source/original server they got cloned from and are not editable. But, I was able to use a work around by editing them in BIDS and saving them back on the server. But now with 2014, I am facing two issues:

1.I still can edit the package to correct the server connection, with SSDT; but the option to save back to the server is not available any longer!

2.I used to be able to see all my plans under SSIS in 2008 R2 but not in 2014 now. Although, they are listed in SSMS!

View 1 Replies View Related

SQL Server Admin 2014 :: Logon Trigger Executing Multiple Times For Single Connection?

Jan 30, 2015

I am trying to create a logon trigger. As I am testing this, I discovered that each time I do a connection, I get 19 rows, inserted into my audit table. I ran profiler, and I see it is going through the logon trigger multiple times, for a single connection. So, what am I doing wrong? The code is fairly simplistic, and the profiler doesn't give a clue, as to what is going on. When I look at the output, I see the spid for the first couple of connections are different, then a spid, that is different from those 2 is in the next 17 rows. But, when I do an sp_who2, that spid does not exist.

This issue was noticed on a 2012 version, that I was first testing on, then had the same issue on a 2008 R2. I am currently testing on a 2014 version, that is doing the same thing. Is the logon trigger itself, firing, and causing this?

I also tried using the After Logon option, and got the same issue.

Here is the code:

CREATE TRIGGER LogonAuditTrigger
ON ALL SERVER WITH EXECUTE AS 'sa'
FOR LOGON
AS
BEGIN
DECLARE @Body NVARCHAR(2000),

[code]....

View 0 Replies View Related

SQL Server Admin 2014 :: Does Security-admin Role Plus Deny Alter Any Login Cancel Each Other Out

Aug 27, 2015

I want to set up a database role so that users can use sp_readerrorlog through SSMS. It does a check on membership in the securityadmin role.

I have tested it and can see you can grant execute on xp_readerrorlog but the SSMS GUI uses sp_readerrorlog.

I thought I could create a user/certificate and add the signature to sp_readerrorlog but it's not permitted (likely because it's not a normal database object).

So the other solution is to add the users to the securityadmin role but then explicitly deny alter any login (best done with a custom server role in 2012+ but otherwise just manually in 2008). I tested this out and it works, I'm not able to alter any logins or increase my own permissions, I also did a check of what's reported from fn_my_permissions(null, null) and it shows minimal permissions like I'd expect.

View 0 Replies View Related

Close Connections Explicitly

Jan 14, 2008

Hi everybody,How is it possible to close any open connections from the connection pool explicitly like on the log off page? So when the users log off from the application I want to close all connections that were opened during the use of application.asp.net forums is the best....thanks,Murthy here 

View 4 Replies View Related

Why Do My Endpoint Connections Never Close?

Jan 11, 2008

Problem: Connections to SOAP endpoints never close even if app initiating call was shutdown several days earlier. Create Endpoint statement included at bottom

Questions:
1 Why?
2. Is there a configuration option I need to set?

[1] Client side: Multiple clients from XMLSpy running on XP Pro to WebSphere Process Server running on AIX

[2] Server side:


What is the MS SQL version? SQL Server 2005 SP2

What is the SKU of MS SQL? Enterprise

What is the SQL Server Protocol enabled? Shared Memory | and TCPIP

Does the server start successfully? YES
If SQL Server is a named instance, is the SQL browser enabled? YES

What is the account that the SQL Server is running under? Domain Account
Do you make firewall exception for your SQL server TCP port if you want connect remotely through TCP provider? NO

Do you make firewall exception for SQL Browser UDP port 1434? In SQL2000, you still need to make firewall exception for UDP port 1434 in order to support named instance. NO
[2a] Tool Used to Connect: Multiple clients from XMLSpy running on XP Pro to WebSphere Process Server running on AIX


[3] Platform:

What is the OS version?Windows 2003 SP2
Do you have third party antivirus, anti-spareware software installed? McAfee. Exceptions have been set in accordance with MS SQL Server documentation

ENDPOINT:

CREATE ENDPOINT [TestEndpoint]


AUTHORIZATION [AuthID]

STATE=STARTED

AS HTTP (PATH=N'/SqlSSL/testEndpoint', PORTS = (SSL), AUTHENTICATION = (BASIC),


SITE=N'Win2003.ent.corp.net', SSL_PORT = 443, COMPRESSION=DISABLED)

FOR SOAP (


WEBMETHOD 'PutTestResponse'( NAME=N'[UserDb].[schema].[usp_test]'


, SCHEMA=DEFAULT

, FORMAT=ALL_RESULTS),

BATCHES=DISABLED,

WSDL=N'[master].[sys].[sp_http_generate_wsdl_defaultcomplexorsimple]',

SESSIONS=ENABLED, SESSION_TIMEOUT=10,

DATABASE=N'UserDb',

NAMESPACE=N'http://tempTestEndpoint.org',

SCHEMA=STANDARD, CHARACTER_SET=XML)

View 1 Replies View Related

How Do You Close The Connection At The SQL Server?

Apr 19, 2008

How do you close the connection at the SQL Server? I have a backup I want to resotre to SQLExpress using SQL Management Studio Express. When I try, the SQL tells me he can't because the database is in use. I don't realy care about this I still want to restore the database. So I figured it's because there are some active connection to the database. My gues is I have to close those, but how? I also know I can restart SQLExpress and the connection will drop, but this server has more then one database, so I cant always do that. I'm looking for some T-SQL like DROP ALL CONNECTION.
Thanks for the help.

View 5 Replies View Related

How To Check Number Of Active Connections In SQL Server?

Jan 23, 2002

Hi All

How to check number of active connections ?
I know two ways of doing it ..

1. run sp_who2

2. in Current Activity in Enterprise Manager ..

If what ever number I am seeing is the Active Number of Connections ..then

I am facing a problem here ..

In My serevr I have 75 Users licenses are configured for Per server option ..
Through a Java aplication when Developer tried to capture any SQL server Connection it says following error ..

Details :
[MERANT][SQLServer JDBC Driver][SQLServer]Login failed. The maximum simultaneous user count of 75 licenses for this 'Standard Edition' server has been exceeded. Additional licenses should be obtained and installed or you should upgrade to a full version.

If I see from Sp_who2 and Current Activity , I can see only 37 Connections ...?

Why is so .. If I am having 75 configured and 37 live in sp_who2 ..why I am getting that error message ?

Is there other way to see Actual Number of Connections made to server ?

Sujit Kandi
1 860 520 7454

View 1 Replies View Related

Should You Close Connections And Datasets, Sqldatasource

Nov 21, 2007

should u always close everys sqldatasource connection string and the dataset associated with it,
 if so how do u do that (ie the proper way) and is it possible to to do it in the session area of global.aspx, NEt 2.0 or should it be done when exiting the page containing the data stuff,
 also same question for NET 1.0 datasets and adapters and strings,
 

View 1 Replies View Related

Close All Existing Connections And Processes To A Database

Jun 4, 2007

Dear all



I created this trigger on a table that i think failed while execution. I tried to modify it and run it again but it seems that i cant do that. If i try and delete the database i also cant - saying that it is still in use. But i am not using it and ther are no other users connected to it. I think the trigger has probably hit a loop and that is holding the link.



To close that i know that a solution would be to restart the SQL server instance but that would be a bit hard since the SQL server where my test database resides is a production server and has few other databases that are important and few users use them.



Is there any way through a SQL statement that there can be forced a delete? Or force close all the connections? Or force close all the processes without actually restarting the SQL server instance.



I have tried all options that were offered on some other forums like forcing it to a single user but even that operation can not be performed saying that the database is still in use.



Thank you so much for all your help and time.



Sincerely

Dan

View 1 Replies View Related

SQL 2012 :: Close ALL Connections To Particular Database Engine In Management Studio?

Jul 14, 2015

In SQL Server Management Studio, it is possible to do the following:

a) In Object Explorer, connect to a particular SQL Server Database Engine, let's call it X.
b) Use that connection to generate many SQL queries, connected to X, in the right-hand pane.
c) In Object Explorer, connect to a particular SQL Server Database Engine, let's call it Y.
d) Use that connection to generate many SQL queries, connected to Y, in the right-hand pane.
e) Close the connection to X, which was created in step (a), from within Object Explorer.

In the right-hand pane, I am now left with a bunch of queries connected to X, and a similar bunch of queries connected to Y. Any quick way to shut all the queries connected to X, but none of the queries connected to Y?

This question can assume real practical importance if server X is a Live Production Server, and server Y is a Test Server, and my next job of the day is to run a change script against server Y....

I have looked for an option in Management Studio to "Close all queries connected to Server X", but haven't found one.

View 6 Replies View Related

Keep A Few Connections Open All The Time Or Open/close Connections On The Fly?

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

Connection Timeouts - A Tough One!

Dec 16, 2003

I'm having major problems with SqlClient Data provider connections in my application. I'm using Win 2003 Server with SQL Server 2000 (both on the same machine), and my application is developed in VB.NET.

I'm using the following db connection string:
Data Source=(local);Initial Catalog=database;Uid=user;Pwd=password;max pool size=100;

As you can see max pool size is set to 100. The SQL Database has it's MAX_CONNECTIONS property set to >32000.

The symptoms are that at seemingly random times, not nessecarily during peak hours, the application becomes extremely slow and stops responding. The error message that is beeing generated is "Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."

After monitoring and debugging, I've found two things.

1) At random times, zero-three times a day, the number of database connections (according to performance monitor) rises from normally 2-8 up to 20-25. After a while, usually 10-60 minutes, it drops back to normal. This is directly related to when the timeout errors occur. It doesn't seem to happen more often during peak load, for some reason. I suspect there is connection leakage in the application, but I've done extensive debugging, and I just can't find any. Also, since the peaks occur randomly and I can't reproduce the error in my development environment, I have no solution to this problem. A few weeks ago, the application ran during heavy load without this problem for 7 days. Before and after that, there have been errors at least every second day. That confuses me even more.

2) The number of connections (monitored in perf mon) never reach above 25. Why? I'm using SQL Server enterprise edition, it's connection limit is over 32000. ADO pool size is 100, and I can't find anything else that would limit the amount of concurrent connections. I'm totally confused. Why does number of connections never rise above 25? Is there a setting hidden somewhere that I just can't find? Also, according to Performance Monitor, I don't get any failed connects, I just get failed commands. Maybe that's a clue? Could the problem some kind of deadlocks in the database that causes timeout?

I realize this entire post is rather confusing. It reflects the state of my mind, I guess, after working around the clock on this issue for a month :)

Any help is deeply appreciated!

View 2 Replies View Related

Intermittent Connection Timeouts

Apr 6, 2007

I'm having an issue with what appears to be SQL Server 2005 deciding to randomly ignore new connections.



I currently have two virtual servers - one running just SQL Server 2005, the other running Reporting Services, Windows Sharepoint Services and Team Foundation Server.



For 3 weeks, it was all working perfectly, then on Wednesday night the server (and both Virtual Servers) was rebooted after installing the latest updates for Windows. Since then, I've had this issue.



It will work fine for a while, then it'll start throwing loads of Errors and Warnings into the Event Log, all along the lines of unable to connect to the database. The Reporting Services Configuration utility throws up the same problem. Then randomly, it'll start working again.



If anyone has any ideas, they would be much appreciated as this is driving me crazy!



Thanks!

View 2 Replies View Related

SQL Server Admin 2014 :: Encryption Key Not Known

Apr 14, 2015

I inherited a lot of Servers to upgrade to 2014 to include an SSRS Server.

The encryption Key was never backed up and it seems that no one knows what the password is?

Do I have to manually load the reports? There are a lot of Reports.

[URL]

View 4 Replies View Related

SQL Server Admin 2014 :: BCP Aborts On First FK Violation

Sep 26, 2013

I want to use BCP to load data from a text file.

By default, constraints are turned off in bcp, so I use the CHECK_CONSTRAINTS hint.

bcp aborts if ANY of the rows contains a FK violation. No data get loaded.

So if I add the -b 1 batch size option, it loads all data UNTIL the first FK violation, but nothing after that.

I want to load EVERYTHING ... except for the violations. But bcp won't let me. Is there a way?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved