Showing posts with label denied. Show all posts
Showing posts with label denied. Show all posts

Wednesday, March 28, 2012

Permssion denied for dbo

Hi,
My NT and my Ad user account are both shown as dbo on a database.
However, when I create tables using either account they are shown as not
being owned by dbo.
Then, when I try to insert or update these tables, it says permission denied
.
How can this be? I'm a dbo? Even if I wern't a dbo, as I own the table I
shoyuld be able to modify its data. Whats going on here?
ThanksHi
Because these accounts are not member of sysadmin server role
Try do
CREATE TABLE dbo.Mytabale
(
blalala
)
"Firestarter" <Firestarter@.discussions.microsoft.com> wrote in message
news:5C0E66A8-2327-456A-8605-A9B13D82C158@.microsoft.com...
> Hi,
> My NT and my Ad user account are both shown as dbo on a database.
> However, when I create tables using either account they are shown as not
> being owned by dbo.
> Then, when I try to insert or update these tables, it says permission
denied.
> How can this be? I'm a dbo? Even if I wern't a dbo, as I own the table I
> shoyuld be able to modify its data. Whats going on here?
> Thanks|||Yes, I'm sure that would help create the tables as owned by dbo, but that
that is not my issue.
I still can't update or insert into these tables even though I am logging on
as a dbo.
Any ideas why not?
"Uri Dimant" wrote:

> Hi
> Because these accounts are not member of sysadmin server role
> Try do
> CREATE TABLE dbo.Mytabale
> (
> blalala
> )
> "Firestarter" <Firestarter@.discussions.microsoft.com> wrote in message
> news:5C0E66A8-2327-456A-8605-A9B13D82C158@.microsoft.com...
> denied.
>
>|||"Firestarter" schrieb:
> Yes, I'm sure that would help create the tables as owned by dbo, but that
> that is not my issue.
> I still can't update or insert into these tables even though I am logging
on
> as a dbo.
> Any ideas why not?
You can update the tables as dbo! You just have to add the ownername before
the objectname (as the dbo is not the owner of the object).
Objects that belong to the dbo can always be accessed by everybody without
the owner's name, because 'dbo' is the default owner ...|||> My NT and my Ad user account are both shown as dbo on a database.
Are these Windows or SQL Server logins?
Since you say that two different logins are "dbo" in a database, you are say
ing that both are
sysadmin? Right? (You cannot have two logins being the same user in a databa
se).
How do you determine that both are dbo? What tools/commands do you use to de
termine this?
Or are you saying that both are in the db_owner role in the database? That i
s a different thing from
being the dbo of a database.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Firestarter" <Firestarter@.discussions.microsoft.com> wrote in message
news:5C0E66A8-2327-456A-8605-A9B13D82C158@.microsoft.com...
> Hi,
> My NT and my Ad user account are both shown as dbo on a database.
> However, when I create tables using either account they are shown as not
> being owned by dbo.
> Then, when I try to insert or update these tables, it says permission deni
ed.
> How can this be? I'm a dbo? Even if I wern't a dbo, as I own the table I
> shoyuld be able to modify its data. Whats going on here?
> Thanks|||No, I can't! Thats my point. Wether I put the owner name or not, I canot
update the table.
That is the issue I am trying to resolve.
"Christian Donner" wrote:

> "Firestarter" schrieb:
> You can update the tables as dbo! You just have to add the ownername befor
e
> the objectname (as the dbo is not the owner of the object).
> Objects that belong to the dbo can always be accessed by everybody without
> the owner's name, because 'dbo' is the default owner ...|||These are windows logins.
And I mean that both are in the db_owner role. Apologies for the lack of
prescsion in my post.
I am using EM to determine this,
"Tibor Karaszi" wrote:

