DB Engine :: How To Catch Who Killed Active Session / Connection

May 20, 2015

Is there any specific event i have to select in SQL profiler to monitor the process / user that kills active connection which is performing a batch data transfer. Any other alternative other than profiler that catches this (like XEvents)?

View 4 Replies


ADVERTISEMENT

DB Engine :: Cannot Stop Extended Event Session On Server

Jan 25, 2012

I have two extended events sessions running on a server. I do have sql jobs that automatically stop the XE sessions and import the results to working tables. I see two "ALTER EVENT SESSION XXXX ON SERVER STATE = STOP" statements that are being executed for more than 2 days, the wait types are XE_SERVICES_MUTEX and PREEMPTIVE_XE_SESSIONCOMMIT. This is not the first time I see this behavior.I do not want to kill the sessions (I guess the sessions won't die anyway) neither restart the sql service

View 7 Replies View Related

DB Engine :: Single User Mode Session Lost After Background Processes Jump In

Nov 28, 2012

We have an application running on SQL server. This application restores DB very frequently using Single user mode. Following are the SQLs that are executed to restore the database in single user mode and to get the database back in multi user mode.

alter database [test-db] set single_user with rollback immediate; --This sql is run using test-db
use master;restore database [test-db] from database_snapshot = 'snapshot_test-db';
alter database [test-db] set multi_user;

After switching the test-db to single user mode some 4-5 background processes of Taskmanager jump in for the test-db kicking off the session that application has taken over in single user mode . These background process are deadlocked between them selves.

Please refer to the output of sp_who2 below at link [URL] .... and following is the deadlock XML.

NOTE: SPIDs in deadlock XML may differ from the output of sp_who2 as spids keeps on changing for these processes.
<deadlock-list>
<deadlock victim="process4bbfc78">
<process-list>
<process id="process4bbfc78" taskpriority="0" logused="10000" waitresource="DATABASE: 5 " waittime="705"

[Code] ....

On searching for this problem I found out that people have faced similar problem but I was unable to find out the root cause and debug steps for this problem. Stopping the SQL server is provided as a solution to kick out these background processes but this is not a feasible in our case as code to restore DB runs very frequently resulting in this problem at a good frequency.

I also made sure that SQL Server Agent is not running. The SQL services running on server are SQL server, SQL Server Browser and SQL Server VSS Writer.

View 9 Replies View Related

Try Catch Doesn't Catch Errors Inside A Data Flow Transformation Script Component

Feb 15, 2007

Hi,

I'm having trouble with a Script Component in a data flow task. I have code that does a SqlCommand.ExecuteReader() call that throws an 'Object reference not set to an instance of an object' error. Thing is, the SqlCommand.ExecuteReader() call is already inside a Try..Catch block. Essentially I have two questions regarding this error:

a) Why doesn't my Catch block catch the exception?
b) I've made sure that my SqlCommand object and the SqlConnection property that it uses are properly instantiated, and the query is correct. Any ideas on why it is throwing that exception?

Hope someone could help.

View 3 Replies View Related

ADO Connection Pooling Error: The Client Was Unable To Reuse A Session With ...

Apr 13, 2006

Hello,

We are running SQL2K5 and have a Web server with a family of sites all sharing an identical connection string to enable ADO connection pooling between them. Today for about 20 minutes we had several (all?) connections from one site that uses a specific DB get a connection reuse error which showed in out SQL logs:

DESCRIPTION: The client was unable to reuse a session with SPID #, which had been reset for conection pooling. This error may have been caused by an earlier operation failing. Check the error logs for failed operations immediately before this error message.

We also have SQL Server slowdown and log in problems from other applications that seemed a symptom of this, or some third unknown cause. Note, the # means the run-time spid number was inserted. The misspelling "conection" comes right out of sys.messages (it is not our custom error):

select top 10 * from sys.messages where message_id = 18056

The immediately preceeding error in the SQL Log was always:
Message
Error: 18056, Severity: 20, State: 29.

Where Severity and State vary, but "Error: 18056" is consistent, although I can find no documentation on "Error: 18056" through Google or MSDN.

