SQL Server Developer Center > SQL Server Forums > SQL Server Database Engine > PUBLIC role is missing in SQL Server 2005
Ask a questionAsk a question
 

AnswerPUBLIC role is missing in SQL Server 2005

Answers

  • Monday, November 09, 2009 12:20 PMstswordman Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    every database user automatically belong to the fixed public role,  and every SQL Server login belongs to the public server role. They can't be missing. 

    I guess you can't find public through SSMS sometime, but it exist indeed.
    what's the symptom of your database and please run following query to check
    select * from sys.server_principals where name='public'

    select

     

    * from sys.database_principals where name='public'


    有dba的职位吗
  • Monday, November 09, 2009 3:44 PMTiborKMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    <<I guess you can't find public through SSMS sometime, but it exist indeed.>>

    That would be my guess as well. At some version, SSMS didn't show the public server role. But not displaying it doesn't really make any functional difference.
    Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://sqlblog.com/blogs/tibor_karaszi

All Replies

  • Saturday, November 07, 2009 6:40 PMLekss Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Is it at the server level or the Database level ?
    By the way , what is your SQL server 2005 service pack and your SSMS version ?


    Thanks, Leks
  • Monday, November 09, 2009 12:20 PMstswordman Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    every database user automatically belong to the fixed public role,  and every SQL Server login belongs to the public server role. They can't be missing. 

    I guess you can't find public through SSMS sometime, but it exist indeed.
    what's the symptom of your database and please run following query to check
    select * from sys.server_principals where name='public'

    select

     

    * from sys.database_principals where name='public'


    有dba的职位吗
  • Monday, November 09, 2009 3:44 PMTiborKMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    <<I guess you can't find public through SSMS sometime, but it exist indeed.>>

    That would be my guess as well. At some version, SSMS didn't show the public server role. But not displaying it doesn't really make any functional difference.
    Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://sqlblog.com/blogs/tibor_karaszi