> Are these Windows or SQL Server logins?
> Since you say that two different logins are "dbo" in a database, you are s
aying that both are
> sysadmin? Right? (You cannot have two logins being the same user in a data
base).
> How do you determine that both are dbo? What tools/commands do you use to
determine this?
> Or are you saying that both are in the db_owner role in the database? That
is a different thing from
> being the dbo of a database.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Firestarter" <Firestarter@.discussions.microsoft.com> wrote in message
> news:5C0E66A8-2327-456A-8605-A9B13D82C158@.microsoft.com...
>|||When a db_owner (who isn't dbo) creates an object, it will not be owned by d
bo. It will be owned by
that persons user name in the database. You cannot change that.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Firestarter" <Firestarter@.discussions.microsoft.com> wrote in message
news:D4179915-0813-403B-B075-A20DAD8C312D@.microsoft.com...[vbcol=seagreen]
> These are windows logins.
> And I mean that both are in the db_owner role. Apologies for the lack of
> prescsion in my post.
> I am using EM to determine this,
> "Tibor Karaszi" wrote:
>|||Firestarter wrote:
> No, I can't! Thats my point. Wether I put the owner name or not, I
> canot update the table.
> That is the issue I am trying to resolve.
>
Are you specifying the dbo owner name in the create statement as Uri
suggested? If not, try it that way.
David Gugick
Quest Software
www.imceda.com
www.quest.com|||In an attempt to avoid the confusion I am creating, this is what I've got:
--AD server, table created using an AD account which is a member of db_owner
fixed db role
create table felix1 (test varchar(10) null)
-- Shows in EM as being owned by londonfire\hedleyf, as expected
create table dbo.felix1 (test varchar(10) null)
-- Shows in EM as being owned by dbo, as expected
--
insert felix1 (test)
values (2)
--results
Server: Msg 229, Level 14, State 5, Line 1
INSERT permission denied on object 'felix1', database 'CFS_HFSRA_V3_test',
owner 'LONDONFIRE\HEDLEYF'.
insert dbo.felix1 (test)
values (2)
--results
Server: Msg 229, Level 14, State 5, Line 1
INSERT permission denied on object 'felix1', database 'CFS_HFSRA_V3_test',
owner 'dbo'.
So I am in the db_owner role, and seem unable to update a table.
What is going on?
Thanks for your continued patience...
"David Gugick" wrote:

> Firestarter wrote:
> Are you specifying the dbo owner name in the create statement as Uri
> suggested? If not, try it that way.
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com
>

Permssion denied for dbo

Hi,
My NT and my Ad user account are both shown as dbo on a database.
However, when I create tables using either account they are shown as not
being owned by dbo.
Then, when I try to insert or update these tables, it says permission denied.
How can this be? I'm a dbo? Even if I wern't a dbo, as I own the table I
shoyuld be able to modify its data. Whats going on here?
Thanks
Hi
Because these accounts are not member of sysadmin server role
Try do
CREATE TABLE dbo.Mytabale
(
blalala
)
"Firestarter" <Firestarter@.discussions.microsoft.com> wrote in message
news:5C0E66A8-2327-456A-8605-A9B13D82C158@.microsoft.com...
> Hi,
> My NT and my Ad user account are both shown as dbo on a database.
> However, when I create tables using either account they are shown as not
> being owned by dbo.
> Then, when I try to insert or update these tables, it says permission
denied.
> How can this be? I'm a dbo? Even if I wern't a dbo, as I own the table I
> shoyuld be able to modify its data. Whats going on here?
> Thanks
|||Yes, I'm sure that would help create the tables as owned by dbo, but that
that is not my issue.
I still can't update or insert into these tables even though I am logging on
as a dbo.
Any ideas why not?
"Uri Dimant" wrote:

> Hi
> Because these accounts are not member of sysadmin server role
> Try do
> CREATE TABLE dbo.Mytabale
> (
> blalala
> )
> "Firestarter" <Firestarter@.discussions.microsoft.com> wrote in message
> news:5C0E66A8-2327-456A-8605-A9B13D82C158@.microsoft.com...
> denied.
>
>
|||"Firestarter" schrieb:
> Yes, I'm sure that would help create the tables as owned by dbo, but that
> that is not my issue.
> I still can't update or insert into these tables even though I am logging on
> as a dbo.
> Any ideas why not?
You can update the tables as dbo! You just have to add the ownername before
the objectname (as the dbo is not the owner of the object).
Objects that belong to the dbo can always be accessed by everybody without
the owner's name, because 'dbo' is the default owner ...
|||> My NT and my Ad user account are both shown as dbo on a database.
Are these Windows or SQL Server logins?
Since you say that two different logins are "dbo" in a database, you are saying that both are
sysadmin? Right? (You cannot have two logins being the same user in a database).
How do you determine that both are dbo? What tools/commands do you use to determine this?
Or are you saying that both are in the db_owner role in the database? That is a different thing from
being the dbo of a database.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Firestarter" <Firestarter@.discussions.microsoft.com> wrote in message
news:5C0E66A8-2327-456A-8605-A9B13D82C158@.microsoft.com...
> Hi,
> My NT and my Ad user account are both shown as dbo on a database.
> However, when I create tables using either account they are shown as not
> being owned by dbo.
> Then, when I try to insert or update these tables, it says permission denied.
> How can this be? I'm a dbo? Even if I wern't a dbo, as I own the table I
> shoyuld be able to modify its data. Whats going on here?
> Thanks
|||No, I can't! Thats my point. Wether I put the owner name or not, I canot
update the table.
That is the issue I am trying to resolve.
"Christian Donner" wrote:

> "Firestarter" schrieb:
> You can update the tables as dbo! You just have to add the ownername before
> the objectname (as the dbo is not the owner of the object).
> Objects that belong to the dbo can always be accessed by everybody without
> the owner's name, because 'dbo' is the default owner ...
|||These are windows logins.
And I mean that both are in the db_owner role. Apologies for the lack of
prescsion in my post.
I am using EM to determine this,
"Tibor Karaszi" wrote:

> Are these Windows or SQL Server logins?
> Since you say that two different logins are "dbo" in a database, you are saying that both are
> sysadmin? Right? (You cannot have two logins being the same user in a database).
> How do you determine that both are dbo? What tools/commands do you use to determine this?
> Or are you saying that both are in the db_owner role in the database? That is a different thing from
> being the dbo of a database.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Firestarter" <Firestarter@.discussions.microsoft.com> wrote in message
> news:5C0E66A8-2327-456A-8605-A9B13D82C158@.microsoft.com...
>
|||When a db_owner (who isn't dbo) creates an object, it will not be owned by dbo. It will be owned by
that persons user name in the database. You cannot change that.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Firestarter" <Firestarter@.discussions.microsoft.com> wrote in message
news:D4179915-0813-403B-B075-A20DAD8C312D@.microsoft.com...[vbcol=seagreen]
> These are windows logins.
> And I mean that both are in the db_owner role. Apologies for the lack of
> prescsion in my post.
> I am using EM to determine this,
> "Tibor Karaszi" wrote:
|||Firestarter wrote:
> No, I can't! Thats my point. Wether I put the owner name or not, I
> canot update the table.
> That is the issue I am trying to resolve.
>
Are you specifying the dbo owner name in the create statement as Uri
suggested? If not, try it that way.
David Gugick
Quest Software
www.imceda.com
www.quest.com
|||In an attempt to avoid the confusion I am creating, this is what I've got:
--AD server, table created using an AD account which is a member of db_owner
fixed db role
create table felix1 (test varchar(10) null)
-- Shows in EM as being owned by londonfire\hedleyf, as expected
create table dbo.felix1 (test varchar(10) null)
-- Shows in EM as being owned by dbo, as expected
insert felix1 (test)
values (2)
--results
Server: Msg 229, Level 14, State 5, Line 1
INSERT permission denied on object 'felix1', database 'CFS_HFSRA_V3_test',
owner 'LONDONFIRE\HEDLEYF'.
insert dbo.felix1 (test)
values (2)
--results
Server: Msg 229, Level 14, State 5, Line 1
INSERT permission denied on object 'felix1', database 'CFS_HFSRA_V3_test',
owner 'dbo'.
So I am in the db_owner role, and seem unable to update a table.
What is going on?
Thanks for your continued patience...
"David Gugick" wrote:

> Firestarter wrote:
> Are you specifying the dbo owner name in the create statement as Uri
> suggested? If not, try it that way.
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com
>
sql

Permssion denied for dbo

Hi,
My NT and my Ad user account are both shown as dbo on a database.
However, when I create tables using either account they are shown as not
being owned by dbo.
Then, when I try to insert or update these tables, it says permission denied.
How can this be? I'm a dbo? Even if I wern't a dbo, as I own the table I
shoyuld be able to modify its data. Whats going on here?
ThanksHi
Because these accounts are not member of sysadmin server role
Try do
CREATE TABLE dbo.Mytabale
(
blalala
)
"Firestarter" <Firestarter@.discussions.microsoft.com> wrote in message
news:5C0E66A8-2327-456A-8605-A9B13D82C158@.microsoft.com...
> Hi,
> My NT and my Ad user account are both shown as dbo on a database.
> However, when I create tables using either account they are shown as not
> being owned by dbo.
> Then, when I try to insert or update these tables, it says permission
denied.
> How can this be? I'm a dbo? Even if I wern't a dbo, as I own the table I
> shoyuld be able to modify its data. Whats going on here?
> Thanks|||Yes, I'm sure that would help create the tables as owned by dbo, but that
that is not my issue.
I still can't update or insert into these tables even though I am logging on
as a dbo.
Any ideas why not?
"Uri Dimant" wrote:
> Hi
> Because these accounts are not member of sysadmin server role
> Try do
> CREATE TABLE dbo.Mytabale
> (
> blalala
> )
> "Firestarter" <Firestarter@.discussions.microsoft.com> wrote in message
> news:5C0E66A8-2327-456A-8605-A9B13D82C158@.microsoft.com...
> > Hi,
> >
> > My NT and my Ad user account are both shown as dbo on a database.
> > However, when I create tables using either account they are shown as not
> > being owned by dbo.
> > Then, when I try to insert or update these tables, it says permission
> denied.
> >
> > How can this be? I'm a dbo? Even if I wern't a dbo, as I own the table I
> > shoyuld be able to modify its data. Whats going on here?
> >
> > Thanks
>
>|||"Firestarter" schrieb:
> Yes, I'm sure that would help create the tables as owned by dbo, but that
> that is not my issue.
> I still can't update or insert into these tables even though I am logging on
> as a dbo.
> Any ideas why not?
You can update the tables as dbo! You just have to add the ownername before
the objectname (as the dbo is not the owner of the object).
Objects that belong to the dbo can always be accessed by everybody without
the owner's name, because 'dbo' is the default owner ...|||> My NT and my Ad user account are both shown as dbo on a database.
Are these Windows or SQL Server logins?
Since you say that two different logins are "dbo" in a database, you are saying that both are
sysadmin? Right? (You cannot have two logins being the same user in a database).
How do you determine that both are dbo? What tools/commands do you use to determine this?
Or are you saying that both are in the db_owner role in the database? That is a different thing from
being the dbo of a database.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Firestarter" <Firestarter@.discussions.microsoft.com> wrote in message
news:5C0E66A8-2327-456A-8605-A9B13D82C158@.microsoft.com...
> Hi,
> My NT and my Ad user account are both shown as dbo on a database.
> However, when I create tables using either account they are shown as not
> being owned by dbo.
> Then, when I try to insert or update these tables, it says permission denied.
> How can this be? I'm a dbo? Even if I wern't a dbo, as I own the table I
> shoyuld be able to modify its data. Whats going on here?
> Thanks|||No, I can't! Thats my point. Wether I put the owner name or not, I canot
update the table.
That is the issue I am trying to resolve.
"Christian Donner" wrote:
> "Firestarter" schrieb:
> > Yes, I'm sure that would help create the tables as owned by dbo, but that
> > that is not my issue.
> > I still can't update or insert into these tables even though I am logging on
> > as a dbo.
> > Any ideas why not?
> You can update the tables as dbo! You just have to add the ownername before
> the objectname (as the dbo is not the owner of the object).
> Objects that belong to the dbo can always be accessed by everybody without
> the owner's name, because 'dbo' is the default owner ...|||These are windows logins.
And I mean that both are in the db_owner role. Apologies for the lack of
prescsion in my post.
I am using EM to determine this,
"Tibor Karaszi" wrote:
> > My NT and my Ad user account are both shown as dbo on a database.
> Are these Windows or SQL Server logins?
> Since you say that two different logins are "dbo" in a database, you are saying that both are
> sysadmin? Right? (You cannot have two logins being the same user in a database).
> How do you determine that both are dbo? What tools/commands do you use to determine this?
> Or are you saying that both are in the db_owner role in the database? That is a different thing from
> being the dbo of a database.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Firestarter" <Firestarter@.discussions.microsoft.com> wrote in message
> news:5C0E66A8-2327-456A-8605-A9B13D82C158@.microsoft.com...
> > Hi,
> >
> > My NT and my Ad user account are both shown as dbo on a database.
> > However, when I create tables using either account they are shown as not
> > being owned by dbo.
> > Then, when I try to insert or update these tables, it says permission denied.
> >
> > How can this be? I'm a dbo? Even if I wern't a dbo, as I own the table I
> > shoyuld be able to modify its data. Whats going on here?
> >
> > Thanks
>|||When a db_owner (who isn't dbo) creates an object, it will not be owned by dbo. It will be owned by
that persons user name in the database. You cannot change that.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Firestarter" <Firestarter@.discussions.microsoft.com> wrote in message
news:D4179915-0813-403B-B075-A20DAD8C312D@.microsoft.com...
> These are windows logins.
> And I mean that both are in the db_owner role. Apologies for the lack of
> prescsion in my post.
> I am using EM to determine this,
> "Tibor Karaszi" wrote:
>> > My NT and my Ad user account are both shown as dbo on a database.
>> Are these Windows or SQL Server logins?
>> Since you say that two different logins are "dbo" in a database, you are saying that both are
>> sysadmin? Right? (You cannot have two logins being the same user in a database).
>> How do you determine that both are dbo? What tools/commands do you use to determine this?
>> Or are you saying that both are in the db_owner role in the database? That is a different thing
>> from
>> being the dbo of a database.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>> "Firestarter" <Firestarter@.discussions.microsoft.com> wrote in message
>> news:5C0E66A8-2327-456A-8605-A9B13D82C158@.microsoft.com...
>> > Hi,
>> >
>> > My NT and my Ad user account are both shown as dbo on a database.
>> > However, when I create tables using either account they are shown as not
>> > being owned by dbo.
>> > Then, when I try to insert or update these tables, it says permission denied.
>> >
>> > How can this be? I'm a dbo? Even if I wern't a dbo, as I own the table I
>> > shoyuld be able to modify its data. Whats going on here?
>> >
>> > Thanks
>>|||Firestarter wrote:
> No, I can't! Thats my point. Wether I put the owner name or not, I
> canot update the table.
> That is the issue I am trying to resolve.
>
Are you specifying the dbo owner name in the create statement as Uri
suggested? If not, try it that way.
--
David Gugick
Quest Software
www.imceda.com
www.quest.com|||In an attempt to avoid the confusion I am creating, this is what I've got:
--AD server, table created using an AD account which is a member of db_owner
fixed db role
create table felix1 (test varchar(10) null)
-- Shows in EM as being owned by londonfire\hedleyf, as expected
create table dbo.felix1 (test varchar(10) null)
-- Shows in EM as being owned by dbo, as expected
--
insert felix1 (test)
values (2)
--results
Server: Msg 229, Level 14, State 5, Line 1
INSERT permission denied on object 'felix1', database 'CFS_HFSRA_V3_test',
owner 'LONDONFIRE\HEDLEYF'.
insert dbo.felix1 (test)
values (2)
--results
Server: Msg 229, Level 14, State 5, Line 1
INSERT permission denied on object 'felix1', database 'CFS_HFSRA_V3_test',
owner 'dbo'.
So I am in the db_owner role, and seem unable to update a table.
What is going on?
Thanks for your continued patience...
"David Gugick" wrote:
> Firestarter wrote:
> > No, I can't! Thats my point. Wether I put the owner name or not, I
> > canot update the table.
> > That is the issue I am trying to resolve.
> >
> Are you specifying the dbo owner name in the create statement as Uri
> suggested? If not, try it that way.
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com
>|||Firestarter wrote:
> In an attempt to avoid the confusion I am creating, this is what I've
> got:
To avoid confusion, you should _always_ include the owner name is DDL,
DML, and SELECT statements. Try granting yourself rights to the table.
--
David Gugick
Quest Software
www.imceda.com
www.quest.com|||Tried that, didn't work. But I shouldn't have anyway, should I?
"David Gugick" wrote:
> Firestarter wrote:
> > In an attempt to avoid the confusion I am creating, this is what I've
> > got:
> To avoid confusion, you should _always_ include the owner name is DDL,
> DML, and SELECT statements. Try granting yourself rights to the table.
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com
>

Friday, March 9, 2012

permissions

I am working http location and using sql server 2005 ,it is showing an error as " DELETE permission denied on object 'CourseDetails', database 'LOGIN', schema 'dbo'." CourseDetails is my table name and LOGIN is my database name.

Goto SQL Server Management Studio 2005--> Goto your database (LOGIN)--> Right click on the table name (CourseDetails)--> Select Properties

There goto the Permissions tab and click add... You can add the permission here...

But the question is WHY would you want to add delete permissions on your SQL Table? What you should do is write a Stored Procedure to delete the data in there and give the procedure execute permissions.

|||

Thank u deepak

Wednesday, March 7, 2012

Permission to view system tables in master database

I am trying to avoid the "Permission denied" error message when a proc tries
to select records from one of the system tables in a SQL Server 2005 master
database.
Sepcifically I need to be able to capture the IP address of the calling user
which I can get from sys.dm_exec_connections.
I have struggled with this for some time and could not find anything
directly on point in MSDN. However, I was able to cobble something together
that "appears" to work as shown below.
I am hoping that someone who has specific experience with this issue might
be able to comment on my approach and point out any issues or deficiencies.
Thanks
Dave
/*
Creating a proc that can view server state
1. Create a special login and grant it VIEW SERVER STATE permissions in
Master DB
2. Create user for special login in the User DB
3. Create proc that accesses system tables using "WITH EXECUTE AS" the
special user
4. Create a cerificate in the User DB
5. Sign the proc with the cerificate
6. Create the cerificate from backup in the Master DB
7. Create an authorization login mapped to the certificate in the Master DB
8. Grant AUTHENTICATE SERVER to the authorization login in the Master DB
9. Grant EXECUTE perms on the proc to users in the User DB
*/
--0. Create a test database
USE master
CREATE DATABASE testcert
GO
--1. Create a special login and grant it VIEW SERVER STATE permissions in
Master DB
CREATE LOGIN myViewUser WITH PASSWORD = '!Pa55word!' ;
GO
USE master
GO
GRANT VIEW ANY DEFINITION TO myViewUser ;
GO
GRANT VIEW SERVER STATE TO myViewUser ;
GO
--
--2. Create user for special login in the User DB
USe testCert
GO
CREATE USER myViewUser FOR LOGIN myViewUser ;
GO
--
--3. Create proc that accesses system tables using "WITH EXECUTE AS" the
special user
IF object_id('myPROC') IS NOT NULL
DROP PROCEDURE myPROC
GO
CREATE PROCEDURE myPROC
WITH EXECUTE AS 'myViewUser'
AS
BEGIN
DECLARE @.ip Varchar(60)
SELECT @.ip=client_net_address
FROM sys.dm_exec_connections
WHERE session_id=@.@.spid
PRINT @.ip
END
GO
--
--Test: cannot execute - The user does not have permission to perform this
action.
EXEC myPROC
--4. Create a cerificate in the User DB
CREATE CERTIFICATE myCERT
ENCRYPTION BY PASSWORD = '!Pa55word!'
WITH SUBJECT = 'Test cert',
EXPIRY_DATE = '12/05/2010';
GO
BACKUP CERTIFICATE myCERT TO FILE = 'myCERT.cer' ;
--5. Sign the proc with the cerificate
ADD SIGNATURE TO myPROC
BY CERTIFICATE myCERT
WITH PASSWORD = '!Pa55word!'
GO
--6. Create the cerificate from backup in the Master DB
USE master --Permissions at the server scope can only be granted when the
current database is master
CREATE CERTIFICATE myCert FROM FILE = 'myCERT.cer'
--7. Create an authorization login mapped to the certificate in the Master D
B
CREATE LOGIN myAuthLogin
FROM CERTIFICATE mycert ;
GO
--
--8. Grant AUTHENTICATE SERVER to the authorization login in the Master DB
-- WIEW permissions are server-level permissions, grant AUTHENTICATE SERVER
to certificate mapped login
GRANT AUTHENTICATE SERVER TO myAuthLogin
GO
--test
USE testCert
--I can execute proc
EXEC myPROC
--create some users
CREATE LOGIN testuser1 WITH PASSWORD = '!Pa55word!' ;
CREATE USER testuser1 FOR LOGIN testuser1 ;
CREATE LOGIN testuser2 WITH PASSWORD = '!Pa55word!' ;
CREATE USER testuser2 FOR LOGIN testuser2 ;
--test
execute as login = 'testuser1'
select suser_name()
--cannot execute: EXECUTE permission denied on object 'myPROC', database
'testcert', schema 'dbo'.
EXEC myPROC
revert
--
--9. Grant EXECUTE perms on the proc to users in the User DB
GRANT EXECUTE ON myPROC TO testuser1
--test again
execute as login = 'testuser1'
select suser_name()
--now can execute
EXEC myPROC
revert
execute as login = 'testuser2'
select suser_name()
--but others cabnnnot until granted perms on the proc
EXEC myPROC
revert
--Clean UP
USE testCert
GO
DROP USER testuser1
DROP LOGIN testuser1
GO
DROP USER testuser2
DROP LOGIN testuser2
GO
DROP PROC myPROC
GO
DROP USER myViewUser
DROP LOGIN myViewUser
GO
DROP CERTIFICATE myCERT
GO
USE master
GO
DROP LOGIN myAuthLogin
DROP CERTIFICATE myCERT
GO
DROP DATABASE testcert
GO
EXEC sp_configure 'show advanced options', 1 ;
GO
RECONFIGURE ;
GO
EXEC sp_configure 'xp_cmdshell', 1 ;
GO
RECONFIGURE ;
GO
--EXEC xp_cmdshell 'DIR "D:\SQLDATA\MSSQL.1\*.cer"' ;
--EXEC xp_cmdshell 'del "D:\SQLDATA\MSSQL.1\myCert.cer"' ;
EXEC xp_cmdshell 'DIR "C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\*.cer"' ;
EXEC xp_cmdshell 'del "C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\myCert.cer"' ;
EXEC xp_cmdshell 'DIR "C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\*.cer"' ;
GO
EXEC sp_configure 'xp_cmdshell', 0 ;
GO
RECONFIGURE ;After further searching I found a cleaner way to accomplish what I need to
do. See example below.
Although I am not entirely sure why this line is necessary:
-- now that we signed the procedure, we can drop the private key
alter certificate certSignCreatePrincipal remove private key;
/*
Laurentiu Cristofor's blog
SQL Server 2005: procedure signing demo
http://blogs.msdn.com/lcris/archive.../15/429631.aspx
*/
create database demo;
use demo;
CREATE LOGIN alice WITH PASSWORD = '!Pa55word!' ;
CREATE USER alice FOR LOGIN alice
-- create a procedure that selects from sys.dm_exec_connections
create procedure sp_CreatePrincipal
AS
DECLARE @.ip Varchar(60)
SELECT @.ip=client_net_address
FROM sys.dm_exec_connections
WHERE session_id=@.@.spid
PRINT @.ip
go
-- now use this newly added procedure
-- to create a low privileged principal
EXEC sp_CreatePrincipal
-- we'll now want alice to be able to use the procedure and create new
principals
-- but without granting her directly the permissions
grant execute on sp_CreatePrincipal to alice;
-- verify that alice cannot create principals
execute as login = 'alice';
EXEC sp_CreatePrincipal
revert;
-- first, we'll need to create a database master key
create master key encryption by password = 'Apufe@.))%';
-- create a certificate to sign the procedure
create certificate certSignCreatePrincipal with subject = 'for signing
procedure sp_CreatePrincipal';
-- sign procedure sp_CreatePrincipal
add signature to sp_CreatePrincipal by certificate certSignCreatePrincipal;
-- now that we signed the procedure, we can drop the private key
alter certificate certSignCreatePrincipal remove private key;
-- backup certificate to file; it will be used later to put the certificate
in master
backup certificate certSignCreatePrincipal to file =
'certSignCreatePrincipal.cer';
-- create and map a user to the certificate
--? create user u_certSignCreatePrincipal from certificate
certSignCreatePrincipal;
-- create the same certificate in master now
use master;
create certificate certSignCreatePrincipal from file =
'certSignCreatePrincipal.cer';
-- create and map a login to the certificate
create login l_certSignCreatePrincipal from certificate
certSignCreatePrincipal;
GRANT VIEW SERVER STATE TO l_certSignCreatePrincipal;
-- we're done!
use demo;
-- check that the certificate in demo matches the one in master
select c.name
from sys.certificates c
JOIN master.sys.certificates mc ON c.thumbprint = mc.thumbprint;
-- verify that alice can now create principals
execute as login = 'alice';
sp_CreatePrincipal
revert;
-- cleanup
drop user u_certSignCreatePrincipal;
drop login l_certSignCreatePrincipal;
drop procedure sp_CreatePrincipal;
drop certificate certSignCreatePrincipal;
drop user alice;
drop login alice;
drop user bob;
drop login bob;
EXEC sp_configure 'xp_cmdshell', 1 ;
RECONFIGURE ;
EXEC xp_cmdshell 'del "C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\certSignCreatePrincipal.cer"' ;
EXEC xp_cmdshell 'DIR "C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\*.cer"' ;
use master;
drop certificate certSignCreatePrincipal;
drop database demo;|||Dave (Dave@.discussions.microsoft.com) writes:
> I am trying to avoid the "Permission denied" error message when a proc
> tries to select records from one of the system tables in a SQL Server
> 2005 master database.
> Sepcifically I need to be able to capture the IP address of the calling
> user which I can get from sys.dm_exec_connections.
> I have struggled with this for some time and could not find anything
> directly on point in MSDN. However, I was able to cobble something
> together that "appears" to work as shown below.
> I am hoping that someone who has specific experience with this issue
> might be able to comment on my approach and point out any issues or
> deficiencies.
Yes, you have to do something you did, although you don't the EXECUTE
AS thing. Certificate signing is all you need. I have an article on
my web site that show how you can do this:
http://www.sommarskog.se/grantperm.html
Since you seem to have grasped some of this already, you may want to
rush through until the first BULK INSERT example.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Thanks Erland Sommarskog.
That is a very useful web site at http://www.sommarskog.se/
However, one thing I am not clear on; why do you back up the private key and
Laurentiu drops it? What is the risk of dropping it like he did?
Erland Sommarskog's example:
BACKUP CERTIFICATE reloadcert TO FILE = 'C:\temp\reloadcert.cer'
WITH PRIVATE KEY (FILE = 'C:\temp\reloadcert.pvk' ,
ENCRYPTION BY PASSWORD = 'Tomorrow never knows',
DECRYPTION BY PASSWORD = 'All you need is love')
Laurentiu Cristofor's example:
alter certificate certSignCreatePrincipal remove private key;
backup certificate certSignCreatePrincipal to file =
'certSignCreatePrincipal.cer';|||Dave (Dave@.discussions.microsoft.com) writes:
> That is a very useful web site at http://www.sommarskog.se/
> However, one thing I am not clear on; why do you back up the private key
> and Laurentiu drops it? What is the risk of dropping it like he did?
>
> Erland Sommarskog's example:
> BACKUP CERTIFICATE reloadcert TO FILE = 'C:\temp\reloadcert.cer'
> WITH PRIVATE KEY (FILE = 'C:\temp\reloadcert.pvk' ,
> ENCRYPTION BY PASSWORD = 'Tomorrow never knows',
> DECRYPTION BY PASSWORD = 'All you need is love')
>
> Laurentiu Cristofor's example:
> alter certificate certSignCreatePrincipal remove private key;
> backup certificate certSignCreatePrincipal to file =
> 'certSignCreatePrincipal.cer';
If I do it in one way, and Laurentiu another, Laurentiu is likely to be
right! (Unless it's the usage of EXECUTE AS, where we are known to
disagree. :-)
I will have to admit that I was not aware of the REMOVE PRIVATE KEY
clause. I used what I was able to get to work. Dropping the private key
seems to be a better idea. However, as I understand it, it calls for a
different order of things. To wit, I first create the certificate and the
login in master, export the cert, and then move to the target database
where I sign the procedure. As I need the privte key to sign, I do need
the private key at this point.
I should definitely spend some time reworking the example - I only
need to find that time. :-)
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Monday, February 20, 2012

Permission denied trying to delete user

Hi,
iam ratnesh and want to delet the user which is created in database, it gives me error that selected cannot be droped because the user owns object, pls help me to resolve the problem.

Regards[First use sp_changeobjectowner to convert the ownership to dbo from that user and then drop the unwanted user.

Permission Denied to object

We recently brought up SQL Server and migrated our Access 2000 back end DB t
o
it. The SQL Server security seemed pretty straight forward to me...I set up
the users and the roles and assigned the roles rights to my tables. The
problem is that my users get a Permission Denied error when ever the Access
2000 front end tries to access any SQL Server table unless I add them to the
System Administrator server role. I've gone over everything and I can't see
m
to figure this out. The only thing I can find that seems strange is that on
that database, my login name is associated with the "dbo" name. I think tha
t
makes me the owner of the db and I'm wondering if that is what is causing my
issue. I'd greatly appreciate any insight on how to get this issue taken
care of.
Thanks in advance!
JimNevermind, I found the answer to my problem in another post. Don't assign
the db_denydatareader or db_denydatawriter role to the user. That cleared u
p
my problem.
"Jim" wrote:

> We recently brought up SQL Server and migrated our Access 2000 back end DB
to
> it. The SQL Server security seemed pretty straight forward to me...I set
up
> the users and the roles and assigned the roles rights to my tables. The
> problem is that my users get a Permission Denied error when ever the Acces
s
> 2000 front end tries to access any SQL Server table unless I add them to t
he
> System Administrator server role. I've gone over everything and I can't s
eem
> to figure this out. The only thing I can find that seems strange is that
on
> that database, my login name is associated with the "dbo" name. I think t
hat
> makes me the owner of the db and I'm wondering if that is what is causing
my
> issue. I'd greatly appreciate any insight on how to get this issue taken
> care of.
> Thanks in advance!
> Jim

permission denied on object 'sp_sdidebug', database 'dbname',

Hi.
I have seen lots of discussion.
My starting problem was that after installing sql server 2000 and sp3, I cou
ld
not debug stored procedures.
I thought I saw the solution in MSDN, but
it did not work for me (I could not grant execute
on sp_sdidebug to my user).
short end is.. I had to do something else.
I'm developing on a local mssqlserver 2000 sp3
windows 2000 is the o/s
I logged in as the sp and ran this:
EXECUTE sp_sdidebug 'LEGACY_ON'
Then I tried to enter this:
GRANT EXECUTE
ON sp_sdidebug
TO MYUSER
But I got an error about not being able to set permissions for objects owned
by others.
I'm obviously clueless, but I did find a blurb from someone who said they
had to add the users to the MASTER database as users with db_owner checked.
After I did this, I could debug sp's, but still could not do the 'GRANT
EXECUTE ON sp_sdidebug'.
So
1 - what is the best way to get the (EXECUTE sp_sdidebug 'LEGACY_ON')
executed each time the db starts up? (if I need to put it in some sp, how
exactly do I get that called at startup?)
2 - any idea what I'm boffing here to prevent the 'GRANT EXECUTE ON
sp_sdidebug' from working?
3 - any thoughts about the MASTER.db_owner "solution"?
Thanks for your patience as I am sure this is a well trampled ground.
Jeff KishJeff,
Why do you need to GRANT execute on this sp?
AMB
"Jeff Kish" wrote:

> Hi.
> I have seen lots of discussion.
> My starting problem was that after installing sql server 2000 and sp3, I c
ould
> not debug stored procedures.
> I thought I saw the solution in MSDN, but
> it did not work for me (I could not grant execute
> on sp_sdidebug to my user).
> short end is.. I had to do something else.
> I'm developing on a local mssqlserver 2000 sp3
> Windows 2000 is the o/s
> I logged in as the sp and ran this:
> EXECUTE sp_sdidebug 'LEGACY_ON'
> Then I tried to enter this:
> GRANT EXECUTE
> ON sp_sdidebug
> TO MYUSER
> But I got an error about not being able to set permissions for objects own
ed
> by others.
> I'm obviously clueless, but I did find a blurb from someone who said they
> had to add the users to the MASTER database as users with db_owner checked
.
> After I did this, I could debug sp's, but still could not do the 'GRANT
> EXECUTE ON sp_sdidebug'.
>
> So
> 1 - what is the best way to get the (EXECUTE sp_sdidebug 'LEGACY_ON')
> executed each time the db starts up? (if I need to put it in some sp, how
> exactly do I get that called at startup?)
> 2 - any idea what I'm boffing here to prevent the 'GRANT EXECUTE ON
> sp_sdidebug' from working?
> 3 - any thoughts about the MASTER.db_owner "solution"?
> Thanks for your patience as I am sure this is a well trampled ground.
> Jeff Kish
>|||When I installed ms sql server with sp3 I found I could not run the debug
on stored procedures. It was grayed out.
Once I did some research, I determined (I "think" from MSDN) that
I needed to GRANT to run the debugger logged in as this user.
I got an error doing the GRANT. Looking around a bit more, I saw that
I also needed to run in legacy mode for this object.
I submitted a script for that, but I still could not GRANT.
After substantially more investigation, I saw one user was able to get the
debugger running if he added his user as a db_owner to the master
database.
After I did this, I still could not do the GRANT, but was able to run the
debugger on stored procedures.
Now I'm trying to figure out if what I did was a reasonable solution, and
why I could not do the GRANT. Finally, I'm casting about for an explanation
and some level of confidence for what I did to "fix" the problem.
Also, I wanted to figure out how to run the LEGACY script at startup so I
don't need to do it every time.
Thanks
On Mon, 28 Feb 2005 16:49:04 -0800, "Alejandro Mesa"
<AlejandroMesa@.discussions.microsoft.com> wrote:
>Jeff,
>Why do you need to GRANT execute on this sp?
>
>AMB
>
>"Jeff Kish" wrote:
>
Jeff Kish

permission denied on object

I connect in my database "test" with the user "teste" by SQL QueryAnalyzer (localhost;DatabaseName=test;SelectMethod=cursor),
but when i run the SQL (select * from user) return the error
"SELECT permission denied on object 'user', database 'test', owner 'teste'.

I already put all permission to the user "user".

My database test has a table "user". The owners "teste" and the Types "User"
The user "teste" has all permission to the table "user" (select, update, insert ...)

what i need to do ? Whats wrong ?The user may possibly be denied access to the table or a member of a group that is denied access to the table or possibly a member of db_denydatareader.

Permission Denied Javascript errors

I have a report I've been running for several months using a URL like the one
below:
http://server/ReportServer?/folder/report&rs:Command=Render
I updated the report today and now I get 2 "Permission Denied" javascript
errors when the page loads. One is in function OnLoadToolbar calling
SetShowHideParameters and the other is in function LoadToolbarFrame on an if
statement (if (frames["oTbDMRepFram"0.location... The report works fine when
I go to the report manager in my browser and works fine in VS.NET. Any help
is appreciated.I found a workaround. I had unchecked "Show Friendly HTTP Errors" in my
browser. When I re-activated it, the report runs fine.
"jweesies" wrote:
> I have a report I've been running for several months using a URL like the one
> below:
> http://server/ReportServer?/folder/report&rs:Command=Render
> I updated the report today and now I get 2 "Permission Denied" javascript
> errors when the page loads. One is in function OnLoadToolbar calling
> SetShowHideParameters and the other is in function LoadToolbarFrame on an if
> statement (if (frames["oTbDMRepFram"0.location... The report works fine when
> I go to the report manager in my browser and works fine in VS.NET. Any help
> is appreciated.
>

Permission denied in ASP.NET 2.0 with IE

When I start my ASP.NET 2.0 Website in VS2005 with XPSP2 I can connect to
the SQL-Express Database without problems
But when I start my Website with Internet Explorer I get the following
error:
CREATE DATABASE permission denied in database 'master'.
An attempt to attach an auto-named database for file
C:\CKlein1\App_Data\Ger1_Data.mdf failed. A database with the same name
exists, or specified file cannot be opened, or it is located on UNC share.
SQLExpress runs under NT AUTHORITY/NetworkService and the connection string
in web.config is:
"Data
Source=. \SQLEXPRESS;AttachDbFilename=|DataDirect
ory|\Ger1_Data.mdf;Integrate
d
Security=True;User Instance=False"
1. Why does it work with VS2005 and not with Internet Explorer?
2. How can I set the rigth permission to the daba base?
HelmutI would change tactics here. I would stop using AttachDbFilename. To do so
you simply need to run a one-time script to attach the database to master.
After that, the database remain in place indefinitely . In any case you need
to set the initial catalog in the ConnectionString. See Chapter 9 of my book
for a longer discussion of this issue.
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
----
---
"Helmut Guenther" <q@.2qw.de> wrote in message
news:%23BP2KfOHIHA.4880@.TK2MSFTNGP03.phx.gbl...
> When I start my ASP.NET 2.0 Website in VS2005 with XPSP2 I can connect to
> the SQL-Express Database without problems
> But when I start my Website with Internet Explorer I get the following
> error:
> CREATE DATABASE permission denied in database 'master'.
> An attempt to attach an auto-named database for file
> C:\CKlein1\App_Data\Ger1_Data.mdf failed. A database with the same name
> exists, or specified file cannot be opened, or it is located on UNC share.
> SQLExpress runs under NT AUTHORITY/NetworkService and the connection
> string in web.config is:
> "Data
> Source=. \SQLEXPRESS;AttachDbFilename=|DataDirect
ory|\Ger1_Data.mdf;Integra
ted
> Security=True;User Instance=False"
> 1. Why does it work with VS2005 and not with Internet Explorer?
> 2. How can I set the rigth permission to the daba base?
> Helmut
>

permission denied in accessing SQl 2000

Good day,

Is there anyone could help me, I'm moving our database from old machine to a new one and Iused DTS to move it the new box. Somehow it was moved but I'm still having probelm with my front-end application when I'm trying to open it the error is something like this.

"3704-Operation is not allowed when the object is closed.
an error occurred in Cal_General.CheckDBVSN.Global Error:
-2147217911 -SELECT permission denied on object 'Global_config', Database 'dbase1', owner "App1.
underlying Errors:
Error #-217217911
SELECT permission denied on object 'Global_config' database 'calsql1', owner "App1'.
(Source MIcrosoft OLE Provider for SQL Server)
(SQL State: 42000)
(NativeError:229)
No Help file available."

Hope someone could resolve my query.

Thanks,

The databases may have been moved but not the permissions. If you have a security script with the scripted permissions you should execute it on the new server. The error indicates that the objects exists but the connecting user has no permissions querying them.

Jens K. Suessmeyer

http://www.sqlserver2005.de
|||

Hi Jens,

I already checked the permission of the table and selected those admin rights to make sure that I could be able to use the tabel but still the same proble I get. It is hard for me to work with the SQL co'z my boss assigned my from Sys admin to DB admin I'm really have a hard time to solve the problem.

Vinci

|||OK, having dbadmin rights should be eough in your case to administer the permissions needed. Did you make sure that the user has permissions accessing the following objects:

SELECT permission denied on object 'Global_config', Database 'dbase1', owner "App1.
SELECT permission denied on object 'Global_config' database 'calsql1', owner "App1'.

if the object are views, make sure that the underlying tables are also accessible to the user (if the ownership chain is broken)

Jens K. Suessmeyer

http://www.sqlserver2005.de

permission denied in accessing SQl 2000

Good day,

Is there anyone could help me, I'm moving our database from old machine to a new one and Iused DTS to move it the new box. Somehow it was moved but I'm still having probelm with my front-end application when I'm trying to open it the error is something like this.

"3704-Operation is not allowed when the object is closed.
an error occurred in Cal_General.CheckDBVSN.Global Error:
-2147217911 -SELECT permission denied on object 'Global_config', Database 'dbase1', owner "App1.
underlying Errors:
Error #-217217911
SELECT permission denied on object 'Global_config' database 'calsql1', owner "App1'.
(Source MIcrosoft OLE Provider for SQL Server)
(SQL State: 42000)
(NativeError:229)
No Help file available."

Hope someone could resolve my query.

Thanks,

The databases may have been moved but not the permissions. If you have a security script with the scripted permissions you should execute it on the new server. The error indicates that the objects exists but the connecting user has no permissions querying them.

Jens K. Suessmeyer

http://www.sqlserver2005.de
|||

Hi Jens,

I already checked the permission of the table and selected those admin rights to make sure that I could be able to use the tabel but still the same proble I get. It is hard for me to work with the SQL co'z my boss assigned my from Sys admin to DB admin I'm really have a hard time to solve the problem.

Vinci

|||OK, having dbadmin rights should be eough in your case to administer the permissions needed. Did you make sure that the user has permissions accessing the following objects:

SELECT permission denied on object 'Global_config', Database 'dbase1', owner "App1.
SELECT permission denied on object 'Global_config' database 'calsql1', owner "App1'.

if the object are views, make sure that the underlying tables are also accessible to the user (if the ownership chain is broken)

Jens K. Suessmeyer

http://www.sqlserver2005.de

Permission Denied executing SP that reads foreign table!

I thought I had a reasonable understanding of how Stored Procedure security
worked, but I've been caught out by something and now I'm a little puzzled.
When a stored procedure is executed the user calling the SP may not have
access to the base tables, but that doesn't matter as the SP runs under the
creators rights and in this case its the dbo who owns the SP. So far so
good.
However we have split our tables across two database (still on the same
server however). We have company data DB's where all requests originate and
to save time and duplication we have a central database holding information
that is common to all company DB's.
When an SP is executed on a company DB that needs to select data from the
central DB, we get a permission denied message.
Why is this? All objects across these databases on the same server are owned
by the same person... the DBO. so why doesn't this work.
In order to resolve this it seems I'm going to have to give select
permissions on certain tables within this central DB and that is what I was
trying to avoid.
Any help on the mechanics of this would be gratefully received
Steve Le Monnier> When a stored procedure is executed the user calling the SP may not have
> access to the base tables, but that doesn't matter as the SP runs under
> the creators rights and in this case its the dbo who owns the SP. So far
> so good.
This statement is not entirely correct; the proc doesn't run under the
creator's (owner) rights. Permissions on objects referenced by the proc are
not checked as long as the objects involved have the same owner. This is
called an unbroken ownership chain.

> Why is this? All objects across these databases on the same server are
> owned by the same person... the DBO. so why doesn't this work.
Cross-database ownership chaining is a little confusing because of
login/user mapping. It is not the name of the object owner that controls
the ownership chain, it is the login associated with the object owner.
Since the login mapping for the 'dbo' user is determined by database
ownership, both databases need to have the same owner in order to provide an
unbroken ownership chain for dbo-owned objects.
If you are using SQL 2000 SP3 or above, you need to also enable the 'db
chaining' database option for the databases involved. This should be done
only when you fully trust those users that have permissions to create
dbo-owned objects. See the Books Online for more information.
Hope this helps.
Dan Guzman
SQL Server MVP
"Steve Le Monnier" <steve_lemon@.hotmail.com.nospam.com> wrote in message
news:OBrDEOh3FHA.2432@.TK2MSFTNGP10.phx.gbl...
> I thought I had a reasonable understanding of how Stored Procedure
> security worked, but I've been caught out by something and now I'm a
> little puzzled.
> When a stored procedure is executed the user calling the SP may not have
> access to the base tables, but that doesn't matter as the SP runs under
> the creators rights and in this case its the dbo who owns the SP. So far
> so good.
> However we have split our tables across two database (still on the same
> server however). We have company data DB's where all requests originate
> and to save time and duplication we have a central database holding
> information that is common to all company DB's.
> When an SP is executed on a company DB that needs to select data from the
> central DB, we get a permission denied message.
> Why is this? All objects across these databases on the same server are
> owned by the same person... the DBO. so why doesn't this work.
> In order to resolve this it seems I'm going to have to give select
> permissions on certain tables within this central DB and that is what I
> was trying to avoid.
> Any help on the mechanics of this would be gratefully received
> Steve Le Monnier
>
>|||Thanks for the input Dan, I'm going to hit the Books On Line to read up on
DB Chaining.
Cheers
Steve Le Monnier
"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:eJrlkyh3FHA.3976@.TK2MSFTNGP15.phx.gbl...
> This statement is not entirely correct; the proc doesn't run under the
> creator's (owner) rights. Permissions on objects referenced by the proc
> are not checked as long as the objects involved have the same owner. This
> is called an unbroken ownership chain.
>
> Cross-database ownership chaining is a little confusing because of
> login/user mapping. It is not the name of the object owner that controls
> the ownership chain, it is the login associated with the object owner.
> Since the login mapping for the 'dbo' user is determined by database
> ownership, both databases need to have the same owner in order to provide
> an unbroken ownership chain for dbo-owned objects.
> If you are using SQL 2000 SP3 or above, you need to also enable the 'db
> chaining' database option for the databases involved. This should be done
> only when you fully trust those users that have permissions to create
> dbo-owned objects. See the Books Online for more information.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Steve Le Monnier" <steve_lemon@.hotmail.com.nospam.com> wrote in message
> news:OBrDEOh3FHA.2432@.TK2MSFTNGP10.phx.gbl...
>

Permission denied error 2nd Post

New user of SQL
Everything is on the same machine
My error is close to the bottom
After reading it today, I can see there is a problem with 2 dbases
'PUBS' and 'Master'
There are also some comments from the group:
--microsoft.public.sqlserver.odbc-- subject: Permission Denied -- Thanks
for help guys
I was able to find a trial version of the Enterprise Manager.
It was suggested to make the post over in dotnet.framework. I am new to
SQL. I can see the following in the MSDE manager:
sql server(my machine name\'SDK)
after I right click on 'PUBS'
--Users/Roles/Public
--public
--machine_name\aspnet
--guest
guest is the only one with 5 check marks going across from left to right for
the following:
Create Table, Create View, Create SP, Create Default, Create Rule
the following 3 are blank:
Create Function, Backup DB, and Backup Log
public has just 1 check mark on
Create SP
machine_name\aspnet is blank from left to right.
CREATE DBASE right is not displayed.
How can I solve my Permission denied error problem?
Thanks for the help,
Taishi
--Comments--
Hi Tashi!
You can ue Enterprise manager to set the rights. Locate the table, and right
click. Select All Tasks, then Manage Permissions. Locate the user that you
are using in your connection object, and then grant the rights. I agree with
Greg that the web user should not normally have that level of permission.
One false move and your server and data could be toast. If you are really
trying to create a table, or attach a database, you should be doing that
through Enterprise Manager, and not the web interface.
Sloan
"Taishi" <taishi_bak@.hotmail.com> wrote in message
news:u54GDcN7DHA.1428@.TK2MSFTNGP12.phx.gbl...
> How can I check the permissions/rights?
> How can I grant the correct permissions/rights?
> Thanks,
> T
> "Greg Obleshchuk" <greg-n-o-s-p-a-m-@.ag-s-o-f-t-w-a-r-e.com> wrote in
> message news:udfB$CE7DHA.2568@.TK2MSFTNGP10.phx.gbl...
> dbcreator
server
> the
granted;
maintain
> Documentation
Extended
> extraction
in
'D:\Program
not
> a
>You might want to investigate this Open Source solution:
"ASP Enterprise Manager is a web-based interface for Microsoft SQL Server
and MSDE written using ASP.Net, VB.Net and C#.Net. This project was
developed to allow many SQL Server and MSDE design and administration tasks
to be performed from any computer with a web browser. "
http://www.aspenterprisemanager.com/
http://sourceforge.net/projects/asp-ent-man/
"Taishi" <taishi_bak@.hotmail.com> wrote in message
news:edfyhn97DHA.3860@.tk2msftngp13.phx.gbl...
> New user of SQL
> Everything is on the same machine
> My error is close to the bottom
> After reading it today, I can see there is a problem with 2 dbases
> 'PUBS' and 'Master'
> There are also some comments from the group:
> --microsoft.public.sqlserver.odbc-- subject: Permission Denied -- Thanks
> for help guys
> I was able to find a trial version of the Enterprise Manager.
> It was suggested to make the post over in dotnet.framework. I am new to
> SQL. I can see the following in the MSDE manager:
> sql server(my machine name\'SDK)
> after I right click on 'PUBS'
> --Users/Roles/Public
> --public
> --machine_name\aspnet
> --guest
> guest is the only one with 5 check marks going across from left to right
> for
> the following:
> Create Table, Create View, Create SP, Create Default, Create Rule
> the following 3 are blank:
> Create Function, Backup DB, and Backup Log
> public has just 1 check mark on
> Create SP
> machine_name\aspnet is blank from left to right.
> CREATE DBASE right is not displayed.
> How can I solve my Permission denied error problem?
> Thanks for the help,
> Taishi
>
>
>
> --Comments--
> Hi Tashi!
> You can ue Enterprise manager to set the rights. Locate the table, and
> right
> click. Select All Tasks, then Manage Permissions. Locate the user that you
> are using in your connection object, and then grant the rights. I agree
> with
> Greg that the web user should not normally have that level of permission.
> One false move and your server and data could be toast. If you are really
> trying to create a table, or attach a database, you should be doing that
> through Enterprise Manager, and not the web interface.
> Sloan
> "Taishi" <taishi_bak@.hotmail.com> wrote in message
> news:u54GDcN7DHA.1428@.TK2MSFTNGP12.phx.gbl...
> server
> granted;
> maintain
> Extended
> in
> 'D:\Program
> not
>|||Hello! Ken:
I posted that website on my other posting(Permission Denied). I will do
some more research and investigating but you told me that I had to install
it on a ASP.net web server' I am a uninitiated, so I'm trying to grasp
the concept.
Hi Tashi!
You'll have to install it on a local ASP.net web server, and then use your
browser to go to the site.
Sloan
Taishi
"Ken Cox [Microsoft MVP]" <BANSPAMken_cox@.sympatico.ca> wrote in message
news:u2gF5VD8DHA.2524@.TK2MSFTNGP11.phx.gbl...
> You might want to investigate this Open Source solution:
>
> "ASP Enterprise Manager is a web-based interface for Microsoft SQL Server
> and MSDE written using ASP.Net, VB.Net and C#.Net. This project was
> developed to allow many SQL Server and MSDE design and administration
tasks
> to be performed from any computer with a web browser. "
> http://www.aspenterprisemanager.com/
> http://sourceforge.net/projects/asp-ent-man/
>
> "Taishi" <taishi_bak@.hotmail.com> wrote in message
> news:edfyhn97DHA.3860@.tk2msftngp13.phx.gbl...
Thanks
you
permission.
really
dbcreator
of
these
denied
>

Permission Denied error

Windows Pro
VS.Net
.Net Framework
ASP.NET
My 1st time using Web Forms in .Net
1st time using SQL
I am receiving the following error:
System.Data.SqlClient.SqlException: CREATE DATABASE permission denied in
database 'master'. Could not attach database 'pubs' to file 'D:\Program
Files\Microsoft SQL Server\MSSQL$NETSDK\Data\pubs.mdf'.
I tried the following:
Reboot 4-5 times
Share the folder
Web share the folder
Here is some advanced help from another SQL forum.
sp_helpsrvrolemember 'sysadmin' --> command is not on my box.
isql /usa/p/server\sdk -i\instpubs.sql --> did not work. isql is not a
command found on my box.
Any ideas?
Thanks for your help,
THello,
What are you trying to do here? Can you post the commands
To create databases you need system administrator rights and dbcreator
Permissions (from BOL)
CREATE DATABASE permission defaults to members of the sysadmin and dbcreator
fixed server roles. Members of the sysadmin and securityadmin fixed server
roles can grant CREATE DATABASE permissions to other logins. Members of the
sysadmin and dbcreator fixed server role can add other logins to the
dbcreator role. The CREATE DATABASE permission must be explicitly granted;
it is not granted by the GRANT ALL statement.
CREATE DATABASE permission is usually limited to a few logins to maintain
control over disk usage on an instance of SQL Server.
I wouldn't suggest granting the owner of a .NET IIS app either of these
rights
I hope this helps
regards
Greg O MCSD
http://www.ag-software.com/ags_scribe_index.aspx. SQL Scribe Documentation
Builder, the quickest way to document your database
http://www.ag-software.com/ags_SSEPE_index.aspx. AGS SQL Server Extended
Property Extended properties manager for SQL 2000
http://www.ag-software.com/IconExtractionProgram.aspx. Free icon extraction
program
http://www.ag-software.com. Free programming tools
"Taishi" <taishi_bak@.hotmail.com> wrote in message
news:eJuJfV16DHA.360@.TK2MSFTNGP12.phx.gbl...
> Windows Pro
> VS.Net
> .Net Framework
> ASP.NET
> My 1st time using Web Forms in .Net
> 1st time using SQL
> I am receiving the following error:
> System.Data.SqlClient.SqlException: CREATE DATABASE permission denied in
> database 'master'. Could not attach database 'pubs' to file 'D:\Program
> Files\Microsoft SQL Server\MSSQL$NETSDK\Data\pubs.mdf'.
> I tried the following:
> Reboot 4-5 times
> Share the folder
> Web share the folder
> Here is some advanced help from another SQL forum.
> sp_helpsrvrolemember 'sysadmin' --> command is not on my box.
> isql /usa/p/server\sdk -i\instpubs.sql --> did not work. isql is not a
> command found on my box.
>
> Any ideas?
> Thanks for your help,
> T
>|||How can I check the permissions/rights?
How can I grant the correct permissions/rights?
Thanks,
T
"Greg Obleshchuk" <greg-n-o-s-p-a-m-@.ag-s-o-f-t-w-a-r-e.com> wrote in
message news:udfB$CE7DHA.2568@.TK2MSFTNGP10.phx.gbl...
> Hello,
> What are you trying to do here? Can you post the commands
> To create databases you need system administrator rights and dbcreator
> Permissions (from BOL)
> CREATE DATABASE permission defaults to members of the sysadmin and
dbcreator
> fixed server roles. Members of the sysadmin and securityadmin fixed server
> roles can grant CREATE DATABASE permissions to other logins. Members of
the
> sysadmin and dbcreator fixed server role can add other logins to the
> dbcreator role. The CREATE DATABASE permission must be explicitly granted;
> it is not granted by the GRANT ALL statement.
> CREATE DATABASE permission is usually limited to a few logins to maintain
> control over disk usage on an instance of SQL Server.
> I wouldn't suggest granting the owner of a .NET IIS app either of these
> rights
>
> --
> I hope this helps
> regards
> Greg O MCSD
> http://www.ag-software.com/ags_scribe_index.aspx. SQL Scribe
Documentation
> Builder, the quickest way to document your database
> http://www.ag-software.com/ags_SSEPE_index.aspx. AGS SQL Server Extended
> Property Extended properties manager for SQL 2000
> http://www.ag-software.com/IconExtractionProgram.aspx. Free icon
extraction
> program
> http://www.ag-software.com. Free programming tools
>
>
> "Taishi" <taishi_bak@.hotmail.com> wrote in message
> news:eJuJfV16DHA.360@.TK2MSFTNGP12.phx.gbl...
> > Windows Pro
> > VS.Net
> > .Net Framework
> > ASP.NET
> > My 1st time using Web Forms in .Net
> > 1st time using SQL
> > I am receiving the following error:
> >
> > System.Data.SqlClient.SqlException: CREATE DATABASE permission denied in
> > database 'master'. Could not attach database 'pubs' to file 'D:\Program
> > Files\Microsoft SQL Server\MSSQL$NETSDK\Data\pubs.mdf'.
> >
> > I tried the following:
> >
> > Reboot 4-5 times
> > Share the folder
> > Web share the folder
> >
> > Here is some advanced help from another SQL forum.
> > sp_helpsrvrolemember 'sysadmin' --> command is not on my box.
> > isql /usa/p/server\sdk -i\instpubs.sql --> did not work. isql is not
a
> > command found on my box.
> >
> >
> > Any ideas?
> >
> > Thanks for your help,
> > T
> >
> >
>|||Hi Tashi!
You can ue Enterprise manager to set the rights. Locate the table, and right
click. Select All Tasks, then Manage Permissions. Locate the user that you
are using in your connection object, and then grant the rights. I agree with
Greg that the web user should not normally have that level of permission.
One false move and your server and data could be toast. If you are really
trying to create a table, or attach a database, you should be doing that
through Enterprise Manager, and not the web interface.
Sloan
"Taishi" <taishi_bak@.hotmail.com> wrote in message
news:u54GDcN7DHA.1428@.TK2MSFTNGP12.phx.gbl...
> How can I check the permissions/rights?
> How can I grant the correct permissions/rights?
> Thanks,
> T
> "Greg Obleshchuk" <greg-n-o-s-p-a-m-@.ag-s-o-f-t-w-a-r-e.com> wrote in
> message news:udfB$CE7DHA.2568@.TK2MSFTNGP10.phx.gbl...
> > Hello,
> > What are you trying to do here? Can you post the commands
> >
> > To create databases you need system administrator rights and dbcreator
> >
> > Permissions (from BOL)
> > CREATE DATABASE permission defaults to members of the sysadmin and
> dbcreator
> > fixed server roles. Members of the sysadmin and securityadmin fixed
server
> > roles can grant CREATE DATABASE permissions to other logins. Members of
> the
> > sysadmin and dbcreator fixed server role can add other logins to the
> > dbcreator role. The CREATE DATABASE permission must be explicitly
granted;
> > it is not granted by the GRANT ALL statement.
> >
> > CREATE DATABASE permission is usually limited to a few logins to
maintain
> > control over disk usage on an instance of SQL Server.
> >
> > I wouldn't suggest granting the owner of a .NET IIS app either of these
> > rights
> >
> >
> > --
> > I hope this helps
> > regards
> > Greg O MCSD
> > http://www.ag-software.com/ags_scribe_index.aspx. SQL Scribe
> Documentation
> > Builder, the quickest way to document your database
> > http://www.ag-software.com/ags_SSEPE_index.aspx. AGS SQL Server
Extended
> > Property Extended properties manager for SQL 2000
> > http://www.ag-software.com/IconExtractionProgram.aspx. Free icon
> extraction
> > program
> > http://www.ag-software.com. Free programming tools
> >
> >
> >
> >
> > "Taishi" <taishi_bak@.hotmail.com> wrote in message
> > news:eJuJfV16DHA.360@.TK2MSFTNGP12.phx.gbl...
> > > Windows Pro
> > > VS.Net
> > > .Net Framework
> > > ASP.NET
> > > My 1st time using Web Forms in .Net
> > > 1st time using SQL
> > > I am receiving the following error:
> > >
> > > System.Data.SqlClient.SqlException: CREATE DATABASE permission denied
in
> > > database 'master'. Could not attach database 'pubs' to file
'D:\Program
> > > Files\Microsoft SQL Server\MSSQL$NETSDK\Data\pubs.mdf'.
> > >
> > > I tried the following:
> > >
> > > Reboot 4-5 times
> > > Share the folder
> > > Web share the folder
> > >
> > > Here is some advanced help from another SQL forum.
> > > sp_helpsrvrolemember 'sysadmin' --> command is not on my box.
> > > isql /usa/p/server\sdk -i\instpubs.sql --> did not work. isql is
not
> a
> > > command found on my box.
> > >
> > >
> > > Any ideas?
> > >
> > > Thanks for your help,
> > > T
> > >
> > >
> >
> >
>|||Sloan,
I found the following url.
http://www.aspenterprisemanager.com/
Is Enterprise Manager free?
If so, where can I download it?
Thanks so much for the help,
T.
"Sloan Thrasher" <cst2000@.comcast.net> wrote in message
news:cuQUb.232283$I06.2592550@.attbi_s01...
> Hi Tashi!
> You can ue Enterprise manager to set the rights. Locate the table, and
right
> click. Select All Tasks, then Manage Permissions. Locate the user that you
> are using in your connection object, and then grant the rights. I agree
with
> Greg that the web user should not normally have that level of permission.
> One false move and your server and data could be toast. If you are really
> trying to create a table, or attach a database, you should be doing that
> through Enterprise Manager, and not the web interface.
> Sloan
> "Taishi" <taishi_bak@.hotmail.com> wrote in message
> news:u54GDcN7DHA.1428@.TK2MSFTNGP12.phx.gbl...
> > How can I check the permissions/rights?
> >
> > How can I grant the correct permissions/rights?
> >
> > Thanks,
> > T
> >
> > "Greg Obleshchuk" <greg-n-o-s-p-a-m-@.ag-s-o-f-t-w-a-r-e.com> wrote in
> > message news:udfB$CE7DHA.2568@.TK2MSFTNGP10.phx.gbl...
> > > Hello,
> > > What are you trying to do here? Can you post the commands
> > >
> > > To create databases you need system administrator rights and dbcreator
> > >
> > > Permissions (from BOL)
> > > CREATE DATABASE permission defaults to members of the sysadmin and
> > dbcreator
> > > fixed server roles. Members of the sysadmin and securityadmin fixed
> server
> > > roles can grant CREATE DATABASE permissions to other logins. Members
of
> > the
> > > sysadmin and dbcreator fixed server role can add other logins to the
> > > dbcreator role. The CREATE DATABASE permission must be explicitly
> granted;
> > > it is not granted by the GRANT ALL statement.
> > >
> > > CREATE DATABASE permission is usually limited to a few logins to
> maintain
> > > control over disk usage on an instance of SQL Server.
> > >
> > > I wouldn't suggest granting the owner of a .NET IIS app either of
these
> > > rights
> > >
> > >
> > > --
> > > I hope this helps
> > > regards
> > > Greg O MCSD
> > > http://www.ag-software.com/ags_scribe_index.aspx. SQL Scribe
> > Documentation
> > > Builder, the quickest way to document your database
> > > http://www.ag-software.com/ags_SSEPE_index.aspx. AGS SQL Server
> Extended
> > > Property Extended properties manager for SQL 2000
> > > http://www.ag-software.com/IconExtractionProgram.aspx. Free icon
> > extraction
> > > program
> > > http://www.ag-software.com. Free programming tools
> > >
> > >
> > >
> > >
> > > "Taishi" <taishi_bak@.hotmail.com> wrote in message
> > > news:eJuJfV16DHA.360@.TK2MSFTNGP12.phx.gbl...
> > > > Windows Pro
> > > > VS.Net
> > > > .Net Framework
> > > > ASP.NET
> > > > My 1st time using Web Forms in .Net
> > > > 1st time using SQL
> > > > I am receiving the following error:
> > > >
> > > > System.Data.SqlClient.SqlException: CREATE DATABASE permission
denied
> in
> > > > database 'master'. Could not attach database 'pubs' to file
> 'D:\Program
> > > > Files\Microsoft SQL Server\MSSQL$NETSDK\Data\pubs.mdf'.
> > > >
> > > > I tried the following:
> > > >
> > > > Reboot 4-5 times
> > > > Share the folder
> > > > Web share the folder
> > > >
> > > > Here is some advanced help from another SQL forum.
> > > > sp_helpsrvrolemember 'sysadmin' --> command is not on my box.
> > > > isql /usa/p/server\sdk -i\instpubs.sql --> did not work. isql is
> not
> > a
> > > > command found on my box.
> > > >
> > > >
> > > > Any ideas?
> > > >
> > > > Thanks for your help,
> > > > T
> > > >
> > > >
> > >
> > >
> >
> >
>|||You can use MSDE and Access as a backend for a website.
I am uninitiated but I know this for a fact.
"Sloan Thrasher" <cst2000@.comcast.net> wrote in message
news:b3FVb.259176$na.418905@.attbi_s04...
> Hi Tashi!
> I haven't installed MSDE, but it should have asked for a sa password
during
> installation. If so, and you remember it, you could use asp to connect and
> add the DBs you need, but definately not something for the uninitiated.
> Also, I'm not sure, but I don't think you're allowed to use MSDE as a
> backend for a web site.
> Since you're new to ASP.net, SQL, etc. you might want to start out with
> something a bit simplier, like an Access DB (if you have MS Office, you
have
> Access) That way you have a GUI to create your database and tables in and
> you can focus on one thing at a time.
> If you really want to move forward with MSDE, then look at this link:
>
http://msdn.microsoft.com/library/?url=/library/en-us/distsql/distsql_84xl.a
> sp?frame=true
> The topic is Customizing MDSE Setup.exe. In there you will see how to
setup
> the SA password, the default directory for your data files, and a lot
more.
> I found it by D/L the app and the HTML readme file.
> Sloan
>
> "Taishi" <taishi_bak@.hotmail.com> wrote in message
> news:#zV2Aes7DHA.3804@.tk2msftngp13.phx.gbl...
> > Sloan,
> >
> > I installed the MSDE 2000 from the following web site:
> >
> > ww.microsoft.com/downloads
> >
> > Featured download
> > Microsoft SQL Server 2000
> > Desktop Engine(MSDE 2000) Release A
> >
> > I don't have the SQL server disks.
> >
> > Any ideas?
> >
> > Thanks,
> > T.
> >
> > "Sloan Thrasher" <cst2000@.comcast.net> wrote in message
> > news:J1EVb.125043$U%5.607067@.attbi_s03...
> > > Hi Tashi!
> > >
> > > Enterprise Manager comes with SQL Server. You should be able to
install
> it
> > > from the MS SQL Server CDs
> > >
> > > Sloan
> > >
>

Permission Denied Error

I am an issue running reports through a Netscreen (Juniper)
box and have found nothing on Juniper's website that addresses the issue. I
can access the Report Manager easily and enter parameters for a report.
However when I click on the View Report button I get a permission denied
error when executing the following Miscrosoft scipt:
function LoadToolbarFrame()
{
if (frames["oTbDMRepFrame"].location.href != tbDMRepFrameUrl ||
!IsIEBrowser())
frames["oTbDMRepFrame"].location.replace(tbDMRepFrameUrl);
}
I have been working on this for quite some time and have not found a
solution. I would appreciate any ideas and solutions.What is your ReportServer URL in your config files? Is that different than
the URL you are typing in your browser? If so, you may be running into a
cross-domain scripting error.
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"B. Mark McKinney" <BMarkMcKinney@.discussions.microsoft.com> wrote in
message news:53751243-0BEF-4405-A154-DBBF3218635B@.microsoft.com...
>I am an issue running reports through a Netscreen (Juniper)
> box and have found nothing on Juniper's website that addresses the issue.
> I
> can access the Report Manager easily and enter parameters for a report.
> However when I click on the View Report button I get a permission denied
> error when executing the following Miscrosoft scipt:
> function LoadToolbarFrame()
> {
> if (frames["oTbDMRepFrame"].location.href != tbDMRepFrameUrl ||
> !IsIEBrowser())
> frames["oTbDMRepFrame"].location.replace(tbDMRepFrameUrl);
> }
> I have been working on this for quite some time and have not found a
> solution. I would appreciate any ideas and solutions.
>

permission denied

iam working with http location and using sql server 2005its getting an error as "SELECT permission denied on object UserDetails' database 'elearning', schema 'dbo'.""UserDetails" is my table name"elearning" is database namei worked same project with filesystem location ,there it is workingThis is obviously a permissions issue. You need to ensure that the user your connected to the database with has select permissions on at least the "UserDetails" table.|||

It is a issue retaled to lack of permission for the user account you are using to connect.

To resolve this issue in SQL management Studio right click the username which is placed under Security => Login.

A modal window will be opened and in User Mapping section setect the desired DB and check db_datareader for that user. Click ok. Now you are done.

Let me know if need any further clarifications

permission denied

iam working with http location and using sql server 2005 its getting an error as "INSERT permission denied on object CourseDetails, database 'mydb', schema 'dbo'." "CourseDetails" is my table name "mydb" is database name i worked same project with filesystem location ,there it is working

This is almost certainly being caused because the account that is running the web site (ASPNET or NETWORK SERVICE, depending on which version of IIS you're running) is not allowed permission to access the SQL Server database. Note that for a file based application, running under the development web server, your user account will have been used.

Check the connection string that is being used in the web site. If it is using integrated security (likely), then you will need to ensure that the ASPNET or NETWORK SERVICE account (or, more precisely, the account that is being used to run the web site) is allowed access to the database.