Skip to content

Instantly share code, notes, and snippets.

@SidShetye
Last active July 24, 2021 00:40
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SidShetye/f0d51beb5cc5858b92bb to your computer and use it in GitHub Desktop.
Save SidShetye/f0d51beb5cc5858b92bb to your computer and use it in GitHub Desktop.
This is the SQL Server script for creating a Jira compatible SQL Server database/login
-- Outline https://confluence.atlassian.com/display/JIRA/Connecting+JIRA+to+SQL+Server+2012
-- Create the database
CREATE DATABASE jiradb;
GO
ALTER DATABASE jiradb COLLATE SQL_Latin1_General_CP437_CI_AI;
GO
ALTER DATABASE jiradb
SET READ_COMMITTED_SNAPSHOT ON
WITH ROLLBACK IMMEDIATE;
GO
-- Switch to the context of the database
USE jiradb;
GO
-- Creates the login AbolrousHazem with password 'mySuperSecretPassword3210'
CREATE LOGIN jirauser WITH PASSWORD = 'mySuperSecretPassword3210';
GO
-- Creates a database user for the login created above.
CREATE USER jirauser FOR LOGIN jirauser;
GO
CREATE SCHEMA jiraschema;
GO
EXEC sp_addrolemember N'db_owner', N'jirauser'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment