Created
May 18, 2016 20:31
-
-
Save cathode/cc54415f7ffb27480d12cfa25f3cb2e5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE TABLE [dbo].[SessionParameters] | |
| ( | |
| [SessionId] SMALLINT NOT NULL, | |
| [PKey] NVARCHAR(128) NOT NULL, | |
| [PValue] NVARCHAR(MAX) NULL, | |
| CONSTRAINT [PK_SessionParameters] PRIMARY KEY ([SessionId], [PKey]) | |
| ) | |
| GO | |
| CREATE VIEW [dbo].[UserSessionParameters] | |
| AS SELECT | |
| [PKey], | |
| [PValue] | |
| FROM [SessionParameters] | |
| WHERE [SessionParameters].[SessionId] = @@SPID | |
| GO | |
| INSERT INTO [dbo].[UserSessionParameters] VALUES ('LogonTime', GETDATE()) | |
| GO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment