Showing posts with label role. Show all posts
Showing posts with label role. Show all posts

Sunday, March 11, 2012

Bug in sp_updatestats

Hi,
In the BOL is says that DBO and symin role can execute sp_updatestats.
However, the database owner gets this error:
Server: Msg 15247, Level 16, State 1, Procedure sp_updatestats, Line 14
User does not have permission to perform this action.
I've found that I can only run it as symin. On further inspection I see
were the code is raising the error:
DECLARE @.dbsid varbinary(85)
SELECT @.dbsid = sid
FROM master.dbo.sysdatabases
WHERE name = db_name()
/*Check the user symin*/
IF NOT is_srvrolemember('symin') = 1 AND suser_sid() <> @.dbsid
BEGIN
RAISERROR(15247,-1,-1)
RETURN (1)
END
So is the BOL wrong or the SP?
Thanks,
BryanI think that's a bug. You can now only run sp_updatestats if you are logged
in as the account that owns the database. Being a member of dbo is not
enough, where I think it should be.
You can replace
AND suser_sid() <> @.dbsid
with
AND IS_MEMBER ('db_owner') = 0
to make the procedure work as expected.
Jacco Schalkwijk
SQL Server MVP
"BDB" <reply@.to.group.com> wrote in message
news:%23qPHC52aFHA.796@.TK2MSFTNGP09.phx.gbl...
> Hi,
> In the BOL is says that DBO and symin role can execute sp_updatestats.
> However, the database owner gets this error:
> Server: Msg 15247, Level 16, State 1, Procedure sp_updatestats, Line 14
> User does not have permission to perform this action.
> I've found that I can only run it as symin. On further inspection I
> see were the code is raising the error:
> DECLARE @.dbsid varbinary(85)
> SELECT @.dbsid = sid
> FROM master.dbo.sysdatabases
> WHERE name = db_name()
> /*Check the user symin*/
> IF NOT is_srvrolemember('symin') = 1 AND suser_sid() <> @.dbsid
> BEGIN
> RAISERROR(15247,-1,-1)
> RETURN (1)
> END
>
> So is the BOL wrong or the SP?
> Thanks,
> Bryan
>|||Correction:
On rereading the BOL article about sp_updatestats is seems to me that the
article and the code of the stored procedure are technically in agreement.
However using the database owner instead of the db_owner role is highly
unusual. I think it is the first time I have seen it used in SQL Server.
Regarding changing sp_updatestats, as I suggest below, and system stored
procedures in general:
Changing system stored procedures is not recommended or supported by
Microsoft, and if something goes wrong you will be on your own.
I'll raise this issue with Microsoft on your behalf though.
Jacco Schalkwijk
SQL Server MVP
"Jacco Schalkwijk" <jacco.please.reply@.to.newsgroups.mvps.org.invalid> wrote
in message news:ejILv%233aFHA.2860@.TK2MSFTNGP10.phx.gbl...
>I think that's a bug. You can now only run sp_updatestats if you are logged
>in as the account that owns the database. Being a member of dbo is not
>enough, where I think it should be.
> You can replace
> AND suser_sid() <> @.dbsid
> with
> AND IS_MEMBER ('db_owner') = 0
> to make the procedure work as expected.
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "BDB" <reply@.to.group.com> wrote in message
> news:%23qPHC52aFHA.796@.TK2MSFTNGP09.phx.gbl...
>|||Right, I'll probably just make a second system SP that works as expected and
wait for MS to fix there own bug.
Thanks a lot!
Bryan
"Jacco Schalkwijk" <jacco.please.reply@.to.newsgroups.mvps.org.invalid> wrote
in message news:uxYHKD4aFHA.1040@.TK2MSFTNGP10.phx.gbl...
> Correction:
> On rereading the BOL article about sp_updatestats is seems to me that the
> article and the code of the stored procedure are technically in agreement.
> However using the database owner instead of the db_owner role is highly
> unusual. I think it is the first time I have seen it used in SQL Server.
> Regarding changing sp_updatestats, as I suggest below, and system stored
> procedures in general:
> Changing system stored procedures is not recommended or supported by
> Microsoft, and if something goes wrong you will be on your own.
> I'll raise this issue with Microsoft on your behalf though.
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "Jacco Schalkwijk" <jacco.please.reply@.to.newsgroups.mvps.org.invalid>
> wrote in message news:ejILv%233aFHA.2860@.TK2MSFTNGP10.phx.gbl...
>

