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

Friday, March 9, 2012

Definition of specific "Security Roles"

Under SSMS I see the "securityadmin" Server role. Where in SSMS can I find the actual list of permsisions granted to this role? (not just a generic description of what this role can do.)

TIA,

Barkingdog

In summary they can add members to the securityadmin role, Grant or deny CREATE DATABASE and read the error logs. Additionally they are allowed to use the tasks:

sp_addlinkedsrvlogin,sp_addlogin,sp_defaultdb,sp_defaultlanguage,sp_denylogin,sp_droplinkedsrvlogin,sp_droplogin,sp_grantlogin,sp_helplogins,sp_remoteoption and sp_revokelogin.

The above mentioned list is from an old SQL 2000 scripts of mine. Additionally the description of the BOL and the appropiate command which are new for the above mentioned procedures apply.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

Saturday, February 25, 2012

defaulting newly created objects to DBO

Hi, i know that for non-sysadmin role members, non-qualified objects
will be owned by the creating user.
Is it possible to change this so that objects created by users
belonging to database role 'db_owner' default to dbo?
Thanks,
RafetJust have the CREATE statement use dbo as the schema.
create table dbo.test
Randy Dyess
www.Database-Security.Info|||Not really. You could use sp_addalias but it's not
recommended to go this route and sp_addalias is provided for
backwards compatibility only.
Members of db_owner should qualify the objects they are
creating with dbo. It's considered good practice to always
qualify objects with the owner name - when creating or
referencing objects. Qualifying objects improves performance
and readability.
-Sue
On 5 Mar 2004 07:16:48 -0800, rducic@.hotmail.com (Rafet)
wrote:

>Hi, i know that for non-sysadmin role members, non-qualified objects
>will be owned by the creating user.
>Is it possible to change this so that objects created by users
>belonging to database role 'db_owner' default to dbo?
>Thanks,
>Rafet|||I am puzzled about this too. I am about to start using sp_addalias though.
I think Microsoft needs to think this area through a little better. I know
sp_addalias may go away some day, but the current version doesn't handle thi
s well.
In test, we like to give developers logins that link to the dbo user so that
we can have the system enforce all objects getting created by dbo. Then wh
en we create these in production we can be comfortable that the user is the
same and any code that refe
rences the user will always be "dbo" and not "joe_developer".
While it is best practice for developers to always reference user name with
objects, in practice it is harder to enforce without the system to do it for
us. Our company employs consultants regularly and they all seem to have di
fferent habits we end up ha
ving to work on with them.

Friday, February 17, 2012

default user for object, sysadmin role, KB22067, invalid object

Trying to select rows from a table with a particular owner
which has unfortunately been set to the sysadmin role for
sqlserver by some predecessor.
'select * from mytable' gives error message 'invalid object'
This is an inconvenience
because we have that owner name hardcoded in an unknown
number of places in the code, and many other places queries are
coded in without any owner reference.
In reference to KB255067 it gives two unrealistic workarounds
* don't set the owner in that role
(Waiting for Microsoft TimeMachine(TM) to come out)
* create all the tables with DBO owner
My colleague has invented a workaround where we set the
sysusers.sid to the user we want it to be instead of to 0x01
but I am unsure of the consequences to that.
I would like to know what a truly useable workaround is
that will not have weird consequences later on so that
SqlServer will do what I want it to do.
For example a real workaround would be
* Mark up that user so the evidence of it having been in
the sysadmin role is removed
or in the wording of the KB article
* reconstruct or fix the ownership chain (since it was broken
when the sysadmin role was used)
DO NOT MODIFY SYSTEM TABLES DIRECTLY! Yes, a "qualified" dba could "get
away" with modifying system tables, but merely changing the owner sid is
insufficient as it will not modify the sysdepends table references.
Use sp_changeobjectowner and modify the owner of the object to dbo. If the
old owner was qualified and hard-coded, then map the application login, or
another login, to an aliased user to that old owner name.
A final consideration would be to script out all of those objects, export
the data, drop the objects, and then recreate the objects under a legitimate
database user (note, not login). Then, reimport the data.
Sincerely,
Anthony Thomas