Also, the "The client was unable to reuse a session ..." error seems not to be referred to anywhere.

In our IIS logs, the matching entries are of the form:

[DBNETLIB][ConnectionRead (recv()).]General network error. Check your network documentation.

and

Invalid connection string attribute


My questions: Does anyone have experience with this error? We have real good history with ADO connection pooling, but can a "bad" connection be pooled, and if so can it be "flushed" or the pool "drained"?

Thank you for anything you have to offer!



View 13 Replies View Related

Checking If DB Connection Is Active Or Not

Aug 28, 2006

Hi,You all may be knowing that Connection.isClosed() does not tells usif the underying DB connection is active or not; it only checks ifConnection.close() had been previously called or not.One sure shot way to find out this is by executing some dummy SELECTquery and catching it via SQLException.This could be done in various DB's as follows:SELECT * from 1 (MS SQL)SELECT * from DUAL(Oracle)My question is what if you use some other DB , which is not famous asthe above.This could still be achieved by creating dummy table with one columnand querying it. One pitfall of doing this approach is we may not havecreate permissions to create table. Even if we have permissions tocreate table, you need to do the following, if you need to check DBConnection every time.a) Create Tableb) Use SELECT queryc) Drop tableYou may ask me why we need to use drop table. This is because, we cannot create many tables and keep them alive if we were to check (DBConn) it for 100 times. One way is we can use IF NOT EXISTS along withCreate table. Unfortunately, this command is not supported by all DBvendors. So, this is ruled out.One more way of doing is writing simple stored procedure that returnsplain constant. Unfortunatley the syntax for Stored procedures isdifferent for different DB Vendors.So, do we have a correct way of finding if DB connection is active,that would work on all DB's ?Fortunately, there is a way to do this.We could use Connection.getMetaData().getTables(null,null,null, null).We could use this way as this would surely get the number of tablespresent at that moment. How many tables are present in a DB will notbe cached as this may change dynamically. One disadvantage of usingthis approach is performance. What if a DB has 1000 tables, it tries toget the names of 1000 tables and it is performance hit.Is there a solution for this?. Yes, we can use getTables method byinvoking only against the SYSTEM table types. I am sure any DB willnot have many system tables.So, our call would be,Conn.getMetaData().getTables(null,null,null,new String[]{"SYSTEMTABLE"});The above statement is expected to give whether connection is active;if connection is not active, then it throws SQLException. And best partis it will work on all DB Drivers.What if some JDBC driver does not implement the above getTables() call,then we would get some AbstractMethodError that can be caught usingLinkageError. So, finally code for checking if connection is active ornot is as follows:try {ResultSet rs = conn.getMetaData().getTables(null,null,null,newString[]{"SYSTEM TABLE"});} catch (SQLException e) {conn.close();// use try catch block here to catch SQLException forConn.close();//call to open new DB connection.getNewConnection();}catch(LinkageError e){conn.close();// use try catch block here to catch SQLException forConn.close();//call to open new DB connection.getNewConnection();}}This limitation (if it can be called) is going to be fixed for JDBC4.0 implemented drivers(if they implement it in right way).Any comments on this would be appreciated.Regards,Venkata Narayana

View 2 Replies View Related

How To Capture First && Last Active Connection Per User?

Jun 2, 2003

Any suggestions on how to create a report to show when someone first connected to SQL Server and when they last processed anything on SQL Server?

I wrote a query to check sysprocesses every 10 minutes, but it only reports that the person has a connection. It does not tell me if the connection is active. I thought I may need to look at processor and disk to see if those numbers change, but I'm not sure if that is the best approach. Any thoughts?

Thanks, Dave

View 4 Replies View Related

Connection To Exchange Active Directory

Oct 1, 2007

In sql server 2005 i want to connect to active directory of exchange server ... there is one option in which we can search outlook but its not fruitful ... please guide ...

View 3 Replies View Related

Active Directory Connection From SSIS

May 12, 2006

I'm trying to query against AD to grab some data. I've done this setup and got it to work at my location but can't get it working at one of my customers.
Per information I've found via this site I did the following:
Task: from SS2005, select data elements from Active Directory and populate in ODS (using an
SS2005 Package in SSIS)


I created a linked server on the MS2005

EXEC sp_addlinkedserver 'ADSI', 'Active Directory Services 2.5', 'ADSDSOObject', 'adsdatasource'
I then created the following View (in the Master DB):
CREATE VIEW viewADContacts
AS
SELECT [NAME],MAIL
FROM OPENQUERY( ADSI,
'SELECT NAME, MAIL
FROM ''LDAP://#######/ DC=####,DC=###''
')
The View created w/ no errors

When I execute
select * from viewADContacts
I get this error:
Cannot fetch a row from OLE DB provider "ADSDSOObject" for linked server "ADSI".

Any thoughts on this error? Again, I did the exact same thing at my office (against my local AD) and it worked fine.

Thanks in advance

Tom

View 3 Replies View Related

Connection To SQL Server 2005 Excel VBA / Active D

Jul 17, 2007

Hi,

Currently I am trying to connect to SQL Server 2005 via Excel VBA. I would like to create a connection to the server as I have previously done with my 2000 server. However, the diffence this time is that I am using Active Directory so there are no specific log-in's for SQL per se just Windows Users that are part of groups, any of which could use this spreadsheet. So where-as previously I included the username and password for SQL Server in the connection string I would now like to use the credentials currently logged onto the particular machine.

My previous code was this

Public Function getConnection() As ADODB.Connection

' Create a connection object.
Dim Conn As ADODB.Connection
Set Conn = New ADODB.Connection

' Provide the connection string.
Dim strConn As String

'Use the SQL Server OLE DB Provider.
strConn = "Network Library=DBMSSOCN;PROVIDER=SQLOLEDB;"

'Connect to the Pubs database on the local server.
strConn = strConn & "DATA SOURCE=SQL02,1433;INITIAL CATALOG=dbDataWareHouse;"

'Use a login.
strConn = strConn & " Uid=*******;Pwd=******;"

'Now open the connection.
Conn.ConnectionString = strConn

Conn.Open

Set getConnection = Conn

End Function

Would anyone be able to point me in the eight direction ? Your help would be much appreciated

Many Thanks

James

View 1 Replies View Related

Dropping An Active Connection On An Attached Database

Jan 9, 2008

Why in the hell doesn't SQL Server provide a facility for dropping anactive connection on an attached database in SQL Server Managementconsole? I can't detach an attached database because apparently thereis an active connection.I know you can use SSEUTIL but it seems like kluge for a poorlythought out function.Crazy

View 2 Replies View Related

Active Directory/ADSI Connection Problems...help!

Mar 15, 2006

I am having weird problems using ADSI and SQL Server. Our local intranet is ASP with a SQL database on Windows 2003 Server. It uses Active Directory (via ADSI linked server) to get authenicate users, etc.

Every now and then (about once a month) the SQL connection to AD will "crash". The following error is what I see when it has crashed:

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC SQL Server Driver][SQL Server]OLE DB error trace [OLE/DB Provider 'ADSDSOObject' ICommandText::Execute returned 0x80040e37].

Sometimes it will come back on its own later, others are solved by a server reboot. Here is how my SQL query looks:

SELECT adspath
FROM OPENQUERY(ADSI,
'<LDAP://DC=servername,DC=net>;(&(objectCategory=Person)(objectClass=user));adspath;subtree')
Rowset_1
WHERE (sn <> '')Where can I start to get to the bottom of this?

View 16 Replies View Related

Deleting Killed Processes From Current Process

Aug 25, 2005

When I was trying to get my maintenance plans to work there were many processes I had to kill. These processes were killed over a week ago but they still list in the Current Activity | Process Info list. Under Command it says "Killed/Rollback". If I go into QA and run kill 65 with statusonly it says the process is complete. How do I get these processes off the list?

View 4 Replies View Related

Killed/Rollback Process Hogging ALL CPU Resources.

Feb 25, 2005

I have a test database for the end users to test their select queries for reports.
One of my users is writing queries that cause locking in the database. I killed the process last evening and they are in Killed/Rollback status but are still hogging 90% of the CPU resources for the past 12 hrs. I tried killing them several times but no go.

I know that the best way to clear of these processes is by restarting SQL Server. If that is not an option is there is any other way we can clean these processes?

Also the user running these queries has a read only and create view access to the database. From my experience processes that go into Kill/Rollback state after you kill them are processes associated with some update transaction. Since the user as far as i know is running Select commands would an infinite loop cause this ?


thanks
nina

View 8 Replies View Related

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 View Related

Waiting For Ole Db Resource And Cannot Kill Process In KILLED/ROLLBACK

Feb 21, 2007

I have a query to refer to the data source in as400 with ODBC 'iSeries Access for Windows ODBC data source' and a linked server with 'oledb for ODBC driver' in SQL2005 (9.0.2047)

Now we got 2 problems,

1. When we refer to the view with openquery e.g select * from openquery (abc, 'select * from dates')

This query continue to run without ending. In Activity monitor, we found that it is waiting for resource ole db

2. Since the process continue to run without ending, I kill the process in activity monitor or by command 'kill'. It shows the status 'KILLED/ROLLBACK' and it returns 'SPID 197: transaction rollback in progress. Estimated rollback completion: 0%. Estimated time remaining: 0 seconds.' in 'kill 197 with STATUSONLY'



In problem 1, I found some ppl encountered the same problem (waiting for resource oledb) with openquery to different data source e.g. vfp, oracle.

In problem 2, we can't restart the sql server for clear the unkillable process

Kindly advise. Thanks in advance.









View 4 Replies View Related

Named SQL 2005 Instance Multiple Active Recordsets-C# Stored Procedure-Connection String

May 7, 2008

I am working on a C# stored procedure for SQL 2005, and i've uncovered a couple questions.

First a description of the procedure:

I have a series of equations taking place to calculate a score based on activities in which the user participated in, that will give them an over all grade or rating. The calculations currently take place in the database, and I am moving this from T-SQL to C# CRL.

1. In order to connect the stored procedure to the database I use a SqlConnection and a SqlCommand to execute either dynamic sql or a stored procedure to return data to a data reader. Is there an easier way to connect to the database? In SSMS if i open up the query it knows what database i am connected to. Do I have to make a sql connection in C# stored Procedures?

2. I have multiple functions within the main C# Stored Procedure that I'm working on. This ends up requiring Multiple Active Recordsets. I must set this withing the connection string. Seeing as I'm using a named instance of SQL 2005, I now must put the userid, password, and server name into the code. Is there a more secure way to connect to SQL Server in a C# Stored procedure that allows MARS?

3. I encryped the connection string, and put it into the assembly, I wrote a decryption class, and in the procedure itself everytime I need to refrence the connection string, I call it, decrypt it, and pass it along. But my code to decrypt the connection string is in the compiled DLL, if the server was ever compromised the encrypted connection string and the key to decrypt it are sitting in the DLL. Is there a config file that I can use for C# Stored Procedures?

4. If I have to keep the connection string in the file, then I need to change that per environment. Example I have 3 test environments before production. So I would need to change the connection string for each file. That may be fine for one procedure, but what if I have 20, that will quickly get of hand?

5. Along the security lines, can the assembly for a C# Stored Procedure be called from outside the assembly? From a command prompt, or by a maliceous program? Or could it be called directly by a .NET application instead of going through a T-SQL Stored Procedure that is using
WITH EXECUTE AS CALLER
AS
EXTERNAL NAME [PROJECTNAME].[CLASSNAME].[METHODNAME]


Thanks

View 1 Replies View Related

SQL Server 2008 :: Status Suspended On Command Killed / Rollback

Mar 4, 2015

I was running a stored procedure it was suspended for about 11 hours so I decided to kill it now its in Killed/Rollback stage for 12 hours and when check the status of roll back it says "Estimated rollback completion: 0%. Estimated time remaining: 0 seconds." its using up CPUTIME 380000 and DiskIO 970000. How to do I stop this co.mpletely

View 4 Replies View Related

How Can I Always Close A Text File From A CLR Stored Procedure Even When The Process Is Killed?

Mar 6, 2007

I have a C# SQL 2005 .net stored procedure which scrubs a text file looking for characters not in a range of characters and replacing them with another character.  This works fine except when the process is killed.  When this happens the file handle of the file being scrubbed is not released.  I use a try catch finally block when opening the file and the output file.  The finally section fiushes the output file and closes all files and streams but still when I go to access the file again or use the file in explorer it says the file is still in use.  Should I be handling this some other way?  How do I know the files will always be closed correctly.

View 1 Replies View Related

Reporting Services Configuration Killed Several Summary Report Functions

Nov 22, 2006

I installed 2K5 developer on my box. I was impressed with the Summary tab report functions and the reports available there. Then I ran the "Reporting services configuration" tool to get RS running, but now several of the summary reports are broken. There are several different error messages given in the summary window, depending on the report selected.

For example, the "server dashboard" now displays












Summary Unavailable











The information needed to display a summary page for the selected object is not available.








Error:









"sql_handle" is not a recognized table hints option. If it is intended as a parameter to a table-valued function, ensure that your database compatibility mode is set to 90.



The next two reports work, but the "Scheduler Health" report displays


















Summary Unavailable











The information needed to display a summary page for the selected object is not available.








Error:









Incorrect syntax near '.'.



"Memory Consumption" works GREAT, but "Activity - All blocking transaction" shows:


















Summary Unavailable











The information needed to display a summary page for the selected object is not available.








Error:









Incorrect syntax near '.'.
Incorrect syntax near '.'.
Incorrect syntax near the keyword 'as'.
Incorrect syntax near the keyword 'as'.



What could be the cause of such errors? Is there an "easy fix"? I wouldn't know how to "unconfigure" reporting services and have a feeling that wouldn't help anyway...



View 11 Replies View Related

SQL Server Session State - Using A 1.1 Database Schema For 2.0 Session State Storage

Aug 3, 2006

The 2.0 version of ASPSTATE is slightly different than the 1.1 version in that one table has one additional column and another table uses a different data type and size for the key. The 2.0 version also has a couple additional stored procedures.

We'd like to manage just one session state database if possible so we're trying to figure out if Microsoft supports using the new schema for 1.1 session state access (it seems to work, but our testing has been very light).

Is there any official support line on this? If not, can anyone comment on whether or not you'd expect it to work and why?

Thanks.

View 1 Replies View Related

Try Catch Does Not Catch Exception

May 15, 2007

hi all,



All of a sudden my application started crashing when trying execute dml statements on sql server mobile database (sdf file). Frustating thing is that whole application crashes without any error message. this happens for all kinds for DML statement but not all the time. Sometimes it would fail for delete statement such as delete from table; or for insert into statement



my problem catch does not catch the error. There is no way to find out teh what is causing this error



SqlCeConnection sqlcon = new SqlCeConnection("

Data Source = '\Program Files\HISSymbol\HISSymboldb.sdf';"

);

SqlCeCommand sqlcmd = new SqlCeCommand();

sqlcmd.CommandText = Insert into company('AA', 'Lower Plenty Hotel');

sqlcmd.Connection = sqlcon;

SqlCeDataReader sqldr = null;

try

{

sqlcon.Open();

//use nonquery if result is not needed

sqlcmd.ExecuteNonQuery(); // application crashes here



}

catch (Exception e)

{

base.myErrorMsg = e.ToString();



}

finally

{

if (sqlcon != null)

{

if (sqlcon.State != System.Data.ConnectionState.Closed)

sqlcon.Close();

sqlcon.Dispose();

}

}//end of finlally

View 4 Replies View Related

DB Engine :: Connection Closed From Application End

Jun 30, 2015

The application server gets below error while the job is being run intermittently:

An error occurred while performing connection management

com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed.
 at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:171)
 at com.microsoft.sqlserver.jdbc.SQLServerConnection.checkClosed(SQLServerConnection.java:319)
 at com.microsoft.sqlserver.jdbc.SQLServerConnection.prepareStatement(SQLServerConnection.java:1839)

