Cybersecurity
DevOps Cloud
IT Operations Cloud
Summary
IF (NOT EXISTS (SELECT * FROM sys.schemas WHERE name = 'td')) BEGIN EXEC ('CREATE SCHEMA [td] AUTHORIZATION [dbo]') END--Query B - Run this SECOND (Tables)
DECLARE @old SYSNAME = N'td', @new SYSNAME = N'dbo', @sql NVARCHAR(MAX) = N''; SELECT @sql += CHAR(13) + CHAR(10) + 'ALTER SCHEMA ' + @new + ' TRANSFER ' + QUOTENAME(SCHEMA_NAME([schema_id])) + '.' + QUOTENAME(name) + ';' FROM sys.tables AS t WHERE SCHEMA_NAME([schema_id]) = @old AND NOT EXISTS (SELECT 1 FROM sys.tables WHERE name = t.name AND SCHEMA_NAME([schema_id]) = @new); EXEC sp_executesql @sql; GO SELECT SCHEMA_NAME([schema_id]),name FROM sys.tables;--Query C - Run this THIRD (Views)
DECLARE @old SYSNAME = N'td', @new SYSNAME = N'dbo', @sql NVARCHAR(MAX) = N''; SELECT @sql += CHAR(13) + CHAR(10) + 'ALTER SCHEMA ' + @new + ' TRANSFER ' + QUOTENAME(SCHEMA_NAME([schema_id])) + '.' + QUOTENAME(name) + ';' FROM sys.views AS t WHERE SCHEMA_NAME([schema_id]) = @old AND NOT EXISTS (SELECT 1 FROM sys.views WHERE name = t.name AND SCHEMA_NAME([schema_id]) = @new); EXEC sp_executesql @sql; GO SELECT SCHEMA_NAME([schema_id]),name FROM sys.views;14) Open the "siteadmin.xml" on the ALM host for editing, typically located in the path: <drive>\ProgramData\Micro Focus\ALM\webapps\qcbin\WEB-INF
<NativeAuthentication>N</NativeAuthentication>16) Change the element value 'N' to 'Y', for example...
<NativeAuthentication>Y</NativeAuthentication>17) Save Changes
update td.projects set DB_NATIVE_AUTHENTICATION = 'Y', DBSERVER_NAME = '<value_from_step_9>'For example...
update td.projects set DB_NATIVE_AUTHENTICATION = 'Y', DBSERVER_NAME = 'tm-alm16_winauth'21) Start ALM