Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Create table for dbatools.io function WatchDbLogins to log to
USE [DatabaseLogins]
CREATE TABLE [dbo].[DbaTools-WatchDbLogins](
[ComputerName] [nvarchar](max) NULL,
[InstanceName] [nvarchar](max) NULL,
[SqlInstance] [nvarchar](max) NULL,
[LoginTime] [datetime2](7) NULL,
[Login] [nvarchar](max) NULL,
[Host] [nvarchar](max) NULL,
[Program] [nvarchar](max) NULL,
[DatabaseId] [smallint] NULL,
[Database] [nvarchar](max) NULL,
[IsSystem] [bit] NULL,
[CaptureTime] [datetime2](7) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.