Showing posts with label workstations. Show all posts
Showing posts with label workstations. Show all posts

Wednesday, March 28, 2012

Killing Remote Application

Question:

I want to restrict a user from logging in different workstations or creating a multi-sessions of my application. HOw can I remotely kill the application if he tries to login again considering that he has still live connection or open application in the same pc or another? Assuming the user has successfully logged on to the other pc, how can I send a message to his original opened application informing that connection is closed or something like.

If you are familiar with Yahoo Messenger, you will understand my point.

Im using VB6 and MSSQL 2000...

Anybody who has an answer for this please help. As administrator, we normally prevent users from opening different sessions.

Assuming I can kill a live connection using KILL (sp_id) in SQL Server, In VB app, how can I test the connection if its alive or not coz I might use a timer to check every second or a minute so a message box will appear saying that connection is killed remotely and the application terminates?

declare @.@.user_id varchar(20)
set @.@.user_id='TheUserIDLogged'
sp_who @.@.user_id

I also tried to do this but error occurs:
Server: Msg 170, Level 15, State 1, Line 4
Line 4: Incorrect syntax near '@.@.user_id'.

How can i get the sp_id of this connection so that I can execute the
KILL function?

Any relevant idea is highly appreciated...ThanksHow do they login?

What's your security model?

And if you find multiple logins, which one do you pick to kill (Batai?)

USE Northwind
GO

CREATE TABLE tbl_sp_Who2 (
SPID int
, Status varchar(255)
, Login varchar(255)
, HostName varchar(255)
, BlkBy varchar(255)
, DBName varchar(255)
, Command varchar(255)
, CPUTime int
, DiskIO int
, LastBatch varchar(255)
, ProgramName varchar(255)
, SPID2 int)
GO

INSERT INTO tbl_sp_Who2 EXEC sp_who2 active

SELECT *
FROM tbl_sp_Who2
WHERE Login IN ( SELECT Login
FROM tbl_sp_Who2
GROUP BY Login
HAVING COUNT(*) > 1)
GO

DROP TABLE tbl_sp_Who2
GO

HTH|||After opening the initial connection, I would test to see if this user already has open connections using the sp_who command passing the login. If a connection exists, reply with a message box and terminate the application. To test to see if your application is already running on a computer you can test that within vb as well.|||Thanks for the effort...
BUt can you tell me further how to pass the login in SP_WHO so I can get its sp_id and then execute the KILL?
i tried this but an error occured...
declare @.@.user_id varchar(20)
set @.@.user_id='TheUserIDLogged'
sp_who @.@.user_id

Server: Msg 170, Level 15, State 1, Line 4
Line 4: Incorrect syntax near '@.@.user_id'.

Thanks in advance...

Monday, March 26, 2012

Killing automatically crashed sessions ??

If one of my workstations (which communicate using ODBC) crashes, I still see it as connected in Enterprise Manager under management\current activity\.
Is there anyway to kill automatically the crashed cessions?
Thkx in advanceYou could periodicaly scan the sysprocesses table and kill any connection that hasn't had activity in some predeturmined amount of time.

Friday, March 9, 2012

Kerberos

