Questions tagged [logon-trigger]

11 questions
5
votes
3 answers

SQL Server Logon Trigger Implications - are there any side effects possible in my scenario?

Some of developers on my team know passwords from SQL accounts that have extended permissions We would like to track and be alerted whenever any of developers are using any of those SQL accounts to connect We are about to implement logon trigger…
1
vote
0 answers

SQL Server Logon Trigger Error after server restart

I have a logon trigger running that is executing as another user to log connection details. It works totally fine without issue except right after a server reboot. At that point, I have to connect to the server via the DAC and disable it. Then I…
0
votes
1 answer

Logon Trigger On HA

Here is the setup: on MSSQL-Server-2022, we have a contained availability group with 4 replicas: 3 synchronous, 1 asynchronous, and a listener. We created a logon trigger to limit access to a specific login from only one IP address. The trigger…
0
votes
1 answer

Can not create logon trigger on AWS RDS sql server instance

In order to audit logins I've used before a server level trigger catching the LOGON and saving it to a table, there are endless examples to do this. But trying to do the same on and AWS RDS sqlserver instance fails with error Cannot create the…
Yaroslav
  • 2,837
  • 4
  • 29
  • 41
0
votes
2 answers

Oracle 12cR2 - After Logon Exception

Logon trigger as below: create or replace TRIGGER USER3.MY_TRIGGER AFTER LOGON ON DATABASE BEGIN IF SYS_CONTEXT ('USERENV', 'SESSION_USER') IN ('USER30') THEN IF SYS_CONTEXT ('USERENV', 'HOST') NOT IN ('HOST1', 'HOST2', 'HOST3', 'HOST4') THEN INSERT…
jrdba123
  • 29
  • 2
  • 12
0
votes
1 answer

Its possible create a trigger after every transact in all DB? (SQL SERVER)

I have 100+ databases in my instace of SQL SERVER and mostly is a legacy DB but i dont have a control of what is new and what is old. My idea is create a Trigger in all server for every transact and INSERT in table for audit. I create this table on…
0
votes
1 answer

Oracle 12c - Logon Trigger According To Machine Information

I want to create a logon trigger. Trigger will do the following: It will block access to the database based on certain users and certain machine information. Then it will give an information message to the user and insert this session information…
jrdba123
  • 29
  • 2
  • 12
0
votes
1 answer

High Latch Wait time with Logon trigger enabled while full backups are running

I have 14 production servers with SQL 2016 standard version, 128 gb of RAM, 16 CPU and SSD drives. Microsoft SQL Server 2016 (SP2-CU15-GDR) (KB4583461) - 13.0.5865.1 (X64) Oct 31 2020 02:43:57 Copyright (c) Microsoft Corporation Standard…
0
votes
3 answers

Safe and secure implementation of logon trigger in SQL Server 2014 Express edition?

I've to implement the following requirement: Access to SQL Server instance shall be allowed only from a C# application. Users shall not be able to access any database (even those in which they have access) via SQLCMD, SSMS. Access using SSMS shall…
Elena2020
  • 71
  • 8
-1
votes
1 answer

SQL Server EVENTDATA.ApplicationName vs APP_NAME()

I have created the following test environment: USE [OmegaCoreAudit] GO /****** Object: Table [dbo].[TEST_TRAIL] Script Date: 6/9/2025 8:02:50 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TEST_TRAIL]( …
altink
  • 129
  • 5
-1
votes
2 answers

How to find out what is adding a login trigger to my MSSQLLocalDB?

I keep having trouble with logging into (localdb)\MSSQLLocalDB. It gives the error: Logon failed for login 'Domain\user' due to trigger execution. Changed database context to 'master'. Changed language setting to us_english. When in this state I…
Martin Brown
  • 728
  • 1
  • 5
  • 15