Tuesday, March 27, 2012
addning roles to a user
users and selected "dbo". I tried adding "TestRole" but I received a message
"Error 15405: Cannot use the reserved user or role name 'dbo'". I have
looked thru various sources to try to understand this but nothing really
straightforward explains what the problem is.
Hi Steven
Please ALWAYS state what version you are running.
The user dbo can do everything in a database. Why do you want to add that
user to a role?
What are you trying to accomplish?
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"Steven.Dahlin" <StevenDahlin@.discussions.microsoft.com> wrote in message
news:46113FB9-B978-4DC3-83BE-609BACE5F8F1@.microsoft.com...
>I created a "standard" role called "TestRole". Then I went to the list of
> users and selected "dbo". I tried adding "TestRole" but I received a
> message
> "Error 15405: Cannot use the reserved user or role name 'dbo'". I have
> looked thru various sources to try to understand this but nothing really
> straightforward explains what the problem is.
>
sql
addning roles to a user
can create an application role and then give it to a user such as dbo. Can
anyone point me in the right direction?
Thanks,
Steve
An application role is built at the database level., Not server level. is
built in the same way as a database user. Doesn't need to be attached to a
login account. This kind of role only have access to that database. Is
commonly used to allow programmers to add it to applications when they don't
want the authentication of the user.
"Steven.Dahlin" wrote:
> being used to how Oracle works with users and roles I am confused as to how I
> can create an application role and then give it to a user such as dbo. Can
> anyone point me in the right direction?
> Thanks,
> Steve
|||Let me explain what I need. The app will have some people who can be admins
for the application. I wanted to test for the role to see if they were an
"admin". Those who had the role could access the admin functions, those who
did not would find the admin menu option greyed out. How could I accomplish
this?
Thanks,
Steve
|||Database roles define the security at the database level. Perhaps you can
match those application admin functions with database permissions and do
something like this:
Create your database roles
Give permissions to the roles
Add users to your roles
In your application use is_member to validate role membership and decide if
the admin functions will be enabled or disabled
Hope this helps,
Ben Nevarez, MCDBA, OCP
"Steven.Dahlin" <StevenDahlin@.discussions.microsoft.com> wrote in message
news:688B48A7-BC6F-47FF-AA66-3184D432C21D@.microsoft.com...
> Let me explain what I need. The app will have some people who can be
> admins
> for the application. I wanted to test for the role to see if they were an
> "admin". Those who had the role could access the admin functions, those
> who
> did not would find the admin menu option greyed out. How could I
> accomplish
> this?
> Thanks,
> Steve
|||I created a "standard" role called "TestRole". Then I went to the list of
users and selected "dbo". I tried adding "TestRole" but I received a message
"Error 15405: Cannot use the reserved user or role name 'dbo'". I have
looked thru various sources to try to understand this but nothing really
straightforward explains what the problem is.
Steve
|||Hi Steve
I didn't realize your other post was part of this bigger thread.
But my response still holds. The point of an app role is to give someone
temporarily more privileges than they usually have, and since the user dbo
has full privileges in a db, it is not a good one to test with.
Please look again at Ben's suggestions and if you don't have any other users
than dbo, you'll have to create a user with NO privileges, then set the app
role, then check to see that users enhanced permissions.
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"Steven.Dahlin" <StevenDahlin@.discussions.microsoft.com> wrote in message
news:8B5B3ADA-F6AF-44FA-9DAC-940C5930A682@.microsoft.com...
>I created a "standard" role called "TestRole". Then I went to the list of
> users and selected "dbo". I tried adding "TestRole" but I received a
> message
> "Error 15405: Cannot use the reserved user or role name 'dbo'". I have
> looked thru various sources to try to understand this but nothing really
> straightforward explains what the problem is.
> Steve
>
addning roles to a user
users and selected "dbo". I tried adding "TestRole" but I received a message
"Error 15405: Cannot use the reserved user or role name 'dbo'". I have
looked thru various sources to try to understand this but nothing really
straightforward explains what the problem is.Hi Steven
Please ALWAYS state what version you are running.
The user dbo can do everything in a database. Why do you want to add that
user to a role?
What are you trying to accomplish?
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"Steven.Dahlin" <StevenDahlin@.discussions.microsoft.com> wrote in message
news:46113FB9-B978-4DC3-83BE-609BACE5F8F1@.microsoft.com...
>I created a "standard" role called "TestRole". Then I went to the list of
> users and selected "dbo". I tried adding "TestRole" but I received a
> message
> "Error 15405: Cannot use the reserved user or role name 'dbo'". I have
> looked thru various sources to try to understand this but nothing really
> straightforward explains what the problem is.
>
addning roles to a user
I
can create an application role and then give it to a user such as dbo. Can
anyone point me in the right direction?
Thanks,
SteveAn application role is built at the database level., Not server level. is
built in the same way as a database user. Doesn't need to be attached to a
login account. This kind of role only have access to that database. Is
commonly used to allow programmers to add it to applications when they don't
want the authentication of the user.
"Steven.Dahlin" wrote:
> being used to how Oracle works with users and roles I am confused as to ho
w I
> can create an application role and then give it to a user such as dbo. Ca
n
> anyone point me in the right direction?
> Thanks,
> Steve|||Let me explain what I need. The app will have some people who can be admins
for the application. I wanted to test for the role to see if they were an
"admin". Those who had the role could access the admin functions, those who
did not would find the admin menu option greyed out. How could I accomplish
this?
Thanks,
Steve|||Database roles define the security at the database level. Perhaps you can
match those application admin functions with database permissions and do
something like this:
Create your database roles
Give permissions to the roles
Add users to your roles
In your application use is_member to validate role membership and decide if
the admin functions will be enabled or disabled
Hope this helps,
Ben Nevarez, MCDBA, OCP
"Steven.Dahlin" <StevenDahlin@.discussions.microsoft.com> wrote in message
news:688B48A7-BC6F-47FF-AA66-3184D432C21D@.microsoft.com...
> Let me explain what I need. The app will have some people who can be
> admins
> for the application. I wanted to test for the role to see if they were an
> "admin". Those who had the role could access the admin functions, those
> who
> did not would find the admin menu option greyed out. How could I
> accomplish
> this?
> Thanks,
> Steve|||I created a "standard" role called "TestRole". Then I went to the list of
users and selected "dbo". I tried adding "TestRole" but I received a messag
e
"Error 15405: Cannot use the reserved user or role name 'dbo'". I have
looked thru various sources to try to understand this but nothing really
straightforward explains what the problem is.
Steve|||Hi Steve
I didn't realize your other post was part of this bigger thread.
But my response still holds. The point of an app role is to give someone
temporarily more privileges than they usually have, and since the user dbo
has full privileges in a db, it is not a good one to test with.
Please look again at Ben's suggestions and if you don't have any other users
than dbo, you'll have to create a user with NO privileges, then set the app
role, then check to see that users enhanced permissions.
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"Steven.Dahlin" <StevenDahlin@.discussions.microsoft.com> wrote in message
news:8B5B3ADA-F6AF-44FA-9DAC-940C5930A682@.microsoft.com...
>I created a "standard" role called "TestRole". Then I went to the list of
> users and selected "dbo". I tried adding "TestRole" but I received a
> message
> "Error 15405: Cannot use the reserved user or role name 'dbo'". I have
> looked thru various sources to try to understand this but nothing really
> straightforward explains what the problem is.
> Steve
>
addning roles to a user
users and selected "dbo". I tried adding "TestRole" but I received a message
"Error 15405: Cannot use the reserved user or role name 'dbo'". I have
looked thru various sources to try to understand this but nothing really
straightforward explains what the problem is.Hi Steven
Please ALWAYS state what version you are running.
The user dbo can do everything in a database. Why do you want to add that
user to a role?
What are you trying to accomplish?
--
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"Steven.Dahlin" <StevenDahlin@.discussions.microsoft.com> wrote in message
news:46113FB9-B978-4DC3-83BE-609BACE5F8F1@.microsoft.com...
>I created a "standard" role called "TestRole". Then I went to the list of
> users and selected "dbo". I tried adding "TestRole" but I received a
> message
> "Error 15405: Cannot use the reserved user or role name 'dbo'". I have
> looked thru various sources to try to understand this but nothing really
> straightforward explains what the problem is.
>
addning roles to a user
can create an application role and then give it to a user such as dbo. Can
anyone point me in the right direction?
Thanks,
SteveAn application role is built at the database level., Not server level. is
built in the same way as a database user. Doesn't need to be attached to a
login account. This kind of role only have access to that database. Is
commonly used to allow programmers to add it to applications when they don't
want the authentication of the user.
"Steven.Dahlin" wrote:
> being used to how Oracle works with users and roles I am confused as to how I
> can create an application role and then give it to a user such as dbo. Can
> anyone point me in the right direction?
> Thanks,
> Steve|||Let me explain what I need. The app will have some people who can be admins
for the application. I wanted to test for the role to see if they were an
"admin". Those who had the role could access the admin functions, those who
did not would find the admin menu option greyed out. How could I accomplish
this?
Thanks,
Steve|||Database roles define the security at the database level. Perhaps you can
match those application admin functions with database permissions and do
something like this:
Create your database roles
Give permissions to the roles
Add users to your roles
In your application use is_member to validate role membership and decide if
the admin functions will be enabled or disabled
Hope this helps,
Ben Nevarez, MCDBA, OCP
"Steven.Dahlin" <StevenDahlin@.discussions.microsoft.com> wrote in message
news:688B48A7-BC6F-47FF-AA66-3184D432C21D@.microsoft.com...
> Let me explain what I need. The app will have some people who can be
> admins
> for the application. I wanted to test for the role to see if they were an
> "admin". Those who had the role could access the admin functions, those
> who
> did not would find the admin menu option greyed out. How could I
> accomplish
> this?
> Thanks,
> Steve|||I created a "standard" role called "TestRole". Then I went to the list of
users and selected "dbo". I tried adding "TestRole" but I received a message
"Error 15405: Cannot use the reserved user or role name 'dbo'". I have
looked thru various sources to try to understand this but nothing really
straightforward explains what the problem is.
Steve|||Hi Steve
I didn't realize your other post was part of this bigger thread.
But my response still holds. The point of an app role is to give someone
temporarily more privileges than they usually have, and since the user dbo
has full privileges in a db, it is not a good one to test with.
Please look again at Ben's suggestions and if you don't have any other users
than dbo, you'll have to create a user with NO privileges, then set the app
role, then check to see that users enhanced permissions.
--
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"Steven.Dahlin" <StevenDahlin@.discussions.microsoft.com> wrote in message
news:8B5B3ADA-F6AF-44FA-9DAC-940C5930A682@.microsoft.com...
>I created a "standard" role called "TestRole". Then I went to the list of
> users and selected "dbo". I tried adding "TestRole" but I received a
> message
> "Error 15405: Cannot use the reserved user or role name 'dbo'". I have
> looked thru various sources to try to understand this but nothing really
> straightforward explains what the problem is.
> Steve
>sql
Sunday, March 25, 2012
Adding\Removing roles to Yuokon Database
I am trying to access the database roles of a database made in Sql Server
2005 (Yukon).
I am trying to create a new role for a databse. Here is the code
public void AddRole(string role)
{
Server server = new Server();
string strConnection = "";
strConnection = "DataSource=server
name;Provider=MSOLAP.3;Initial Catalog=DatabaseName";
server.Connect(strConnection);
Database db = new Database();
db = server.Databases.FindByName("DatabaseName");
db.Roles.Add(role);//db.Roles.Remove(role);
db.Update();
server.Disconnect();
}
I can successfully read the roles for that particular database , however i
cannot add or remove a role . Kindly advice.Hello nick1234,
For questions of SQL Server 2005, please post at the following Newsgroup:
Microsoft SQL Server 2005 Beta 2 Newsgroups
http://communities.microsoft.com/ne...qlserver2005&sl
cid=us
Thanks for your understanding.
Sophie Guo
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
========================================
=============
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.sql
Monday, March 19, 2012
Adding rules,roles and administrators to my website
Hi ,
I am trying to add users,rules,roles and administrators to my website, of course on my local server everything was ok, but now I can't login with my users on the server.
Basicly I created users and rules on my comp, and copied the App_data DB file to the root\app_data that is on the server(Using godaddy).
I understand that if the data is on the server it is no longer uses the DB in the root\app_data , but only the asp tables which are on MSSQL database.
I need help in copying the data from the data base in the App_data folder to the hosting database. I couldn't find the answers in the godaddy website help nor how to use their stored procedures to insert all the above.
(if I need to use the stored procedures please explain how)
Thanks very much for your help
Hi yrcaesar,
From the description, I understand you want to copy the datas from an absolute database (mdf, ldf) to a SQL Server on the server. If I have misunderstood your concern, please feel free to let me know.
I think you can simply attach the database for this scenario. Copy the database files to the server. Attach the database by right click "Databases" node in SQL Server Management Studio and select "Attach…" in the content menu.
Sunday, March 11, 2012
Adding Roles/Users using SQL Procedures...
Have a quick question...
How do I add a role and/or a user through code (Specifically SQL Statements). If not through SQL, then maybe VB.NET?
Thanks ahead of time,
DenvasCheck in this link a couple of PageDowns in the sectionCreate a New Login
The Sql syntax for adding a role member:
|||Thank you so much for the info. Going to apply it tomorrow.
EXEC sp_addrolemember N'db_owner', N'SomeUserName'
-Denvas
Adding roles to hosted server
I have created 2 roles, but after publishing and uploading my site, when I try and create a user, I get the error:
"Exception Details: System.Configuration.Provider.ProviderException: The role 'userAtype' was not found."
There are two other roles that the same happens with.
Running it locally all was fine, I just didn't seem to get this info where it needs to be when I uploaded it.
I'm new to messing about with SQL, so sorry if this is really elementary.
I have VS2005 Standard, and the SQL Server Management Studio Express.
The hosting provider I have does not allow remote connections to the DB on shared hosting, so I need to (?) generate a script to populate the DB? and run it in their browser-based Querry Window?
How would I do this?
Thanks.you can use an option on the aspnet_reg.exe command that creates a script. then you can use that sqlscript to load the remote database.|||I'm afraid I'll need a bit more than that.
Are you refering to "aspnet_regsql.exe"? I can't seem to find "aspnet_reg.exe"A bit more info, please?
Thanks|||
Yes, sorry. I meant aspnet_regsql.exe
http://msdn2.microsoft.com/en-us/library/x28wfk74.aspx
If you use the option-sqlexportonly filename
You can export the file it will create
I tried out the new SQL Server Database Publishing Wizard CTP 1, found in the sticky at the top of this forum.
Fast, simple.
Well, there is a goof with GoDaddy's Querry Analyser [sic] and I had to adjust the generated script in a text editor, but that is GoDaddy's fault/problem.
Very straightforward - the command line goes like this:
sqlpubwiz script -C "Server=MACHINENEAME\SQLEXPRESS;AttachDbFilename=\"C:\path\to\the\local\ASPNETDB.MDF\";Integrated Security=True;User Instance=True;Database=DB_NAME" myDB.sql
Adding role to roles?
Is it possible to add a dbrole as a member or another dbrole? When I try
and add members to an existing role all I see are dbusers, but I've looked a
t
some other sample dbs and noticed what appeared to be dbroles as members of
other dbroles.
Any help would be greatly appreciated!
Thanks in advance.A couple of the limitations are that you can't add a fixed
database role to other roles - which is probably what you
are seeing. And the other would be that you can't create
circular roles - you can't add role1 to role2 if role2 is
already a member of role1.
You can create your own user defined roles and can add these
to fixed database roles. You can also add user defined roles
to other user defined roles.
-Sue
On Thu, 16 Feb 2006 08:17:08 -0800, "Mark"
<Mark@.discussions.microsoft.com> wrote:
>Hello,
>Is it possible to add a dbrole as a member or another dbrole? When I try
>and add members to an existing role all I see are dbusers, but I've looked
at
>some other sample dbs and noticed what appeared to be dbroles as members of
>other dbroles.
>Any help would be greatly appreciated!
>Thanks in advance.
>
Thursday, February 9, 2012
Adding additional fields to ASPNETDB.mdf
Hey,
Welcome to the forum. Sure, it's just a database; however, depending on the changes you make, you may break the existing SQL providers code, and then it won't work... You will have to provide customization to get the features you want out of it.
|||You can store additional user data in your application using the ASP.NET profile object. If you've already enabled Roles, the basic process is...
1. Add Profile Properties to your Web.Config file.
<profile>
<properties>
<addname="FirstName"type="string" />
<addname="LastName"type="string" />
<addname="samAccountName"type="string" />
<addname="DisplayName"type="string" />
<addname="Email"type="string" />
</properties>
</profile>
2. Populate the user's Profile (you might do this when the user logs on to your app)
Profile.samAccountName = strSamAccountName
Profile.FirstName = strFirstName
Profile.LastName = strLastName
Profile.DisplayName = strFirstName &" " & strLastName
Profile.Email = strEmail
Scott Mitchell wrote a very useful 7 part article on the process athttp://aspnet.4guysfromrolla.com/articles/120705-1.aspx.
Microsoft's has a good starter article as wellhttp://msdn2.microsoft.com/en-us/library/ms379605(VS.80).aspx.