Hi
Want to know how to get kerberos to work
3 workstations involved
User computer with Windows 2000 runs I.E 6.0 and accesses a web page on
Reporting services server (Web Portion-IIS) running windows 2003.
USer is running a report that runs an mdx statement on a data server which
is also windows 2003
We included in the connection string sspi=kerberos
We also when to the domain controller which is windows 2003 and enabled
kerberos delegation on the web and data server.
We still get the below error
An error has occurred during report processing. (rsProcessingAborted) Get
Online Help
a.. Cannot create a connection to data source 'OLAP'.
(rsErrorOpeningConnection) Get Online Help
a.. The operation requested failed due to security problems - the user
could not be authenticated
b.. Thanks in advanceYou may want to try posting this to the
microsoft.public.windows.server.security newsgroup as well.
Jay Nathan
http://www.jaynathan.com/blog
"Will Byron" <will.byron@.maxqtech.com> wrote in message
news:u45ZipE5EHA.2124@.TK2MSFTNGP15.phx.gbl...
> Hi
> Want to know how to get kerberos to work
> 3 workstations involved
> User computer with Windows 2000 runs I.E 6.0 and accesses a web page on
> Reporting services server (Web Portion-IIS) running windows 2003.
> USer is running a report that runs an mdx statement on a data server which
> is also windows 2003
> We included in the connection string sspi=kerberos
> We also when to the domain controller which is windows 2003 and enabled
> kerberos delegation on the web and data server.
> We still get the below error
> An error has occurred during report processing. (rsProcessingAborted) Get
> Online Help
> a.. Cannot create a connection to data source 'OLAP'.
> (rsErrorOpeningConnection) Get Online Help
> a.. The operation requested failed due to security problems - the user
> could not be authenticated
> b.. Thanks in advance
>
>|||I got Kerberos to work by using the artricle at
http://support.microsoft.com/default.aspx?kbid=828280
however what I ultimately got tied up with is the olap service on the
analysis service machine was using a domain account which I assumed it could
since the above article talks about setting up an SPN if the analysis
service service runs using a domain account.
I ran into another article
http://www.mosha.com/msolap/articles/enablingdelegation.htm
which stated
The MSSQLServerOLAPService must be running under the LocalSystem account in
order for delegation to be enabled.
Once I changed to run under local system the kerberos feature worked.
"Jay Nathan" <jay@.jaynathan.com> wrote in message
news:%23WurCfU5EHA.2124@.TK2MSFTNGP15.phx.gbl...
> You may want to try posting this to the
> microsoft.public.windows.server.security newsgroup as well.
> Jay Nathan
> http://www.jaynathan.com/blog
>
> "Will Byron" <will.byron@.maxqtech.com> wrote in message
> news:u45ZipE5EHA.2124@.TK2MSFTNGP15.phx.gbl...
> > Hi
> > Want to know how to get kerberos to work
> > 3 workstations involved
> > User computer with Windows 2000 runs I.E 6.0 and accesses a web page on
> > Reporting services server (Web Portion-IIS) running windows 2003.
> > USer is running a report that runs an mdx statement on a data server
which
> > is also windows 2003
> > We included in the connection string sspi=kerberos
> > We also when to the domain controller which is windows 2003 and enabled
> > kerberos delegation on the web and data server.
> >
> > We still get the below error
> >
> > An error has occurred during report processing. (rsProcessingAborted)
Get
> > Online Help
> > a.. Cannot create a connection to data source 'OLAP'.
> > (rsErrorOpeningConnection) Get Online Help
> > a.. The operation requested failed due to security problems - the
user
> > could not be authenticated
> > b.. Thanks in advance
> >
> >
> >
>

kerberos

Hi
Want to know how to get kerberos to work
3 workstations involved
User computer with Windows 2000 runs I.E 6.0 and accesses a web page on
Reporting services server (Web Portion-IIS) running windows 2003.
USer is running a report that runs an mdx statement on a data server which
is also windows 2003
We included in the connection string sspi=kerberos
We also when to the domain controller which is windows 2003 and enabled
kerberos delegation on the web and data server.
We still get the below error
An error has occurred during report processing. (rsProcessingAborted) Get
Online Help
a.. Cannot create a connection to data source 'OLAP'.
(rsErrorOpeningConnection) Get Online Help
a.. The operation requested failed due to security problems - the user
could not be authenticated
b.. Thanks in advanceHi Will:
There are some Kerberos troubleshooting tips in the following doc:
HOW TO: Troubleshoot Kerberos-Related Issues in IIS
http://support.microsoft.com/default.aspx?kbid=326985
HTH,
--
Scott
http://www.OdeToCode.com/blogs/scott/
On Fri, 29 Oct 2004 15:52:43 -0400, "Will Byron"
<will.byron@.maxqtech.com> wrote:
>Hi
>Want to know how to get kerberos to work
>3 workstations involved
>User computer with Windows 2000 runs I.E 6.0 and accesses a web page on
>Reporting services server (Web Portion-IIS) running windows 2003.
>USer is running a report that runs an mdx statement on a data server which
>is also windows 2003
>We included in the connection string sspi=kerberos
>We also when to the domain controller which is windows 2003 and enabled
>kerberos delegation on the web and data server.
>We still get the below error
>An error has occurred during report processing. (rsProcessingAborted) Get
>Online Help
> a.. Cannot create a connection to data source 'OLAP'.
>(rsErrorOpeningConnection) Get Online Help
> a.. The operation requested failed due to security problems - the user
>could not be authenticated
> b.. Thanks in advance
>