[Code] ....

There is no error reported in SQL logs.

View 6 Replies View Related

Database Engine Connection Error.

Mar 6, 2006

I got the sql2005 std edition at the msdn rollout, and the vs2005 studio. I uninstalled sql2000 and now, cannot connect to the database engine.

I get the following error message with a link to an page that offers no info. What's up and how can I get it to work? Please, help.

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476

View 3 Replies View Related

Probelm With Connection To Databse Engine

May 21, 2007

Hi,



I have the same problem like Ben. Trying to connect to database engine but failed all the time. I use a SQL 2005 Enterprise Eval version. When I connect to database engine, I put <my computer name>SQLEXPRESS, it gives me this message:



An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (.Net SqlClient Data Provider)



I checked the sqlbrowser and it's running. I also enabled port 1434 in Firewall. But it still doesn't work. However, when I connect to analysis service using just <my computer name>, it lets me connected. I tried many ways to fix this problem but still no luck. Could anyone help me solve this problem please? Thanks so much.



Carl

View 6 Replies View Related

DB Engine :: Can Move DLL Through A Connection And Put It On Server?

Oct 21, 2015

Our application installs requiring several SQL servers. Some of the SQL Servers need CLR dlls to be installed. We would like to not run the installer apps on the SQL server machines. Is there any way to use the SQL server connection to install the DLLs?

