Adding A Member For Database Role

Nov 8, 2000

Hi,

I have a login 'testuser' on test server.
This login was 'db_datareader' for database called 'invent_test' on test server.
I deleted the whole database and restored the production backup as 'invent_test' database.
Now I am trying to modify login 'testuser' by adding it as 'db_datareader' for 'invent_test' again but it gives me an error that 'this user or role already exists for current database'.

I can not see 'db_datareader' or even 'invent_test' options selected in login properties for 'testuser'. Also I can not find 'testuser' in database roles
-->db_datareader member list.
Is this a bug with sql server 7.0? Or how should I give this user priviledges to read?

I dropped the login and recreated it. Server is also rebooted meanwhile so there is no possibility for cashe problem. Still same error is there.
Is there any thing that I am missing here?

I really appreciate your help. I am very frustrated now.

View 2 Replies


ADVERTISEMENT

Can't Make Database Role A Member Of Another Database Role In 2005.

Jan 9, 2006

In sql server 2000, I created some custom database roles called ProjectLeader and Developer.  I would make these roles a member in the fixed database roles so that I would only have to add the user to the ProjectLeader or Developer role once and they would presto-magico have the security I wanted them to have with no unecessary mouse clicking.  I'm not sure how to repeat this process in 2005?  Management Studio doesn't seem to allow you to add a role as a member in another role.  Is there a work around or solution for this?

View 1 Replies View Related

Adding A Database Role To A Database Role

Feb 29, 2008

Hi,

I have SQL server 2005 (Developer edition) installed and I want to add a database role to a database role. It is working on my SQL 2000 server,however, when I tried to do the same thing on SQL2005, It didn't allowed me.

When I go to the Add role and then adding members to the role, the browse screen does not allow me the choice of object type Roles. It only shows me "Users".

Can someone please help me with this and provide me some information of how / what should I set to get the Roles in object types list so I can add a role to a role.

Thanks

View 4 Replies View Related

How To: Determine If Current Windows User Has Login Access, Database Access And If They Are A Member Of A Specific DB Role.

Mar 25, 2008


I need to determine the following about the current authenticated Windows domain user who is trying to access a SQL Server via a trusted connection.

1 Has the current user been granted login access to the trusted SQL Server?

2 Has the current user been granted access to a specific database?

3 Is the current user a member of a specific database role such as (DB_ROLE_ADMINISTRATORS)?

Thanks,
Sean

View 6 Replies View Related

Find Out If Current User Is Member Of A Role

Aug 5, 2004

I need a stored procedure to find out if the current user is a member of a certain role. I want to pass the role name and return a bit to tell whether he is a member or not. I have this code to list the groups the current user is a member of but I don't know how to search or do a "SELECT FROM" on the results.DECLARE @usr varchar(32) SET @usr = USER EXEC sp_helpuser @usr But if the current user is a member of more than one role it returns multiple rows. So if I could do something like: DECLARE @grpName varchar(32) SELECT * FROM (EXEC sp_helpuser @usr) WHERE GroupName=@grpNameIF rowcount > 0 THENRETURN 1ELSERETURN 0END IF I know that doesn't work so how can I do this?

View 6 Replies View Related

Analysis :: Security Role Default Member

May 12, 2015

I am setting up some security requirements - the requirement is that team leaders get to view all teams within their division. What I would like it to do when they log onto their dashboard/ssrs report is that it defaults to the team leaders default team (they can still select from other teams if they require).If I can avoid I don't really want another parameter in the report for this.

In my cube I have an attribute under the people dimension (where teams and division also reside) called Fee_Earner_Effective_Flag and where this is set to Y this is their current team.

Under the Role properties security under the Fee_Earner_Effective_Flag attribute I have set the Default member to

[People Primary FeeEarner].[Fee_Earner_Effective_Flag].[Fee Earner Effective Flag].&[Y]

When I then logon as the user and try to access the cube I get the following

Errors in the metadata manager. The '[People Primary Feeearner].[Fee_Earner_Effective_Flag].[Y]' security default member from the '{' attribute returns a result from a different hierarchy.

I have also tried setting the default member in the cube solution and then processing but then the cube failed.

View 3 Replies View Related

