Database principals

  • How to add records in the table msdb.sys.database_principals ? is there any way to add records thr front end or any SP to add records thr back end.

  • It's a secutity catalog view rather than a table. You can't add rows to it directly, but all it lists are database users and roles so you when you add a user or role it will be displayed by sys.database_principals. Use sp_adduser, sp_addrole, or simply add them in SSMS.

    Greg

  • The sp_adduser/sp_addrole are deprecated in SQL 2005

    Rather use CREATE USER ... and CREATE ROLE ...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • GilaMonster (5/13/2008)


    The sp_adduser/sp_addrole are deprecated in SQL 2005

    Rather use CREATE USER ... and CREATE ROLE ...

    Oh yeah. Old habits... Thanks, Gail

    Greg

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply