USE [Elyse_DB] GO /****** Object: ApplicationRole [ownership_chain] Script Date: Wed 21-10-2026 4:50:15 AM ******/ /* To avoid disclosure of passwords, the password is generated in script. */ declare @idx as int declare @placeholderPwd as nvarchar(64) declare @rnd as float select @idx = 0 select @placeholderPwd = N'' select @rnd = rand((@@CPU_BUSY % 100) + ((@@IDLE % 100) * 100) + (DATEPART(ss, GETDATE()) * 10000) + ((cast(DATEPART(ms, GETDATE()) as int) % 100) * 1000000)) while @idx < 64 begin select @placeholderPwd = @placeholderPwd + char((cast((@rnd * 83) as int) + 43)) select @idx = @idx + 1 select @rnd = rand() end declare @statement nvarchar(4000) select @statement = N'CREATE APPLICATION ROLE [ownership_chain] WITH DEFAULT_SCHEMA = [configuring], ' + N'PASSWORD = N' + QUOTENAME(@placeholderPwd,'''') EXEC dbo.sp_executesql @statement GO