Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 another unusual behavior

Author  Topic 

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2005-01-07 : 00:42:39
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
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2005-01-09 : 21:36:31
any takers on this one?

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

Kristen
Test

22859 Posts

Posted - 2005-01-10 : 01:31:30
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
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2005-01-10 : 02:45:08
not sure what you mean by shared, but the name is unique

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

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2005-01-10 : 10:13:29
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

22859 Posts

Posted - 2005-01-10 : 11:16:43
"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
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2005-01-11 : 00:26:46
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

22859 Posts

Posted - 2005-01-11 : 01:39:59
"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

3279 Posts

Posted - 2005-01-12 : 12:32:12
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
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2005-01-13 : 01:11:00
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
   

- Advertisement -