all groups > sql server reporting services > september 2007 >
You're in the

sql server reporting services

group:

Assigning 100 users to "browser" quickly


Assigning 100 users to "browser" quickly Ryan
9/20/2007 6:36:01 PM
sql server reporting services:
Does anyone know of a way to assign alot of users to role assignment browser
quickly?

Re: Assigning 100 users to "browser" quickly EMartinez
9/21/2007 3:26:55 AM
[quoted text, click to view]


I've never seen this request before; but something like this might
work.

BULK INSERT REPORTSERVER.DBO.UsersTest
FROM 'C:\SomeFile.csv'
WITH (FIELDTERMINATOR = ',', ROWTERMINATOR = '\n', TABLOCK,
MAXERRORS = 10,
ERRORFILE = 'C:\Errors.txt')

In this example, the C:\SomeFile.csv needs to have the following
fields:
SomeUniqueSID, 1, 1, SomeUserName

Then import these records into the real users table, via something
like:
INSERT INTO REPORTSERVER.DBO.Users
SELECT NEWID(), SID, UserType, AuthType, UserName
FROM REPORTSERVER.DBO.UsersTest

DECLARE @ROLEID VARCHAR(200);

SET @ROLEID = (SELECT ROLEID FROM REPORTSERVER.DBO.ROLES WHERE
ROLENAME = 'BROWSER');

INSERT INTO REPORTSERVER.DBO.POLICYUSERROLE
SELECT NEWID() AS ID, @ROLEID AS RoleID, U.UserID, P.PolicyID
FROM REPORTSERVER.DBO.USERS AS U
FULL OUTER JOIN REPORTSERVER.DBO.POLICIES AS P ON 1 = 1
WHERE U.USERNAME NOT IN ('EVERYONE', 'NT AUTHORITY\SYSTEM', 'BUILTIN
\ADMINISTRATORS');

Hope this helps.

Regards,

Enrique Martinez
Sr. Software Consultant
Re: Assigning 100 users to "browser" quickly midas
9/21/2007 6:46:19 AM
My suggestion would be to put them all in the same AD group and just
set the AD group to have browser permissions.
Re: Assigning 100 users to "browser" quickly Ryan
9/22/2007 4:44:01 AM
When you say AD group ( are you referring to Active Directory).

I am using forms authenciation ... but i how do i do that? Meaning how to i
but them in an a group

[quoted text, click to view]
Re: Assigning 100 users to "browser" quickly Ryan
9/22/2007 4:46:01 AM
Thanks Enrique, let me try this

[quoted text, click to view]
Re: Assigning 100 users to "browser" quickly Ryan
9/24/2007 10:18:04 AM
I can't do that because I can't use AD. I am using forms authenication with
an LDAP authenication... However my LDAP is not an AD

[quoted text, click to view]
Re: Assigning 100 users to "browser" quickly EMartinez
9/25/2007 12:58:03 AM
[quoted text, click to view]


Have you had a chance to try my suggestion?

Enrique Martinez
Sr. Software Consultant
Re: Assigning 100 users to "browser" quickly Ryan Swann
10/9/2007 4:30:44 PM
[quoted text, click to view]

yeah, i am having one issue. I was able to get the users into the user
table by doing this

insert into ReportServer.dbo.Users
select userid = newid(), [sid]= NULL, usertype = 1,authtype = 1,
[Login]
from tbldataAccess a
where a.login COLLATE Latin1_General_CI_AS_KS_WS not in (select
username from ReportServer.dbo.Users)


but i can get it to populate to policyuserrole

Insert into reportserver.dbo.policyuserrole

select newid() as ID, RoleID = (select roleid from
Reportserver.dbo.roles where roleName = 'Browser' ), u.userID,
p.PolicyID

from reportserver.dbo.users as u full outer join
reportserver.dbo.policies as p on 1=1

where u.username not in ('Everyone', 'NY Authority\System', 'Builtin
\Administrators') or u.userid not in (select userid from
reportserver.dbo.policies)

I get the following error:

Msg 2601, Level 14, State 1, Line 1
Cannot insert duplicate key row in object 'dbo.policyuserrole' with
unique index 'IX_PolicyUserRole'.
The statement has been terminated.

Any ideas

Re: Assigning 100 users to "browser" quickly Ryan Swann
10/25/2007 12:00:00 AM
I am about to add people to the reportserver names. but when they
login it says that they don't have the correct permissions. If i got
into report manager and add them as browser they have access. Any
ideas


[quoted text, click to view]

AddThis Social Bookmark Button