These dlls are the only reason to run the installer apps on the SQL server machines. To do this would simplify daily installation in all of the various build and test environments.

This would be preferable to using mapped drives etc.

View 3 Replies View Related

DB Engine :: Connection Level Encryption On Server DB

Jul 10, 2015

We have a need for getting data from sqlserver DB on premise to the cloud. DB is not encrypted currently, other applications are accessing it but those applications are on premise. Following link talks about encrypted connection, but is it possible to encrypt only one of the port connection. we can add a custom port.URL...

View 3 Replies View Related

HELP!! SQL Server Express 2005 Engine Connection To My DB

Sep 26, 2006

Preface, I am just starting to learn about database and web development.

I installed VS.net 2005 which updated my web site project file and automatically attached it to a database. It connected to ".app_dataaspnetdb.mdf". However it messed something up and the connection didn't work. If I create a project from scratch, it connects to its DB just fine, but not my upgraded project.

However, when I publish my web site, I need to use ODBC. So, my thought was to simply set up the system locally in a way that will make it easy to connect on the web site. I was told to add a system DSN to the "Microsoft ODBC Administrator". I tried to add a "SQL Server" and give it the database name but it failed to connect.

So, then I ran the SQL Server Configuration Manager and looked at the server properties and found this string under the advanced -> startup parameters.."-dc:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDATAmaster.mdf;-ec:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLLOGERRORLOG;-lc:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDATAmastlog.ldf"