Friday, February 24, 2012

Browser Role get Admin Tools... why?

Hi there,
We're trying to set up a Browser Role on a Server for Reporting Services. We
have created the NT User, and then added a Browser role for them in RS. But
for some reason, even though when we access Reports and type in the Browser's
Credentials, all of the Admin Tools are still there and usable.
I've done the exact same thing previously and had no complications like
this. What could be causing this to happen?
Thanks
AndreThe Answer is...
the report web apps in IIS has anom access selected!
"Arkiliknam" wrote:
> Hi there,
> We're trying to set up a Browser Role on a Server for Reporting Services. We
> have created the NT User, and then added a Browser role for them in RS. But
> for some reason, even though when we access Reports and type in the Browser's
> Credentials, all of the Admin Tools are still there and usable.
> I've done the exact same thing previously and had no complications like
> this. What could be causing this to happen?
> Thanks
> Andre

Browser Role - Deletes

I'm trying to restrict my users from being able to delete or move any of the
reports. Using the Browser Role ( View Folders, View Reports ) still
allows them to get to the "Show Details" page with full access to delete my
reports. What am I missing?
TIA
TinaThe Show Details will still show the check box to delete the report. But
the user does not have permissions to do it and will receive an error. If
this is not the case, please let me know.
Make sure you apply permissions at the folder level as well.
| From: "Tina Smith" <tb.smith@.earthlink.net>
| Subject: Browser Role - Deletes
| Date: Tue, 18 Jan 2005 11:31:20 -0500
| Lines: 9
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
| Message-ID: <O1QclsX$EHA.2076@.TK2MSFTNGP15.phx.gbl>
| Newsgroups: microsoft.public.sqlserver.reportingsvcs
| NNTP-Posting-Host: user-10ibco9.biz.mindspring.com 65.37.179.9
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP15
.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.reportingsvcs:40126
| X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
|
| I'm trying to restrict my users from being able to delete or move any of
the
| reports. Using the Browser Role ( View Folders, View Reports ) still
| allows them to get to the "Show Details" page with full access to delete
my
| reports. What am I missing?
|
| TIA
| Tina
|
|
||||Yes, they do receive an error stating they don't have the permissions.
I'd rather not show them the option to delete the reports when they don't
have the permissions to. Is there anyway to eliminate the "ShowDetails"
for the browser role?
Thanks
Tina
""Brad Syputa - MS"" <bradsy@.Online.Microsoft.com> wrote in message
news:tR6$y7X$EHA.3360@.cpmsftngxa10.phx.gbl...
> The Show Details will still show the check box to delete the report. But
> the user does not have permissions to do it and will receive an error. If
> this is not the case, please let me know.
> Make sure you apply permissions at the folder level as well.
>
> --
> | From: "Tina Smith" <tb.smith@.earthlink.net>
> | Subject: Browser Role - Deletes
> | Date: Tue, 18 Jan 2005 11:31:20 -0500
> | Lines: 9
> | X-Priority: 3
> | X-MSMail-Priority: Normal
> | X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
> | Message-ID: <O1QclsX$EHA.2076@.TK2MSFTNGP15.phx.gbl>
> | Newsgroups: microsoft.public.sqlserver.reportingsvcs
> | NNTP-Posting-Host: user-10ibco9.biz.mindspring.com 65.37.179.9
> | Path:
>
cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP15
> phx.gbl
> | Xref: cpmsftngxa10.phx.gbl
microsoft.public.sqlserver.reportingsvcs:40126
> | X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
> |
> | I'm trying to restrict my users from being able to delete or move any of
> the
> | reports. Using the Browser Role ( View Folders, View Reports ) still
> | allows them to get to the "Show Details" page with full access to delete
> my
> | reports. What am I missing?
> |
> | TIA
> | Tina
> |
> |
> |
>