Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / General / Security / January 2006

Tip: Looking for answers? Try searching our database.

"dbo" schema permissions question.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
chris - 28 Jan 2006 21:28 GMT
I have some ASP.NET 2.0 code executing
SqlDependency.Start(connectionstring) to a SQL 2005 database and I am
getting the following error:

System.Data.SqlClient.SqlException: The specified schema name "dbo"
either does not exist or you do not have permission to use it.

As a general SQL 2005 Security question, can anyone please inform me as
to how i would give my user permissions to the "dbo" schema?  At
present the user has "dbo" set up as it's default schema, but I am not
sure what that does.  Also my code works fine if I give the user
sysadmin rights.

Thanks,
Chris
Bob Beauchemin - 28 Jan 2006 23:21 GMT
Hi Chris,

It would probably be better to have the user in SqlDependency.Start have a
different default schema than dbo (create schema foo authorization youruser;
alter user youruser with default_schema = foo). Otherwise you would have to
give it access to create objects in the dbo schema. Once you've done that,
the user needs CREATE SERVICE, CREATE QUEUE, and CREATE PROCEDURE. Because
SERVICE is at database scope (not schema scope) its queue or procedure
that's causing the error. Don't forget GRANT SUBSCRIBE QUERY NOTIFICATION to
the user executing the commands too.

Cheers,
Bob Beauchemin
http://www.SQLskills.com/blogs/bobb

>I have some ASP.NET 2.0 code executing
> SqlDependency.Start(connectionstring) to a SQL 2005 database and I am
[quoted text clipped - 11 lines]
> Thanks,
> Chris
chris - 30 Jan 2006 01:17 GMT
Bob,

First of all thanks for your article about this subject back when it
was still in beta.

Your solution worked!  Very easy, thanks for your help.

Chris
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.