My database is in an entirely different folder. The database it looks like it is servicing is a "master.mdf" database installed under the SQL server install folder. So, I figured that I found my problem. I just have to change this file to map to mine. I replaced these three strings with paths to my aspnetdb.mdf/ldf files, and created a LOG folder. Howwever, it wasn't able to connect to this database. It said something like "it doesn't exist or you don't have permission", even though I gave it the right path.

So, I'm at a loss for how to get my application to be able to use the ODBC interface to connect to its very own database on my local system.

What do I need to do? Please help!

View 4 Replies View Related

SQL Server 2012 :: Query To Count How Many Sessions Are Active And Remain Active Per Hour

Jan 22, 2015

I have a table with the following columns employeeSessionID, OpDate, OpHour, sessionStartTime, sessionCloseTime. I need to see how many users remain active per hour. I can calculate how many logged in per hour, but I am stumped on how to count how many are active per hour. I have a single table that stores login data. I have created a query that pulls out the only the data needed from the table into a temp table using this query. Also note it is possible that the sessionCloseTime is null if the device has not been logged out this would need to be counted a active.

TABLE NAME #empSessionLog Contains the time stamp data OpDate, sessionStartTime and sessionCloseTime.
OpDatesessionStartTimesessionCloseTime
2015-01-202015-01-20 14:32:59.1302015-01-20 14:33:14.6299166
2015-01-202015-01-20 06:58:33.7302015-01-20 15:27:16.9133442
2015-01-202015-01-20 09:56:22.8402015-01-20 17:56:29.7555853
2015-01-202015-01-20 05:59:18.6132015-01-20 14:05:19.0426707