Adding A User/role To All User Database

Jan 23, 2001

Hi everyone,

I try to add a db_role or a user to all my databases with one script. Although parsing doesn't report any problem I get a Syntax error during execution.
I first select the database names into a #temp table which has two columns, ID and dbname.
After that I use the following code:

DECLARE @Count smallint
declare @dbVarchar(20)

SET @Count = 1

WHILE (@Count <=(SELECT MAX(ID) FROM #temp))

BEGIN

Exec ("USE @db")

EXEC sp_adduser 'test'
EXEC sp_addrolemember 'my_role', 'testrole'


SET @COUNT = @COUNT + 1
SET @db = (SELECT dbname FROM #temp WHERE ID = @Count)
END

It seems that the "Use @db" part has no value for the variable @db.
Does anybody knows how to solve this?

View 1 Replies View Related

Adding Users To A Role In Bulk

Feb 23, 2004

I have a need to add all the users listed in the sysxlogins table to the db_datawriter role. I wrote a proc that does this. It indicates that each user is successfully added to the role, but they aren't. If I look at the user in EM, they don't have that role checked. I've tried all the obvious stuff like close EM and re-open, etc...it doesn't help.

Here is the proc
CREATE proc sp_MyProc
@DBName varchar(256)
As

Declare UID_Cursor Cursor
For
Select Name from master..sysxlogins Where Len(Name) = 7 Order By Name

Open UID_Cursor
Declare @Name as varchar(256)
Declare @TempString as varchar(8000)

Fetch Next from UID_Cursor into @Name


While (@@Fetch_Status <> -1)
Begin

Set @TempString = 'sp_addrolemember ''db_datareader'', ''' + @Name + ''''
Exec(@TempString)

Fetch Next from UID_Cursor Into @Name
End

Close UID_Cursor
Deallocate UID_Cursor

View 4 Replies View Related

Sql 2005 Database Role Vs Application Role ?

May 18, 2007

Ive been reading over the documentation and some stuff online, but I still dont really understand what the difference is and when you would use one vs the other. Can someone put it in simple terms for this dummy (me) ?

thanks

View 2 Replies View Related

Problem Adding Securityadmin Role To Sa In 2005

Aug 9, 2007

Hi Guys,

I'm trying to add the securityadmin server role to the sa user but have been unable to due to an error occuring. The error says "Add member failed for server role 'securityadmin'. Cannot use the special principal 'sa' Microsoft SQL Server error 15405."

I assumed that the sa account would already have the required permission to perform most operations on the server but I have been asked to try assiging this server role to sa by a support guy for our third party product.

Has anyone got any ideas why this error is occuring? I have been looking on loads of forums but cannot find anything relevant to me.

Thanks in advance for any help!

View 3 Replies View Related

A New Member Could Not Be Added To A Local Group Because The Member Has The Wrong Account Type

Mar 23, 2007

Hi all,

I installed SQL 2005 SP2 + ReportServices Add-in for Sharepoint (WSS 3.0). All it's OK until I try to grant database access in the Sharepoint Central Admin site.

I setup the Reporting Services Integration (Manage integration settings). I use the default SQL instance, I put the USERNAME and the PASSWORD of my ADMIN account in the ENTER CREDENTIALS windows.. When I click the "OK" button, I receive always the error ...

"A new member could not be added to a local group because the member has the wrong account type"

I tried a lot of things... without success.

Is there someone who can help me....

PS: There is no error in the LOG



Thanks

View 18 Replies View Related

A New Member Could Not Be Added To A Local Group Because The Member Has The Wrong Account Type

Mar 23, 2007

Hi all,

I installed SQL 2005 SP2 + ReportServices Add-in for Sharepoint (WSS 3.0). All it's OK until I try to grant database access in the Sharepoint Central Admin site.

I setup the Reporting Services Integration (Manage integration settings). I use the default SQL instance, I put the USERNAME and the PASSWORD of my ADMIN account in the ENTER CREDENTIALS windows.. When I click the "OK" button, I receive always the error ...

"A new member could not be added to a local group because the member has the wrong account type"

I tried a lot of things... without success.

Is there someone who can help me....

PS: There is no error in the LOG



Thanks

View 4 Replies View Related

Master Data Services :: How To Add A Reference To Another Entity Member When Creating A Member

Oct 23, 2014

I need to create a member that one of its Attributes (maybe my term is wrong) is a reference to another entity member named group 
the code 

createRequest.Members.MemberType = MemberType.Leaf;
createRequest.Members.Members = new System.Collections.ObjectModel.Collection<Member> { };
Member aNewMember = new Member();
aNewMember.MemberId = new MemberIdentifier() { Name = uag.groupName, MemberType = MemberType.Leaf };

[code]....

 "The attribute data type is not valid".Is it wrong to add the reference as attribute? How can I embed the reference in the new member? 

View 4 Replies View Related

SQL 2012 :: Delete Rows If Member Does Not Exists In The Member Table

Sep 24, 2015

I have a table where I need to delete rows if the member does not exists in the member table. Will the following syntax work ?

Delete T
FROM Event_Temp_Lead_Screen T
left join member M on ( M.MemberID = T.MemberID )
where
T.Gender is NULL

View 9 Replies View Related

Programmatically Adding A User To The System User Role

Dec 27, 2006

We have been working on an application that will be using a forms-authenticated report server (RS2005) as a reporting back-end. Using the reporting services web service I have been able to assign permissions to objects in reporting services no problem. The issue is that each user needs to be added to the System User role to be able to use the report builder properly. I can't seem to find a way to do this programmatically. Any idea?

View 1 Replies View Related

RAID Set For Database XXX Is Missing Member Number 1.

Jul 24, 2000

I saw a previous request for help, but I did not see a solution (other than deleting and re-initializing the dump.

I'm copying a database from one server to another and I repetedly get this error when I try to restore from the .bak file I create on backup. The host machine for the database is a workstation (no RAID). The Destination does have RAID, but is funtioning properly (according to the SysOps and in testing file copies). I've tried copying the .bak file to several different drives several different times and I get the same error. I also tried to back-up a database on the Destination server and restore the .bak file to a newly created database and I get the same error.

Anyone solve this problem?

View 1 Replies View Related

Granting Permission To A Database User To Alter Database Role

Sep 5, 2006

I want a database user to be able to alter login, database user and database role from my application. so, i assigned that user to sccurityadmin server role, db_accessadmin and db_securityadmin database roles....By now, the user can add or remove login and database user. However, the user cannot add or remove any database role membership. What am I missing here?? What should I do so that the user can create, and alter database roles in the database??

View 1 Replies View Related

New Database Role

Feb 18, 2008

Hi,

I have a database with 500+ tables and 1000+ views and equal no of stored procedures. I have a sql server login id which I have included in the following roles:

db_datareader
db_datawriter

now the issues is.. i want to revoke delete permission from certain tables. Any revoke or deny do not affect the behaviour i.e. even after successfully executing revoke/deny statements on these tables for DELETE statement.. user is able to DELETE.

pl advise the best way to revoke delete permission from a few (half dozen) tables out of the total.

regards,
D2

View 1 Replies View Related

Database Role Permissions

May 14, 2008

Can we assign serverrole to a database role.

For example i have a new role created as A
Now can i add A to any of the server role..

Please advice..

Thanks,
ServerTeam

View 2 Replies View Related

Database Role Membership

Dec 12, 2007

Hi,

I am using SQL server 2000 and when I look in the database role membership I have SuperUser as a role.

Can I have the definition of SuperUser?

View 1 Replies View Related

Database Role Properties

Dec 17, 2007

database role properties/ permissions
when i click permissions it takes forever to pop up the window.

Anyone know why and how do i make it faster.




http://www.sqlserverstudy.com

View 5 Replies View Related

Create Database Role Via T-SQL

Feb 23, 2008

I have created the functionality to dynamically create databases and am now trying to figure out how to create database roles using T-SQL.

I keep finding information about the sp_addrole stored procedure which is the first step, but how do you go about defining what permissions this role has via T-SQL?

Thanks

View 3 Replies View Related

Database Role Permissions

Oct 12, 2007

Hello.

I've moved a database from 2000 to 2005 and in 2005 I cannot see the permissions for this Database Role that I created. In 2000 you just right-clicked, selected properies and clicked on permissions. Am I going mad here or is this not an option in 2005. If not, how do I see the permissions that have been given to the role?

The 2005 database I refer to is on standard edition SP2

Thank You

View 7 Replies View Related

Get The Currently Logged In User's SQL Role In A Different Database

May 14, 2008

NOTE: I am talking about roles in my sql server - NOT in asp.net. I need to create a stored procedure that retrieves the roles that the currently logged in sql user has for a different database. I have the code that gets the roles for the user, but it only works if the user is in the database. I want to be in one database, and get the roles for a different database. I have tried using USE DATABASE, but this is not allowed in a store procedure.

View 10 Replies View Related

Connecting To A Database From VB Using An Application Role

Oct 6, 1999

I know how to create an Application role in SQL server 7. Now how do I connect to the database from VB using that Application Role? I can't find anything about this topic anywhere. Is this the purpose of an Application role or am I way off?

Thanks for the help

Steven Abt
StevenA@grsgroup.com

View 2 Replies View Related

Add A Login To A Database Role (was Very Confusing)

Apr 4, 2006

This stuff makes no sense what so ever,

In the Books on Line of MSSQL2000
In "Adding a Member to a SQL Server Database Role"

There is this
"Note : When you add a Windows NT 4.0 or Windows 2000 login without a user account in the database to a SQL Server database role, SQL Server creates a user account in the database automatically, even if that Windows NT 4.0 or Windows 2000 login cannot otherwise access the database."

I mean how can anyone add a login to a database role without making the login a user of the database.:shocked:
Also if it worked, a new fancy feature to add new logins??:eek:
Plz help:S

View 9 Replies View Related

Database Role/User Query

Sep 21, 2006

Anyone have a tsql query that will give me a listing of database roles and their users already put together?

View 1 Replies View Related

Duplicating Permissions Of A Database Role

Jan 20, 2004

thanks for reading.

i would like to create a new database role that has exactly the same permissions as an existing database role. the combinations of permissions are complicated enough to make this a time consuming task worthy of a script of some sort. any suggestions?

i'm running SQL Server 2000 and can't find anything about copying roles unless it's through DTS from one DB to another. not sure if this is applicable to basically duplicating and renaming a role in one database.

in case you're wondering why anyone would want to do this you may not be surprised to know that it's a government thing. some policy about differentiating between 2 roles -- even though they currently have exactly the same permissions, the similarities might change in the future.

thanks in advance for your input.

View 1 Replies View Related

Copy Permissions Of A Database Role

Jul 23, 2005

Brief description of the problem:My production server has about 50 databases and various permissions aregranted to public role on all these databases. Because of this any newuser added to any database gets unnecessary access to objects by virtueof being a member of public by default. I would like to fix this flawin the way the server is setup as below:1. Setup a new database role called NewRole on all 50 databases andcopy permissions to NewRole from public.2. Add all existing users to the new Role.3. Remove all permissions from public.Any suggestions on scripting this task are welcome.

View 3 Replies View Related

Way To Retreive Database Role Permissions

Mar 13, 2008



I want to allow administrators of the program to change the permissions of the database roles. Is there a way to retreive the the specific permissions granted an denyed to a user and a database role. For instance, a store procedure that you call, pass it the database role and you get whether SELECT is allowed on table1, or if UPDATE is denied on table2, etc.

View 3 Replies View Related

How To Script Out Permissions For A Database Role

Oct 2, 2007

Is there a way to script out a database role from SQL management studio?
I can only get a script for create and drop. I am looking for a script that shows all object permissions that the role has in a database.

Thanks.

View 3 Replies View Related

Add Role To Analysis Services Database

May 23, 2007

Does anyone know if there is a way to use a SSIS task to add a role to SSAS cube? At the moment I use Management Studio, Right Click "Roles" under the cube and go through New Role wizard, but I'd like to be able to include this in a SSIS package instead.

Thanks

Richard

View 5 Replies View Related

Create Database With Application Role...

Mar 22, 2007

Hi,

I want my application to create database and I do the following things:

1)Create application role
2)Grant create database to application role
3)Activate application role
4)Create database

and I get the answer:

CREATE DATABASE permission denied in database 'master'.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved