Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d76cf74

Browse files
authored
Update SSDB.non-service_accounts.sql
1 parent 2c94752 commit d76cf74

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

‎SSDB.non-service_accounts.sql‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,12 @@ PRINT 'check report subscriptions ... ';
155155
, [Report_Name] = rp.[Name]
156156
, [Subscription_Owner] = ou.[UserName]
157157
, [Subscription_Owner_ID] = ou.[UserID]
158-
, [CommandToRun] = 'UPDATE [ReportServer].[dbo].[Subscriptions] SET [OwnerID] = ''' + CAST(sa.[service_account_id] AS VARCHAR(MAX)) + ''' WHERE [OwnerID] = ''' + CAST(ou.[UserID] AS VARCHAR(MAX)) + ''''
158+
, [CommandToRun] = 'UPDATE [ReportServer].[dbo].[Subscriptions] SET [OwnerID] = ''' + CAST((SELECT[service_account_id]FROM service_account) AS VARCHAR(MAX)) + ''' WHERE [OwnerID] = ''' + CAST(ou.[UserID] AS VARCHAR(MAX)) + ''''
159159
--, sb.[Report_OID]
160160
FROM
161161
[ReportServer].[dbo].[Subscriptions] AS sb
162162
INNER JOIN [ReportServer].[dbo].[Users] AS ou ON ou.[UserID] = sb.[OwnerID]
163163
INNER JOIN [ReportServer].[dbo].[Catalog] AS rp ON rp.[ItemID] = sb.[Report_OID]
164-
, service_account AS sa
165164
WHERE
166165
1=1
167166
AND ou.[UserName] NOT IN(SELECT [Login_Name] COLLATE Latin1_General_CI_AS FROM #service_accounts)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /