Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- USE [RentApplicationsMonitoring]
- GO
- /****** Object: Table [dbo].[Tracking] Script Date: 02/17/2011 13:52:22 ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[Tracking](
- [internal_id] [uniqueidentifier] NOT NULL,
- [tracking_id] [nvarchar](50) NULL,
- [timestamp_utc] [datetime] NULL,
- [timestamp_local] [datetime] NULL,
- [machine] [nvarchar](250) NULL,
- [com_application_id] [uniqueidentifier] NULL,
- [com_application_instance_id] [uniqueidentifier] NULL,
- [com_application_name] [nvarchar](250) NULL,
- [application_path] [nvarchar](250) NULL,
- [application_name] [nvarchar](250) NULL,
- [executing_assembly] [nvarchar](500) NULL,
- [thread_id] [int] NULL,
- [process_id] [int] NULL,
- [vb_error_no] [bigint] NULL,
- [source] [nvarchar](250) NULL,
- [local_source] [nvarchar](500) NULL,
- [description] [nvarchar](1000) NULL,
- CONSTRAINT [PK_Tracking] PRIMARY KEY CLUSTERED
- (
- [internal_id] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
- ) ON [PRIMARY]
- GO
- USE [RentApplicationsMonitoring]
- GO
- /****** Object: Table [dbo].[RentTracking] Script Date: 02/17/2011 13:53:25 ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[RentTracking](
- [internal_id] [bigint] IDENTITY(1,1) NOT NULL,
- [link_id] [uniqueidentifier] NULL,
- [uploader] [nvarchar](50) NULL,
- [company_name] [nvarchar](250) NULL,
- [company_id] [int] NULL,
- [xml_file_name] [nvarchar](500) NULL,
- CONSTRAINT [PK_RentTracking] PRIMARY KEY CLUSTERED
- (
- [internal_id] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
- ) ON [PRIMARY]
- GO
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- -- =============================================
- -- Author: Maciek Plewa
- -- Create date: 16/02/2011
- -- Description: Adds a new entry
- -- =============================================
- ALTER PROCEDURE spInsertEvent
- @tracking_id nvarchar(50),
- @timestamp_local datetime,
- @machine nvarchar(250) = null,
- @com_application_id uniqueidentifier = null,
- @com_application_instance_id uniqueidentifier = null,
- @com_application_name nvarchar(250) = null,
- @application_path nvarchar(250) = null,
- @application_name nvarchar(250) = null,
- @executing_assembly nvarchar(500) = null,
- @thread_id int = null,
- @process_id int = null,
- @vb_error_no bigint = null,
- @source nvarchar(250) = null,
- @local_source nvarchar(500) = null,
- @description nvarchar(1000) = null,
- @uploader nvarchar(50) = null,
- @company_name nvarchar(250) = null,
- @company_id int = null,
- @xml_file_name nvarchar(500) = null
- AS
- BEGIN
- -- SET NOCOUNT ON added to prevent extra result sets from
- -- interfering with SELECT statements.
- SET NOCOUNT ON;
- DECLARE @internalID uniqueidentifier
- SET @internalID = newid()
- INSERT INTO [RentApplicationsMonitoring].[dbo].[Tracking]
- ([internal_id]
- ,[tracking_id]
- ,[timestamp_utc]
- ,[timestamp_local]
- ,[machine]
- ,[com_application_id]
- ,[com_application_instance_id]
- ,[com_application_name]
- ,[application_path]
- ,[application_name]
- ,[executing_assembly]
- ,[thread_id]
- ,[process_id]
- ,[vb_error_no]
- ,[source]
- ,[local_source]
- ,[description])
- VALUES
- (@internalID,
- @tracking_id,
- GETUTCDATE(),
- @timestamp_local,
- @machine,
- @com_application_id,
- @com_application_instance_id,
- @com_application_name,
- @application_path,
- @application_name,
- @executing_assembly,
- @thread_id,
- @process_id,
- @vb_error_no,
- @source,
- @local_source,
- @description)
- INSERT INTO [RentApplicationsMonitoring].[dbo].[RentTracking]
- ([link_id]
- ,[uploader]
- ,[company_name]
- ,[company_id]
- ,[xml_file_name])
- VALUES
- (@internalID
- ,@uploader
- ,@company_name
- ,@company_id
- ,@xml_file_name)
- END
- GO
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement