Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-02-11 : 08:52:02
|
| Rajesh writes "Is there any event/trigger for session login/logout.I have couple of applications like.(I have sql server7.0 & win98.)(1)I need to define the loginhours for normal users. The sa may login anytime.How do i achieve this?(2)A customised welcome or goodbye message depending on the login(or sys_user).(3)To keep track of login time, logouttime, sysuser on a particular day." |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-02-11 : 09:22:31
|
| You can use SQL Server to store the information that allows you to process this, but the actual login maintenance needs to be done at the application level. If you have a single application front-end for people to use this database, then you're in good shape. But if anyone can connect using any kind of application (MS Access, Excel, Query Analyzer, etc.) then you're out of luck. There's no way to automatically prevent people from logging in to SQL Server. The best you can do is have a job run periodically and kill any processes for people who log in when they shouldn't. If this even works, it'll require so much effort as to not be practical. And it won't prevent someone from logging in, issuing a query, and logging out before the process kicks them out. Someone could easily jump in, run TRUNCATE TABLE, and be out in this kind of time period, for example. That's not secure at all. |
 |
|
|
Nazim
A custom title
1408 Posts |
Posted - 2002-02-11 : 09:45:58
|
| Another Option can be allowing the user to work only with Trusted Connections and on your NT login defining your time frames.--------------------------------------------------------------"Happiness is not something you experience, it's something you remember." |
 |
|
|
|
|
|
|
|