"ElvinKee" <ElvinKee@.discussions.microsoft.com> wrote in message
news:D09D8C22-AD0D-4DBD-81DC-42EACF0CC07E@.microsoft.com...
> Trying to select rows from a table with a particular owner
> which has unfortunately been set to the sysadmin role for
> sqlserver by some predecessor.
> 'select * from mytable' gives error message 'invalid object'
> This is an inconvenience
> because we have that owner name hardcoded in an unknown
> number of places in the code, and many other places queries are
> coded in without any owner reference.
> In reference to KB255067 it gives two unrealistic workarounds
> * don't set the owner in that role
> (Waiting for Microsoft TimeMachine(TM) to come out)
> * create all the tables with DBO owner
> My colleague has invented a workaround where we set the
> sysusers.sid to the user we want it to be instead of to 0x01
> but I am unsure of the consequences to that.
> I would like to know what a truly useable workaround is
> that will not have weird consequences later on so that
> SqlServer will do what I want it to do.
> For example a real workaround would be
> * Mark up that user so the evidence of it having been in
> the sysadmin role is removed
> or in the wording of the KB article
> * reconstruct or fix the ownership chain (since it was broken
> when the sysadmin role was used)
>
>
> --

default user for object, sysadmin role, KB22067, invalid object

Trying to select rows from a table with a particular owner
which has unfortunately been set to the sysadmin role for
sqlserver by some predecessor.
'select * from mytable' gives error message 'invalid object'
This is an inconvenience
because we have that owner name hardcoded in an unknown
number of places in the code, and many other places queries are
coded in without any owner reference.
In reference to KB255067 it gives two unrealistic workarounds
* don't set the owner in that role
(Waiting for Microsoft TimeMachine(TM) to come out)
* create all the tables with DBO owner
My colleague has invented a workaround where we set the
sysusers.sid to the user we want it to be instead of to 0x01
but I am unsure of the consequences to that.
I would like to know what a truly useable workaround is
that will not have weird consequences later on so that
SqlServer will do what I want it to do.
For example a real workaround would be
* Mark up that user so the evidence of it having been in
the sysadmin role is removed
or in the wording of the KB article
* reconstruct or fix the ownership chain (since it was broken
when the sysadmin role was used)DO NOT MODIFY SYSTEM TABLES DIRECTLY! Yes, a "qualified" dba could "get
away" with modifying system tables, but merely changing the owner sid is
insufficient as it will not modify the sysdepends table references.
Use sp_changeobjectowner and modify the owner of the object to dbo. If the
old owner was qualified and hard-coded, then map the application login, or
another login, to an aliased user to that old owner name.
A final consideration would be to script out all of those objects, export
the data, drop the objects, and then recreate the objects under a legitimate
database user (note, not login). Then, reimport the data.
Sincerely,
Anthony Thomas
"ElvinKee" <ElvinKee@.discussions.microsoft.com> wrote in message
news:D09D8C22-AD0D-4DBD-81DC-42EACF0CC07E@.microsoft.com...
> Trying to select rows from a table with a particular owner
> which has unfortunately been set to the sysadmin role for
> sqlserver by some predecessor.
> 'select * from mytable' gives error message 'invalid object'
> This is an inconvenience
> because we have that owner name hardcoded in an unknown
> number of places in the code, and many other places queries are
> coded in without any owner reference.
> In reference to KB255067 it gives two unrealistic workarounds
> * don't set the owner in that role
> (Waiting for Microsoft TimeMachine(TM) to come out)
> * create all the tables with DBO owner
> My colleague has invented a workaround where we set the
> sysusers.sid to the user we want it to be instead of to 0x01
> but I am unsure of the consequences to that.
> I would like to know what a truly useable workaround is
> that will not have weird consequences later on so that
> SqlServer will do what I want it to do.
> For example a real workaround would be
> * Mark up that user so the evidence of it having been in
> the sysadmin role is removed
> or in the wording of the KB article
> * reconstruct or fix the ownership chain (since it was broken
> when the sysadmin role was used)
>
>
> --

Tuesday, February 14, 2012

Default Schema on SQL Server 2005 with Server Role "sysadmin"

