Configuration SQL Server
  • 24 Nov 2022
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Configuration SQL Server

  • Dark
    Light
  • PDF

Article summary

USE [constellio]
Go
 
SET ANSI_NULLS ON
Go
SET QUOTED_IDENTIFIER ON
Go
CREATE TABLE [dbo]. [records] (
        [id] [uniqueidentifier] NOT NULL,
        [recordId] [nvarchar](50) NOT NULL,
        [solrVersion] [nvarchar](50) NULL,
        [content] [nvarchar](max) NULL,
        [logVersion] [int] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
Go
 
SET ANSI_NULLS ON
Go
SET QUOTED_IDENTIFIER ON
Go
CREATE TABLE [dbo]. [transactions] (
        [id] [uniqueidentifier] NOT NULL,
        [transactionUUID] [nvarchar](50) NOT NULL,
        [timestamp] [datetime] NOT NULL,
        [logVersion] [int] NOT NULL,
        [transactionSummary] [nvarchar](max) NULL,
        [content] [nvarchar](max) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
Go
 
SET ANSI_NULLS ON
Go
SET QUOTED_IDENTIFIER ON
Go
CREATE TABLE [dbo]. [versions] (
        [name] [varchar](20) NOT NULL,
        [version] [int] NULL
) ON [PRIMARY]
Go
ALTER TABLE [dbo]. [records] ADD  DEFAULT (newid()) FOR [id]
Go
ALTER TABLE [dbo]. [transactions] ADD  DEFAULT (newid()) FOR [id]
Go
ALTER TABLE [dbo]. [transactions] ADD  CONSTRAINT [DF_transaction_timestamp] DEFAULT (getdate()) FOR [timestamp]  
Go
 

 

Configuration (constellio.properties file): 

sql.server.url=jdbc:sqlserver://<host>\\...
 sql.server.database=constellio
 sql.server.user=<user>
 sql.server.password=<password>
 sql.server.encrypt=true

# Optional, reference: https://docs.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlconnectionstringbuilder.trustservercertificate?view=dotnet-plat-ext-6.0
 sql.server.trustServerCertificate=true
 sql.server.loginTimeout=15


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.