Re: Can't login to SQL Server



The SQL than I'm using is this:

exec sp_addlogin 'USERA', 'xxxxx', 'MyDatabase'
exec sp_addsrvrolemember 'USERA', sysadmin
exec sp_addlogin 'USERB', 'xxxxxx', 'MyDatabase'
EXEC sp_grantdbaccess 'USERB'
EXEC sp_addrolemember db_datareader, 'USERB'
EXEC sp_addrolemember db_datawriter, 'USERB'



.



Relevant Pages

  • Re: Cant login to SQL Server
    ... exec sp_addlogin 'USERA', 'xxxxx', 'MyDatabase' ... EXEC sp_grantdbaccess 'USERB' ... with the newly created login USERB. ... There is one more thing you need to be aware of: in SQL 2005, ...
    (microsoft.public.sqlserver.security)
  • Re: New User error...
    ... EXEC sp_addlogin 'MyLogin', 'Mypassword' ... USE MyDatabase ... --Windows authentication ...
    (microsoft.public.sqlserver.programming)
  • Re: Find out which table columns are included
    ... I usually enable fulltext indexing on a table with the following ... USE MyDatabase ... EXEC sp_fulltext_catalog 'MyTable_Fulltext', 'create' ...
    (microsoft.public.sqlserver.fulltext)