Configuration SQL Server
  • 12 Jul 2022
  • 1 Minute à lire
  • Contributeurs
  • Sombre
    Clair
  • PDF

Configuration SQL Server

  • Sombre
    Clair
  • PDF

Résumé de l’article

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 (fichier constellio.properties) : 

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

# Optionnel, référence : 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


Cet article vous a-t-il été utile ?

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.