At line 1 added 3 lines |
__IMPORTANT: due to the security updates since CrushFTP version 10.5.2+ any JDBC driver jar file needs to be placed into the CrushFTP10/plugins/lib/ directory, or it won't load.__ |
\\ |
\\ |
At line 27 added 149 lines |
|
\\ |
\\ |
If you have multiple servers dumping logs to the same table, make a new column for autonumbering and have that be primary key. Do not use the default primary key or there will be problems logging and the servers will run out of memory.\\ |
\\ |
And a more optimized and tweaked version for MS SQL: |
|
{{{ |
-- DATABASE CREATION |
|
USE [master] |
GO |
|
|
CREATE DATABASE [CrushFTPDB] |
CONTAINMENT = NONE |
ON PRIMARY |
( NAME = N'CrushFTPDB', FILENAME = N'D:\SQLServer\data\CrushFTPDB.mdf' , SIZE = 5120KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB ) |
LOG ON |
( NAME = N'CrushFTPDB_log', FILENAME = N'C:\SQLServer\logs\CrushFTPDB_log.ldf' , SIZE = 4608KB , MAXSIZE = 2048GB , FILEGROWTH = 10%) |
GO |
|
ALTER DATABASE [CrushFTPDB] SET COMPATIBILITY_LEVEL = 110 |
GO |
|
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled')) |
begin |
EXEC [CrushFTPDB].[dbo].[sp_fulltext_database] @action = 'enable' |
end |
GO |
|
ALTER DATABASE [CrushFTPDB] SET ANSI_NULL_DEFAULT OFF |
GO |
|
ALTER DATABASE [CrushFTPDB] SET ANSI_NULLS OFF |
GO |
|
ALTER DATABASE [CrushFTPDB] SET ANSI_PADDING OFF |
GO |
|
ALTER DATABASE [CrushFTPDB] SET ANSI_WARNINGS OFF |
GO |
|
ALTER DATABASE [CrushFTPDB] SET ARITHABORT OFF |
GO |
|
ALTER DATABASE [CrushFTPDB] SET AUTO_CLOSE OFF |
GO |
|
ALTER DATABASE [CrushFTPDB] SET AUTO_CREATE_STATISTICS ON |
GO |
|
ALTER DATABASE [CrushFTPDB] SET AUTO_SHRINK OFF |
GO |
|
ALTER DATABASE [CrushFTPDB] SET AUTO_UPDATE_STATISTICS ON |
GO |
|
ALTER DATABASE [CrushFTPDB] SET CURSOR_CLOSE_ON_COMMIT OFF |
GO |
|
ALTER DATABASE [CrushFTPDB] SET CURSOR_DEFAULT GLOBAL |
GO |
|
ALTER DATABASE [CrushFTPDB] SET CONCAT_NULL_YIELDS_NULL OFF |
GO |
|
ALTER DATABASE [CrushFTPDB] SET NUMERIC_ROUNDABORT OFF |
GO |
|
ALTER DATABASE [CrushFTPDB] SET QUOTED_IDENTIFIER OFF |
GO |
|
ALTER DATABASE [CrushFTPDB] SET RECURSIVE_TRIGGERS OFF |
GO |
|
ALTER DATABASE [CrushFTPDB] SET DISABLE_BROKER |
GO |
|
ALTER DATABASE [CrushFTPDB] SET AUTO_UPDATE_STATISTICS_ASYNC OFF |
GO |
|
ALTER DATABASE [CrushFTPDB] SET DATE_CORRELATION_OPTIMIZATION OFF |
GO |
|
ALTER DATABASE [CrushFTPDB] SET TRUSTWORTHY OFF |
GO |
|
ALTER DATABASE [CrushFTPDB] SET ALLOW_SNAPSHOT_ISOLATION OFF |
GO |
|
ALTER DATABASE [CrushFTPDB] SET PARAMETERIZATION SIMPLE |
GO |
|
ALTER DATABASE [CrushFTPDB] SET READ_COMMITTED_SNAPSHOT OFF |
GO |
|
ALTER DATABASE [CrushFTPDB] SET HONOR_BROKER_PRIORITY OFF |
GO |
|
ALTER DATABASE [CrushFTPDB] SET RECOVERY FULL |
GO |
|
ALTER DATABASE [CrushFTPDB] SET MULTI_USER |
GO |
|
ALTER DATABASE [CrushFTPDB] SET PAGE_VERIFY CHECKSUM |
GO |
|
ALTER DATABASE [CrushFTPDB] SET DB_CHAINING OFF |
GO |
|
ALTER DATABASE [CrushFTPDB] SET FILESTREAM( NON_TRANSACTED_ACCESS = OFF ) |
GO |
|
ALTER DATABASE [CrushFTPDB] SET TARGET_RECOVERY_TIME = 0 SECONDS |
GO |
|
ALTER DATABASE [CrushFTPDB] SET READ_WRITE |
GO |
|
|
|
-- TABLE CREATION |
|
USE [CrushFTPDB] |
GO |
|
SET ANSI_NULLS ON |
GO |
SET QUOTED_IDENTIFIER ON |
GO |
SET ANSI_PADDING ON |
GO |
CREATE TABLE [dbo].[CRUSHFTP_LOG]( |
[LOG_ROW_NUM] [bigint] NOT NULL, |
[LOG_MILLIS] [bigint] NULL, |
[LOG_TAG] [varchar](50) NULL, |
[LOG_DATA] [nvarchar](max) NULL, |
CONSTRAINT [PK_CRUSHFTP_LOG] PRIMARY KEY CLUSTERED |
( |
[LOG_ROW_NUM] ASC |
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] |
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] |
|
GO |
SET ANSI_PADDING OFF |
GO |
}}} |