[code]....

can see how many sessions logged in per hour with the following statement:

SELECT
opDate,
FORMAT(DATEPART(HOUR, sessionStartTime), '00') AS opHour,
Count(*) AS Total
FROM #empSessionLog
Group BY opDate, FORMAT(DATEPART(HOUR, sessionStartTime), '00')
Order BY opDate, FORMAT(DATEPART(HOUR, sessionStartTime), '00') ASCResults:
opDateopHourTotal
2015-01-20041

[code]....

Where I am stuck is how do I count the sessions that remain active per hour until the session is closed with the sessionCloseTime.

View 5 Replies View Related

There Is Not Enough Disk Space Error While Installing SQL In A Active/Active/Passive Cluster

Mar 5, 2008



Hi

I am having some teething problems while installing SQL on a 3 node cluster. Within the Cluster configuration I have 3 Cluster Groups with each of them having their associated disk resources. All these disk resources physically exist on a SAN.

The actual cluster is running absolutely fine and I can access all the disks from their respective owner node. The problem only starts when I start installing SQL Server 2005 on this cluster. I specify the Cluster group from the Cluster Group Selection and choose the desired partition and then the error message pops up

"There is not enough diskspace on the destination disk for the current SQL Server data files. To proceed, free up disk space to make room for data files, or install the data files to a different drive"

But the disk I am trying to install it on is 264Gb and none of it is used. I have also tried to change it to a different disk within the same Cluster group but to no avail. I have even tried to install it in a different cluster group all together but I get the same error message.

I have googled around havent found anything so far. The disks have got full permissions for the account I am installing SQL with.

Any help will be much appreciated.


Regards

Adnan

View 5 Replies View Related

Microsoft SqlServer Desktop Engine Connection Problem

Mar 15, 2004

i installed the MSDE2000A on server and i tried to connect from client machine through vb Application using connection string. Server anad client are in LAN. but Some systems able to connect and some systems are unable to connect.

i am getting the error:

"SqlServer does not exist or access denied "

for non connected machines.

the server is listening from these machines. but not connecting to MSDE.

can anyone give me solution what may be the cause.

View 6 Replies View Related

DB Engine :: Error Occurred While Establishing Connection To Server

Sep 23, 2015

TFS is unable to connect to SQL server. Was working fine and has been for months. Today the backup tool failed due to the tempdb being maxing out c: space.Ran the following command, then restarted.

View 7 Replies View Related

Active/Active SQL Server Clustering With Multiple Instances

May 12, 2008

Hi

I am newbie in SQL Clustering. I have set up a Windows Server Cluster with 2 nodes and am having the following problem with Physical Disk resource for cluster groups:

My Default Cluster Group (named Cluster Group) has IP Address, Network Name, Physical Disk and MSDTC resources. In addition to that my Default SQL Server instance resources are also in this group. I had this initial set up for Active/Passive mode.

Now I am trying to set up a SQL Cluster in Active/Active mode. For this I have to install another instance of SQL Server in the existing cluster and make a separate cluster group for its resources. I made a new cluster group (SQL Instance Group) with an IP Address and a Network Name resource for this new instance but I dont have any Physical Disk resource to allocate to it. As such while installing the SQL Server Instance I get stuck when I'm asked to select the quorum disk to be used.

Is it possible to configure two quorum disks, one for each group?
What's the concept of dedicated disks resource for each sql instance in a group? Is this same as the quorum disk? If this is not a shared disk how do I configure a dedicated disk resource for my second cluster group (SQL Instance Group)?

Anyone could please help me out with this?

View 12 Replies View Related







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