SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 another unusual behavior
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jen
Flowing Fount of Yak Knowledge

Sweden
4110 Posts

Posted - 01/07/2005 :  00:42:39  Show Profile  Send jen a Yahoo! Message  Reply with Quote
here's another unusual behavior.

i restored a database and remapped the logins. Dropped some logins and roles that are not needed.

i needed to create another approle which has the same name as the dropped one.

QA tells me, there is already an existing approle of that name. Looking at EM, no approle there, so querying it at QA, the name really exists.

so i tried sp_dropapprole, but QA tells me, there's no approle of that name existing.

before i reconfigure server to allow me to delete entry in sysusers,
do you have any idea why this is happening and any workaround?

TIA

--------------------
keeping it simple...

jen
Flowing Fount of Yak Knowledge

Sweden
4110 Posts

Posted - 01/09/2005 :  21:36:31  Show Profile  Send jen a Yahoo! Message  Reply with Quote
any takers on this one?

--------------------
keeping it simple...
Go to Top of Page

Kristen
Test

United Kingdom
22415 Posts

Posted - 01/10/2005 :  01:31:30  Show Profile  Reply with Quote
Are names shared between approle and some other name/login usages? Thus the name you want to use is not an approle, but is already used for some other "name" function

Kristen
Go to Top of Page

jen
Flowing Fount of Yak Knowledge

Sweden
4110 Posts

Posted - 01/10/2005 :  02:45:08  Show Profile  Send jen a Yahoo! Message  Reply with Quote
not sure what you mean by shared, but the name is unique

--------------------
keeping it simple...
Go to Top of Page

rockmoose
SQL Natt Alfen

Sweden
3279 Posts

Posted - 01/10/2005 :  10:13:29  Show Profile  Reply with Quote
Check the sql of sp_dropapprole and see what is happening,
sometimes the error messages are confusing.

rockmoose
Go to Top of Page

Kristen
Test

United Kingdom
22415 Posts

Posted - 01/10/2005 :  11:16:43  Show Profile  Reply with Quote
"not sure what you mean by shared, but the name is unique"

Sorry, I meant:

Is SQL Server sharing names between multiple tables? - e.g. maybe LoginName, UserName and RoleName must be universally unique, and thus the name you are trying to use for a Role is already used for, say, a LoginName

Kristen
Go to Top of Page

jen
Flowing Fount of Yak Knowledge

Sweden
4110 Posts

Posted - 01/11/2005 :  00:26:46  Show Profile  Send jen a Yahoo! Message  Reply with Quote
tnx for clarifying Kristen, yes the name is universally unique

BOL doesn't say much RockMoose

in the end to make it work, i dropped the entire database, created a new one and just used DTS to export the objects except logins and users

good thing, this isn't a client database (only used for internal operations) and there are only a couple of records involved



--------------------
keeping it simple...
Go to Top of Page

Kristen
Test

United Kingdom
22415 Posts

Posted - 01/11/2005 :  01:39:59  Show Profile  Reply with Quote
"BOL doesn't say much RockMoose"

I think RockMoose meant you to use

USE MASTER
GO
exec SP_HELPTEXT 'sp_dropapprole'

and reverse engineer a solution!

Kristen
Go to Top of Page

rockmoose
SQL Natt Alfen

Sweden
3279 Posts

Posted - 01/12/2005 :  12:32:12  Show Profile  Reply with Quote
quote:
Originally posted by Kristen

"BOL doesn't say much RockMoose"

I think RockMoose meant you to use

USE MASTER
GO
exec SP_HELPTEXT 'sp_dropapprole'

and reverse engineer a solution!

Kristen


Thanx, Kristen, yes that's what I meant.
Looking at the code of the system procs work has helped me out sometimes.

rockmoose
Go to Top of Page

jen
Flowing Fount of Yak Knowledge

Sweden
4110 Posts

Posted - 01/13/2005 :  01:11:00  Show Profile  Send jen a Yahoo! Message  Reply with Quote
oh i did that which gave me the info that the approle is existing in the sysusers table and it is an approle.

i agree looking at how an sp work helps at a certain extent.

guess this will be logged as another x file then

thanks for the ideas guys...




--------------------
keeping it simple...
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.09 seconds. Powered By: Snitz Forums 2000