| Creating for blank database | Updating from previous versions |
Version | Table structure | Data | SQL login creation | Upgrade table structure from previous version | Update data from previous version | SQL login creation |
---|
2.2.x | View file |
---|
name | epiCentre2.2 - Create datatables.sql |
---|
height | 150 |
---|
|
| View file |
---|
name | epiCentre2.2 - Insert records.sql |
---|
height | 150 |
---|
|
| View file |
---|
name | epiCentre_login_creation.sql |
---|
height | 150 |
---|
|
epiCentre Azure Create User generic.sql epiCentre Azure Create Logins generic.sql | View file |
---|
name | datatablesAlter_v2.2.sql |
---|
height | 150 |
---|
|
| View file |
---|
name | datarecordAlter_v2.2.sql |
---|
height | 150 |
---|
|
| N/A |
2.1.x | N/A | N/A | View file |
---|
name | datatablesAlter_v2.1.sql |
---|
height | 150 |
---|
|
| View file |
---|
name | datarecordAlter_v2.1.sql |
---|
height | 150 |
---|
|
| N/A |
2.0.x | N/A | N/A | N/A | N/A | View file |
---|
name | epiCentre_login_creation.sql |
---|
height | 150
Useful troubleshooting scripts
Check Role Membership
Code Block |
---|
|
SELECT roles.principal_id AS RolePrincipalID
,roles.name AS RolePrincipalName
,database_role_members.member_principal_id AS MemberPrincipalID
,members.name AS MemberPrincipalName
FROM sys.database_role_members AS database_role_members
JOIN sys.database_principals AS roles
ON database_role_members.role_principal_id = roles.principal_id
JOIN sys.database_principals AS members
ON database_role_members.member_principal_id = members.principal_id;
GO |
Check Logins in azure
Code Block |
---|
|
SELECT * FROM sys.sql_logins -- you need to execute this on master azure db
SELECT * FROM sys.database_principals -- you need to execute this on the database of interest |
Code Block |
---|
|
SELECT DP1.name AS DatabaseRoleName,
isnull (DP2.name, 'No members') AS DatabaseUserName
FROM sys.database_role_members AS DRM
RIGHT OUTER JOIN sys.database_principals AS DP1
ON DRM.role_principal_id = DP1.principal_id
LEFT OUTER JOIN sys.database_principals AS DP2
ON DRM.member_principal_id = DP2.principal_id
WHERE DP1.type = 'R'
ORDER BY DP1.name; |