Hi,
I have a user with a default database and a default schema that is not
"dbo". I noticed that, if I assign this user the server role "sysadmin"
the default schema does not seem to be honored any more. Instead
whenever I use an unqualified table name "dbo" is searched first. When
I remove the role, the user's default schema is searched as first
schema. Is there any way to make SQL 2005 honor the default schema when
assigning role "sysadmin" to a user? I could not find anything in the
docs about this.
Kind regards
robertRobert,
Sysadmins always map to dbo in a database. Being a sysadmin trumps any
other settings for the user.
RLF
"Robert Klemme" <shortcutter@.googlemail.com> wrote in message
news:55svpoF24qv1vU1@.mid.individual.net...
> Hi,
> I have a user with a default database and a default schema that is not
> "dbo". I noticed that, if I assign this user the server role "sysadmin"
> the default schema does not seem to be honored any more. Instead whenever
> I use an unqualified table name "dbo" is searched first. When I remove
> the role, the user's default schema is searched as first schema. Is there
> any way to make SQL 2005 honor the default schema when assigning role
> "sysadmin" to a user? I could not find anything in the docs about this.
> Kind regards
> robert|||On 15.03.2007 14:53, Russell Fields wrote:
> Sysadmins always map to dbo in a database. Being a sysadmin trumps any
> other settings for the user.
Ah! Thanks a lot!
Kind regards
robert

Default Schema on SQL Server 2005 with Server Role "sysadmin"

Hi,
I have a user with a default database and a default schema that is not
"dbo". I noticed that, if I assign this user the server role "sysadmin"
the default schema does not seem to be honored any more. Instead
whenever I use an unqualified table name "dbo" is searched first. When
I remove the role, the user's default schema is searched as first
schema. Is there any way to make SQL 2005 honor the default schema when
assigning role "sysadmin" to a user? I could not find anything in the
docs about this.
Kind regards
robertRobert,
Sysadmins always map to dbo in a database. Being a sysadmin trumps any
other settings for the user.
RLF
"Robert Klemme" <shortcutter@.googlemail.com> wrote in message
news:55svpoF24qv1vU1@.mid.individual.net...
> Hi,
> I have a user with a default database and a default schema that is not
> "dbo". I noticed that, if I assign this user the server role "sysadmin"
> the default schema does not seem to be honored any more. Instead whenever
> I use an unqualified table name "dbo" is searched first. When I remove
> the role, the user's default schema is searched as first schema. Is there
> any way to make SQL 2005 honor the default schema when assigning role
> "sysadmin" to a user? I could not find anything in the docs about this.
> Kind regards
> robert|||On 15.03.2007 14:53, Russell Fields wrote:
> Sysadmins always map to dbo in a database. Being a sysadmin trumps any
> other settings for the user.
Ah! Thanks a lot!
Kind regards
robert

Default Report Server Web Page

I've only just started working on Sql Server Reporting Services 2005, My role is mainly that of administrator (some other unfortunate sole will be doing the development)

However, I'm having some problems configuring the "Welcome" screen on the server. Currently it looks like a default web directory, I can click through to Data Sources and a directory containing the current test reports:

Looks like:

Wednesday, January 10, 2007 4:14 PM <dir> Data Sources


Wednesday, January 10, 2007 4:14 PM <dir> Test Reports

Clicking on Test Reports

gives:

[To Parent Directory]
Wednesday, January 10, 2007 4:14 PM 15193 Basic Test Report

Question is:
Is there an XML (Or XSL) file somewhere where I can define how the website displays the report directories and names.
Or
Do i need to build a custom web app?

A link in the right direction would be most appreciated!

Thanks

Sam

to access report manager go to http://servername/reports

I hope thats what you're looking for.

|||Hi,

Thanks for the reply, unfortunately thats not what I meant.
What I did need was just some initial guidance on formatting the user access on to the reporting system.

Thanks

Sam|||Forgive me if I dont know what you're looking for. Are you looking for a page that authenticates the user? Maybe if you give us more details we can help you.|||its the http://servername/reportserver page

(I'm guessing now after a little more digging that it is the same format URL for all installations)

Anyway, I just want to be able to customise that to suit the company's needs. I'm not sure if there is a way to edit an XSL file somewhere or if I need to start building a custom web application to act as a portal on to the report server.

Thanks again

Sam|||Here's an example of the page i mean:
http://www.ondotnet.com/dotnet/2004/11/01/graphics/image013.gif

As you can see it looks very basic, I was hoping to be able to make it look a bit prettier :)

Thanks
Sam|||

Sam, like I said in my first post, the portal to the web server is found at

http://servername/reports

Please try that and tell me if thats not what you're looking for.

|||

Ralph,

I think Sam is wanting to know how to modify the page that comes up when you go to http://ServerName/Reports or http://ServerName/ReportServer.

Jarret

|||

Sam Vella wrote:

its the http://servername/reportserver page

(I'm guessing now after a little more digging that it is the same format URL for all installations)

Anyway, I just want to be able to customise that to suit the company's needs. I'm not sure if there is a way to edit an XSL file somewhere or if I need to start building a custom web application to act as a portal on to the report server.

Thanks again

Sam

Sam,

The only way that I know of to accomplish what you are looking for is to create a web application using Visual Studio 2005. Basically you could create a Login page (optionally) along with your own Index page (formatted however you like) with links to the reports.

However, if you're not a developer I must warn you ahead of time that it can get rather involved.

|||Cheers mate,

Just as I feared

No probs about the time just yet either

Sam|||If you're going to go that route, let me know and I'll provide some further direction.|||Just a link to a suitable web resource would be nice
Thanks!|||

I have the same issue, but I was also using reporting services in sql 2000 previously and had a great looking page by default from

http://<servername>/reports/pages/folder.aspx

this took me to a fully formatted page with the ability to set subscriptions. (see below - I've taken out the report links but they were all there)

the equivalent in 2005 found at

C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportManager\Pages

is just what Sam's found a does look very basic.


AC Yule - SQL Reporting Services

Home

Home | My Subscriptions | Site Settings | Help

Help

Search for:

Please enter one or more search terms in the search box

Contents

Properties

Would like to know if anyone's aware that i'm maybe not picking up the right page / link / location in my 2005 installation as i don't see any reason why they would 'downgrade' it.

Thanks

Steven

|||

Sam Vella wrote:

Just a link to a suitable web resource would be nice
Thanks!

I don't exactly have one link that will explain it all.

This link will give you the concepts to use in Visual Studio and SQL (Even though it isn't VS 2005): http://www.codeproject.com/aspnet/AHCreatRepsAspNet.asp

If you want your customized page to be viewable in a web browser, I have found the easiest way is to install Visual Studio Web Application Projects from here: http://msdn2.microsoft.com/en-us/asp.net/aa336618.aspx

You will also need to enable Internet Information Services. (Control Panel -> Add/Remove Programs -> Add/Remove Windows Components)

Once you have created your Visual Studio Web Application -- create a basic index page with link buttons to your reports -- you will need to publish it to c:\Inetpub\wwwroot using IIS.

If you get stuck somewhere, drop me an e-mail (gmoore@.genevasoftware.com).

|||

Hello Steven,

This page is also in RS 2005. Type this into your browser and you should get the same page as you pasted in your above post. http://<servername>/reports

Jarret

Default Report Server Web Page

I've only just started working on Sql Server Reporting Services 2005, My role is mainly that of administrator (some other unfortunate sole will be doing the development)

However, I'm having some problems configuring the "Welcome" screen on the server. Currently it looks like a default web directory, I can click through to Data Sources and a directory containing the current test reports:

Looks like:

Wednesday, January 10, 2007 4:14 PM <dir> Data Sources


Wednesday, January 10, 2007 4:14 PM <dir> Test Reports

Clicking on Test Reports

gives:

[To Parent Directory]
Wednesday, January 10, 2007 4:14 PM 15193 Basic Test Report

Question is:
Is there an XML (Or XSL) file somewhere where I can define how the website displays the report directories and names.
Or
Do i need to build a custom web app?

A link in the right direction would be most appreciated!

Thanks

Sam

to access report manager go to http://servername/reports

I hope thats what you're looking for.

|||Hi,

Thanks for the reply, unfortunately thats not what I meant.
What I did need was just some initial guidance on formatting the user access on to the reporting system.

Thanks

Sam|||Forgive me if I dont know what you're looking for. Are you looking for a page that authenticates the user? Maybe if you give us more details we can help you.|||its the http://servername/reportserver page

(I'm guessing now after a little more digging that it is the same format URL for all installations)

Anyway, I just want to be able to customise that to suit the company's needs. I'm not sure if there is a way to edit an XSL file somewhere or if I need to start building a custom web application to act as a portal on to the report server.

Thanks again

Sam|||Here's an example of the page i mean:
http://www.ondotnet.com/dotnet/2004/11/01/graphics/image013.gif

As you can see it looks very basic, I was hoping to be able to make it look a bit prettier :)

Thanks
Sam|||

Sam, like I said in my first post, the portal to the web server is found at

http://servername/reports

Please try that and tell me if thats not what you're looking for.

|||

Ralph,

I think Sam is wanting to know how to modify the page that comes up when you go to http://ServerName/Reports or http://ServerName/ReportServer.

Jarret

|||

Sam Vella wrote:

its the http://servername/reportserver page

(I'm guessing now after a little more digging that it is the same format URL for all installations)

Anyway, I just want to be able to customise that to suit the company's needs. I'm not sure if there is a way to edit an XSL file somewhere or if I need to start building a custom web application to act as a portal on to the report server.

Thanks again

Sam

Sam,

The only way that I know of to accomplish what you are looking for is to create a web application using Visual Studio 2005. Basically you could create a Login page (optionally) along with your own Index page (formatted however you like) with links to the reports.

However, if you're not a developer I must warn you ahead of time that it can get rather involved.

|||Cheers mate,

Just as I feared

No probs about the time just yet either

Sam|||If you're going to go that route, let me know and I'll provide some further direction.|||Just a link to a suitable web resource would be nice
Thanks!|||

I have the same issue, but I was also using reporting services in sql 2000 previously and had a great looking page by default from

http://<servername>/reports/pages/folder.aspx

this took me to a fully formatted page with the ability to set subscriptions. (see below - I've taken out the report links but they were all there)

the equivalent in 2005 found at

C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportManager\Pages

is just what Sam's found a does look very basic.


AC Yule - SQL Reporting Services

Home

Home | My Subscriptions | Site Settings | Help

Help

Search for:

Please enter one or more search terms in the search box

Contents

Properties

Would like to know if anyone's aware that i'm maybe not picking up the right page / link / location in my 2005 installation as i don't see any reason why they would 'downgrade' it.

Thanks

Steven

|||

Sam Vella wrote:

Just a link to a suitable web resource would be nice
Thanks!

I don't exactly have one link that will explain it all.

This link will give you the concepts to use in Visual Studio and SQL (Even though it isn't VS 2005): http://www.codeproject.com/aspnet/AHCreatRepsAspNet.asp

If you want your customized page to be viewable in a web browser, I have found the easiest way is to install Visual Studio Web Application Projects from here: http://msdn2.microsoft.com/en-us/asp.net/aa336618.aspx

You will also need to enable Internet Information Services. (Control Panel -> Add/Remove Programs -> Add/Remove Windows Components)

Once you have created your Visual Studio Web Application -- create a basic index page with link buttons to your reports -- you will need to publish it to c:\Inetpub\wwwroot using IIS.

If you get stuck somewhere, drop me an e-mail (gmoore@.genevasoftware.com).

|||

Hello Steven,

This page is also in RS 2005. Type this into your browser and you should get the same page as you pasted in your above post. http://<servername>/reports

Jarret

default public permissions

Can anyone tell me what are (or where to find) the default permissions
granted to the public role? I think that permissions are granted not only in
the user database in question, but also in the system databases? Please let
me know. Thanks.
Yes, the public role is granted specific permissions in every db by default.
You can change these by expanding the DB in Enterprise Manager, Databases,
Expand the database in question, expand Roles. Double click Public. Click
the Permissions button.
You should see exec perms on a bunch of system stored procs, system tables
in the user db, etc.
Notice that by default the public role doesn't get permissions on every
object in the db.
You can change the public role's permissions here, but be sure to compensate
by giving those permissions to the users that will need it through another
role.
Every user in the db is in the public role, so the changes you make will
affect everyone. So, don't deny permissions, just remove them.
Donna Lambert
"J Jetson" wrote:

> Can anyone tell me what are (or where to find) the default permissions
> granted to the public role? I think that permissions are granted not only in
> the user database in question, but also in the system databases? Please let
> me know. Thanks.
|||Hi,
See this article:-
http://www.databasejournal.com/featu...le.php/1478701
Thanks
Hari
SQL Server MVP
"J Jetson" <JJetson@.discussions.microsoft.com> wrote in message
news:333F33A8-C4AA-4CFC-B0F3-DAE1BDD6F128@.microsoft.com...
> Can anyone tell me what are (or where to find) the default permissions
> granted to the public role? I think that permissions are granted not only
> in
> the user database in question, but also in the system databases? Please
> let
> me know. Thanks.

default public permissions

Can anyone tell me what are (or where to find) the default permissions
granted to the public role? I think that permissions are granted not only in
the user database in question, but also in the system databases? Please let
me know. Thanks.Yes, the public role is granted specific permissions in every db by default.
You can change these by expanding the DB in Enterprise Manager, Databases,
Expand the database in question, expand Roles. Double click Public. Click
the Permissions button.
You should see exec perms on a bunch of system stored procs, system tables
in the user db, etc.
Notice that by default the public role doesn't get permissions on every
object in the db.
You can change the public role's permissions here, but be sure to compensate
by giving those permissions to the users that will need it through another
role.
Every user in the db is in the public role, so the changes you make will
affect everyone. So, don't deny permissions, just remove them.
Donna Lambert
"J Jetson" wrote:
> Can anyone tell me what are (or where to find) the default permissions
> granted to the public role? I think that permissions are granted not only in
> the user database in question, but also in the system databases? Please let
> me know. Thanks.|||Hi,
See this article:-
http://www.databasejournal.com/features/mssql/article.php/1478701
Thanks
Hari
SQL Server MVP
"J Jetson" <JJetson@.discussions.microsoft.com> wrote in message
news:333F33A8-C4AA-4CFC-B0F3-DAE1BDD6F128@.microsoft.com...
> Can anyone tell me what are (or where to find) the default permissions
> granted to the public role? I think that permissions are granted not only
> in
> the user database in question, but also in the system databases? Please
> let
> me know. Thanks.

default public permissions

Can anyone tell me what are (or where to find) the default permissions
granted to the public role? I think that permissions are granted not only in
the user database in question, but also in the system databases? Please let
me know. Thanks.Yes, the public role is granted specific permissions in every db by default.
You can change these by expanding the DB in Enterprise Manager, Databases,
Expand the database in question, expand Roles. Double click Public. Click
the Permissions button.
You should see exec perms on a bunch of system stored procs, system tables
in the user db, etc.
Notice that by default the public role doesn't get permissions on every
object in the db.
You can change the public role's permissions here, but be sure to compensate
by giving those permissions to the users that will need it through another
role.
Every user in the db is in the public role, so the changes you make will
affect everyone. So, don't deny permissions, just remove them.
Donna Lambert
"J Jetson" wrote:

> Can anyone tell me what are (or where to find) the default permissions
> granted to the public role? I think that permissions are granted not only
in
> the user database in question, but also in the system databases? Please le
t
> me know. Thanks.|||Hi,
See this article:-
http://www.databasejournal.com/feat...cle.php/1478701
Thanks
Hari
SQL Server MVP
"J Jetson" <JJetson@.discussions.microsoft.com> wrote in message
news:333F33A8-C4AA-4CFC-B0F3-DAE1BDD6F128@.microsoft.com...
> Can anyone tell me what are (or where to find) the default permissions
> granted to the public role? I think that permissions are granted not only
> in
> the user database in question, but also in the system databases? Please
> let
> me know. Thanks.

Default Public Database Role

Does anyone know the reason for this role, and if there
are any impact if I revoke/deny all permissions on this
role from the system databases (tables/SP/etc)?
Reason: All SQL logins default to this role, and can see
all system table contents.See Public role in SQL Books Online.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.