Upon a client connecting to the server, is there an 'OnClientConnected'
-equivalent event on the server side that I can put some code to check who
has just connected or what application or workstation is connecting? I'm
looking for some way to check for 'valid' client applications.You can execute queries to view connection, session
information. In SQL Server 2000, query the sysprocesses
table in the master database. In SQL Server 2005, you can
query the dynamic management view sys.dm_exec_sessions. Both
have login times, host, program name and other info.
What you do from there depends on what you are trying to do
and what version of SQL Server may determine what options
are available to use.
-Sue
On Tue, 14 Feb 2006 13:25:28 -0800, "Trex"
<Trex@.community.nospam> wrote:
>Upon a client connecting to the server, is there an 'OnClientConnected'
>-equivalent event on the server side that I can put some code to check who
>has just connected or what application or workstation is connecting? I'm
>looking for some way to check for 'valid' client applications.|||Hello Trex,
You may want to consider to capture the audit logon/logoff event and store
them to a SQL table. Then you could use notification service to notfiy when
the insertion meets to requirment.
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.
--
>Thread-Topic: An 'OnClientConnected' on the Server side
>thread-index: AcYxrS0jasuUvcWgTpCZHnrqfgbL3A==
>X-WBNR-Posting-Host: 152.130.15.18
>From: "examnotes" <Trex@.community.nospam>
>Subject: An 'OnClientConnected' on the Server side
>Date: Tue, 14 Feb 2006 13:25:28 -0800
>Lines: 4
>Message-ID: <C4E19CC4-603C-4FD8-8044-96A28661C246@.microsoft.com>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="Utf-8"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Content-Class: urn:content-classes:message
>Importance: normal
>Priority: normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Newsgroups: microsoft.public.sqlserver.connect
>NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
>Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
>Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.connect:46902
>X-Tomcat-NG: microsoft.public.sqlserver.connect
>Upon a client connecting to the server, is there an 'OnClientConnected'
>-equivalent event on the server side that I can put some code to check who
>has just connected or what application or workstation is connecting? I'm
>looking for some way to check for 'valid' client applications.
>|||Sounds like a solution. I can monitor this and kill a process if I don't
like what I see. Thank you Sue!
"Sue Hoegemeier" wrote:
> You can execute queries to view connection, session
> information. In SQL Server 2000, query the sysprocesses
> table in the master database. In SQL Server 2005, you can
> query the dynamic management view sys.dm_exec_sessions. Both
> have login times, host, program name and other info.
> What you do from there depends on what you are trying to do
> and what version of SQL Server may determine what options
> are available to use.
> -Sue
> On Tue, 14 Feb 2006 13:25:28 -0800, "Trex"
> <Trex@.community.nospam> wrote:
>
>|||Thank you Peter...this may be another possiblity for me!
"Peter Yang [MSFT]" wrote:
> Hello Trex,
> You may want to consider to capture the audit logon/logoff event and store
> them to a SQL table. Then you could use notification service to notfiy whe
n
> the insertion meets to requirment.
> Best Regards,
> Peter Yang
> MCSE2000/2003, MCSA, MCDBA
> Microsoft Online Partner Support
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ========================================
=============
>
> This posting is provided "AS IS" with no warranties, and confers no rights
.
>
> --
>
Showing posts with label upon. Show all posts
Showing posts with label upon. Show all posts
Tuesday, March 20, 2012
An 'OnClientConnected' on the Server side
Upon a client connecting to the server, is there an 'OnClientConnected'
-equivalent event on the server side that I can put some code to check who
has just connected or what application or workstation is connecting? I'm
looking for some way to check for 'valid' client applications.
You can execute queries to view connection, session
information. In SQL Server 2000, query the sysprocesses
table in the master database. In SQL Server 2005, you can
query the dynamic management view sys.dm_exec_sessions. Both
have login times, host, program name and other info.
What you do from there depends on what you are trying to do
and what version of SQL Server may determine what options
are available to use.
-Sue
On Tue, 14 Feb 2006 13:25:28 -0800, "Trex"
<Trex@.community.nospam> wrote:
>Upon a client connecting to the server, is there an 'OnClientConnected'
>-equivalent event on the server side that I can put some code to check who
>has just connected or what application or workstation is connecting? I'm
>looking for some way to check for 'valid' client applications.
|||Hello Trex,
You may want to consider to capture the audit logon/logoff event and store
them to a SQL table. Then you could use notification service to notfiy when
the insertion meets to requirment.
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
================================================== ===
This posting is provided "AS IS" with no warranties, and confers no rights.
--
>Thread-Topic: An 'OnClientConnected' on the Server side
>thread-index: AcYxrS0jasuUvcWgTpCZHnrqfgbL3A==
>X-WBNR-Posting-Host: 152.130.15.18
>From: "=?Utf-8?B?VHJleA==?=" <Trex@.community.nospam>
>Subject: An 'OnClientConnected' on the Server side
>Date: Tue, 14 Feb 2006 13:25:28 -0800
>Lines: 4
>Message-ID: <C4E19CC4-603C-4FD8-8044-96A28661C246@.microsoft.com>
>MIME-Version: 1.0
>Content-Type: text/plain;
>charset="Utf-8"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Content-Class: urn:content-classes:message
>Importance: normal
>Priority: normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Newsgroups: microsoft.public.sqlserver.connect
>NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
>Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
>Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.connect:46902
>X-Tomcat-NG: microsoft.public.sqlserver.connect
>Upon a client connecting to the server, is there an 'OnClientConnected'
>-equivalent event on the server side that I can put some code to check who
>has just connected or what application or workstation is connecting? I'm
>looking for some way to check for 'valid' client applications.
>
|||Sounds like a solution. I can monitor this and kill a process if I don't
like what I see. Thank you Sue!
"Sue Hoegemeier" wrote:
> You can execute queries to view connection, session
> information. In SQL Server 2000, query the sysprocesses
> table in the master database. In SQL Server 2005, you can
> query the dynamic management view sys.dm_exec_sessions. Both
> have login times, host, program name and other info.
> What you do from there depends on what you are trying to do
> and what version of SQL Server may determine what options
> are available to use.
> -Sue
> On Tue, 14 Feb 2006 13:25:28 -0800, "Trex"
> <Trex@.community.nospam> wrote:
>
>
|||Thank you Peter...this may be another possiblity for me!
"Peter Yang [MSFT]" wrote:
> Hello Trex,
> You may want to consider to capture the audit logon/logoff event and store
> them to a SQL table. Then you could use notification service to notfiy when
> the insertion meets to requirment.
> Best Regards,
> Peter Yang
> MCSE2000/2003, MCSA, MCDBA
> Microsoft Online Partner Support
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ================================================== ===
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> --
>
sql
-equivalent event on the server side that I can put some code to check who
has just connected or what application or workstation is connecting? I'm
looking for some way to check for 'valid' client applications.
You can execute queries to view connection, session
information. In SQL Server 2000, query the sysprocesses
table in the master database. In SQL Server 2005, you can
query the dynamic management view sys.dm_exec_sessions. Both
have login times, host, program name and other info.
What you do from there depends on what you are trying to do
and what version of SQL Server may determine what options
are available to use.
-Sue
On Tue, 14 Feb 2006 13:25:28 -0800, "Trex"
<Trex@.community.nospam> wrote:
>Upon a client connecting to the server, is there an 'OnClientConnected'
>-equivalent event on the server side that I can put some code to check who
>has just connected or what application or workstation is connecting? I'm
>looking for some way to check for 'valid' client applications.
|||Hello Trex,
You may want to consider to capture the audit logon/logoff event and store
them to a SQL table. Then you could use notification service to notfiy when
the insertion meets to requirment.
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
================================================== ===
This posting is provided "AS IS" with no warranties, and confers no rights.
--
>Thread-Topic: An 'OnClientConnected' on the Server side
>thread-index: AcYxrS0jasuUvcWgTpCZHnrqfgbL3A==
>X-WBNR-Posting-Host: 152.130.15.18
>From: "=?Utf-8?B?VHJleA==?=" <Trex@.community.nospam>
>Subject: An 'OnClientConnected' on the Server side
>Date: Tue, 14 Feb 2006 13:25:28 -0800
>Lines: 4
>Message-ID: <C4E19CC4-603C-4FD8-8044-96A28661C246@.microsoft.com>
>MIME-Version: 1.0
>Content-Type: text/plain;
>charset="Utf-8"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Content-Class: urn:content-classes:message
>Importance: normal
>Priority: normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Newsgroups: microsoft.public.sqlserver.connect
>NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
>Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
>Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.connect:46902
>X-Tomcat-NG: microsoft.public.sqlserver.connect
>Upon a client connecting to the server, is there an 'OnClientConnected'
>-equivalent event on the server side that I can put some code to check who
>has just connected or what application or workstation is connecting? I'm
>looking for some way to check for 'valid' client applications.
>
|||Sounds like a solution. I can monitor this and kill a process if I don't
like what I see. Thank you Sue!
"Sue Hoegemeier" wrote:
> You can execute queries to view connection, session
> information. In SQL Server 2000, query the sysprocesses
> table in the master database. In SQL Server 2005, you can
> query the dynamic management view sys.dm_exec_sessions. Both
> have login times, host, program name and other info.
> What you do from there depends on what you are trying to do
> and what version of SQL Server may determine what options
> are available to use.
> -Sue
> On Tue, 14 Feb 2006 13:25:28 -0800, "Trex"
> <Trex@.community.nospam> wrote:
>
>
|||Thank you Peter...this may be another possiblity for me!
"Peter Yang [MSFT]" wrote:
> Hello Trex,
> You may want to consider to capture the audit logon/logoff event and store
> them to a SQL table. Then you could use notification service to notfiy when
> the insertion meets to requirment.
> Best Regards,
> Peter Yang
> MCSE2000/2003, MCSA, MCDBA
> Microsoft Online Partner Support
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ================================================== ===
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> --
>
sql
Labels:
client,
code,
connecting,
database,
event,
microsoft,
mysql,
onclientconnected,
onclientconnected-equivalent,
oracle,
server,
sql,
upon
Wednesday, March 7, 2012
An alert...of sorts
I have written a report which, depending upon the data year you want to analyze, runs against different databases. If you want the 1987 data, for example, you pull from the 1987 database, and so on.
It is no problem to change ("update") the files to the correct year and then run the report...when you remember to do it.
Is there a way to put an "alert" or something into the report which reminds the user to "update" the data files before actually running the report? What would the syntax be?
Or better yet, is there a way to automate the "update" files process based on a parameter such as [?Year}?Alternatives :
-Develop a small application in a visual language (Delphi, VisualBasic, FoxPro)
-Copy the report for each year and name them and configure them accordingly (Report1987, Report1988, and so on)
It is no problem to change ("update") the files to the correct year and then run the report...when you remember to do it.
Is there a way to put an "alert" or something into the report which reminds the user to "update" the data files before actually running the report? What would the syntax be?
Or better yet, is there a way to automate the "update" files process based on a parameter such as [?Year}?Alternatives :
-Develop a small application in a visual language (Delphi, VisualBasic, FoxPro)
-Copy the report for each year and name them and configure them accordingly (Report1987, Report1988, and so on)
Thursday, February 16, 2012
Amazing scenario
OK Here it is.
The production database was detached so it could be moved. Upon
reattachment it decided it was corrupt and refused to allow me to reattach.
Another member of the dba team had a physical copy of the MDF and LDF from a
few days ago. He copied the current files off for safe keeping and
reattached the old copy. Now he wants to apply the current LDF log to the 5
day old database that was attached. Is this possible?
This nightmare is neverending. Please someone help!
Richard> He copied the current files off for safe keeping and reattached the old copy. Now he wants to
> apply the current LDF log to the 5 day old database that was attached. Is this possible?
No, SQL Server keep track of the internal "timestamp" of the database files and you have to attach
from the same point in time. Otherwise, we would have chaos.
I suggest you open a ticket with MS Support and see if they can assist with the attach. I always do
a DBCC CHECKDB and also a backup before these things, btw...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Richard Douglass" <RDouglass@.arisinc.com> wrote in message
news:uDSpGga3GHA.5024@.TK2MSFTNGP02.phx.gbl...
> OK Here it is.
> The production database was detached so it could be moved. Upon reattachment it decided it was
> corrupt and refused to allow me to reattach. Another member of the dba team had a physical copy of
> the MDF and LDF from a few days ago. He copied the current files off for safe keeping and
> reattached the old copy. Now he wants to apply the current LDF log to the 5 day old database that
> was attached. Is this possible?
> This nightmare is neverending. Please someone help!
> Richard
>
The production database was detached so it could be moved. Upon
reattachment it decided it was corrupt and refused to allow me to reattach.
Another member of the dba team had a physical copy of the MDF and LDF from a
few days ago. He copied the current files off for safe keeping and
reattached the old copy. Now he wants to apply the current LDF log to the 5
day old database that was attached. Is this possible?
This nightmare is neverending. Please someone help!
Richard> He copied the current files off for safe keeping and reattached the old copy. Now he wants to
> apply the current LDF log to the 5 day old database that was attached. Is this possible?
No, SQL Server keep track of the internal "timestamp" of the database files and you have to attach
from the same point in time. Otherwise, we would have chaos.
I suggest you open a ticket with MS Support and see if they can assist with the attach. I always do
a DBCC CHECKDB and also a backup before these things, btw...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Richard Douglass" <RDouglass@.arisinc.com> wrote in message
news:uDSpGga3GHA.5024@.TK2MSFTNGP02.phx.gbl...
> OK Here it is.
> The production database was detached so it could be moved. Upon reattachment it decided it was
> corrupt and refused to allow me to reattach. Another member of the dba team had a physical copy of
> the MDF and LDF from a few days ago. He copied the current files off for safe keeping and
> reattached the old copy. Now he wants to apply the current LDF log to the 5 day old database that
> was attached. Is this possible?
> This nightmare is neverending. Please someone help!
> Richard
>
Thursday, February 9, 2012
Alternative to IIF ? Case ?
Hi,
Need to display a value in a text box based upon perhaps one of four
values a parameter could have. This example is great for two values, = iif(UCASE(Parameters!SUPPID.Value) ="HHH", "Defense & Space", "Defense")
Is there an alternative , case... anything if we need to test for over
parameter values i.e. HHH1, or HHH2.
Many thanks, Steve.Try Switch:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vafctSwitch.asp
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"saustin99" <saustin99@.discussions.microsoft.com> wrote in message
news:77DEB13A-6813-415E-A4A2-58190F3A7CF4@.microsoft.com...
> Hi,
> Need to display a value in a text box based upon perhaps one of four
> values a parameter could have. This example is great for two values, => iif(UCASE(Parameters!SUPPID.Value) ="HHH", "Defense & Space", "Defense")
> Is there an alternative , case... anything if we need to test for over
> parameter values i.e. HHH1, or HHH2.
> Many thanks, Steve.|||Report parameters have a Value and a Label property. You could use the Label
property for this purpose.
Regarding alternatives for IIF please check the following MSDN links:
* =Choose(...)
http://msdn.microsoft.com/library/en-us/vblr7/html/vafctchoose.asp
* =Switch(...)
http://msdn.microsoft.com/library/en-us/vblr7/html/vafctswitch.asp
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"saustin99" <saustin99@.discussions.microsoft.com> wrote in message
news:77DEB13A-6813-415E-A4A2-58190F3A7CF4@.microsoft.com...
> Hi,
> Need to display a value in a text box based upon perhaps one of four
> values a parameter could have. This example is great for two values, => iif(UCASE(Parameters!SUPPID.Value) ="HHH", "Defense & Space", "Defense")
> Is there an alternative , case... anything if we need to test for over
> parameter values i.e. HHH1, or HHH2.
> Many thanks, Steve.|||Thank you Robert !
"Robert Bruckner [MSFT]" wrote:
> Report parameters have a Value and a Label property. You could use the Label
> property for this purpose.
> Regarding alternatives for IIF please check the following MSDN links:
> * =Choose(...)
> http://msdn.microsoft.com/library/en-us/vblr7/html/vafctchoose.asp
> * =Switch(...)
> http://msdn.microsoft.com/library/en-us/vblr7/html/vafctswitch.asp
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "saustin99" <saustin99@.discussions.microsoft.com> wrote in message
> news:77DEB13A-6813-415E-A4A2-58190F3A7CF4@.microsoft.com...
> > Hi,
> > Need to display a value in a text box based upon perhaps one of four
> > values a parameter could have. This example is great for two values, => > iif(UCASE(Parameters!SUPPID.Value) ="HHH", "Defense & Space", "Defense")
> >
> > Is there an alternative , case... anything if we need to test for over
> > parameter values i.e. HHH1, or HHH2.
> >
> > Many thanks, Steve.
>
>|||Switch rocks !!! Thanks Jeff. Happy New year.
"Jeff A. Stucker" wrote:
> Try Switch:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vafctSwitch.asp
> --
> Cheers,
> '(' Jeff A. Stucker
> \
> Business Intelligence
> www.criadvantage.com
> ---
> "saustin99" <saustin99@.discussions.microsoft.com> wrote in message
> news:77DEB13A-6813-415E-A4A2-58190F3A7CF4@.microsoft.com...
> > Hi,
> > Need to display a value in a text box based upon perhaps one of four
> > values a parameter could have. This example is great for two values, => > iif(UCASE(Parameters!SUPPID.Value) ="HHH", "Defense & Space", "Defense")
> >
> > Is there an alternative , case... anything if we need to test for over
> > parameter values i.e. HHH1, or HHH2.
> >
> > Many thanks, Steve.
>
>
Need to display a value in a text box based upon perhaps one of four
values a parameter could have. This example is great for two values, = iif(UCASE(Parameters!SUPPID.Value) ="HHH", "Defense & Space", "Defense")
Is there an alternative , case... anything if we need to test for over
parameter values i.e. HHH1, or HHH2.
Many thanks, Steve.Try Switch:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vafctSwitch.asp
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"saustin99" <saustin99@.discussions.microsoft.com> wrote in message
news:77DEB13A-6813-415E-A4A2-58190F3A7CF4@.microsoft.com...
> Hi,
> Need to display a value in a text box based upon perhaps one of four
> values a parameter could have. This example is great for two values, => iif(UCASE(Parameters!SUPPID.Value) ="HHH", "Defense & Space", "Defense")
> Is there an alternative , case... anything if we need to test for over
> parameter values i.e. HHH1, or HHH2.
> Many thanks, Steve.|||Report parameters have a Value and a Label property. You could use the Label
property for this purpose.
Regarding alternatives for IIF please check the following MSDN links:
* =Choose(...)
http://msdn.microsoft.com/library/en-us/vblr7/html/vafctchoose.asp
* =Switch(...)
http://msdn.microsoft.com/library/en-us/vblr7/html/vafctswitch.asp
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"saustin99" <saustin99@.discussions.microsoft.com> wrote in message
news:77DEB13A-6813-415E-A4A2-58190F3A7CF4@.microsoft.com...
> Hi,
> Need to display a value in a text box based upon perhaps one of four
> values a parameter could have. This example is great for two values, => iif(UCASE(Parameters!SUPPID.Value) ="HHH", "Defense & Space", "Defense")
> Is there an alternative , case... anything if we need to test for over
> parameter values i.e. HHH1, or HHH2.
> Many thanks, Steve.|||Thank you Robert !
"Robert Bruckner [MSFT]" wrote:
> Report parameters have a Value and a Label property. You could use the Label
> property for this purpose.
> Regarding alternatives for IIF please check the following MSDN links:
> * =Choose(...)
> http://msdn.microsoft.com/library/en-us/vblr7/html/vafctchoose.asp
> * =Switch(...)
> http://msdn.microsoft.com/library/en-us/vblr7/html/vafctswitch.asp
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "saustin99" <saustin99@.discussions.microsoft.com> wrote in message
> news:77DEB13A-6813-415E-A4A2-58190F3A7CF4@.microsoft.com...
> > Hi,
> > Need to display a value in a text box based upon perhaps one of four
> > values a parameter could have. This example is great for two values, => > iif(UCASE(Parameters!SUPPID.Value) ="HHH", "Defense & Space", "Defense")
> >
> > Is there an alternative , case... anything if we need to test for over
> > parameter values i.e. HHH1, or HHH2.
> >
> > Many thanks, Steve.
>
>|||Switch rocks !!! Thanks Jeff. Happy New year.
"Jeff A. Stucker" wrote:
> Try Switch:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vafctSwitch.asp
> --
> Cheers,
> '(' Jeff A. Stucker
> \
> Business Intelligence
> www.criadvantage.com
> ---
> "saustin99" <saustin99@.discussions.microsoft.com> wrote in message
> news:77DEB13A-6813-415E-A4A2-58190F3A7CF4@.microsoft.com...
> > Hi,
> > Need to display a value in a text box based upon perhaps one of four
> > values a parameter could have. This example is great for two values, => > iif(UCASE(Parameters!SUPPID.Value) ="HHH", "Defense & Space", "Defense")
> >
> > Is there an alternative , case... anything if we need to test for over
> > parameter values i.e. HHH1, or HHH2.
> >
> > Many thanks, Steve.
>
>
Subscribe to:
Posts (Atom)