Configuration SQL Server
- 24 Nov 2022
- 1 Minute to read
- Contributors
- Print
- DarkLight
- PDF
Configuration SQL Server
- Updated on 24 Nov 2022
- 1 Minute to read
- Contributors
- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
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?