| Acey Bunch [MSFT] 2006-03-16, 9:23 am |
| Wayne,
Yes this is a bit confusing and we should clarify this. SQL user defined
roles are a bit of a problem to work with, because they are defined per
database.
So if you decide to create your own role for security purposes, as we did
with the [SQLJDBCXAUser] role, you have to define the role in each database,
and add users in a per database fashion. In our case this [SQLJDBCXAUser]
role is strictly defined in master because it is used to grant access to the
SQL JDBC extended stored procedures which reside in master.
So you do have to first grant the individual user access to master, then
grant them access to the [SqlJDBCXAUser] role while logged into master.
So use this command for example for this 'wayne' user (SQL standard login
user named 'wayne'):
USE master
GO
EXEC sp_grantdbaccess 'wayne', 'wayne'
GO
EXEC sp_addrolemember [SqlJDBCXAUser], 'wayne'Thanks for the feedback on the
installation instructions, we will get them updated to make all of this more
clear.
-Acey
"WayneHearn" < WayneHearn@discussio
ns.microsoft.com> wrote in message
news:0D52A17B-E02B-416C-8EAA- DA4C86A2AFC4@microso
ft.com...
>I have followed the installation instructions provided with the released
>SQL
> 2005 JDBC driver but adding a user to the SqlJDBCXAUser role doesn't work
> as
> advertised with the released version of SQL 2005 or I don't understand how
> it
> should work. The install script defines the role on the master database
> but
> when I execute sp_addrolemember [SqlJDBCXAUser], 'wayne' I get an error
> stating:
>
> User or role 'wayne' does not exist in this database.
>
> Does that mean I have to add each user that might be used in an XA
> transaction to the master database? Can someone explain how and why this
> works this way? The docs delivered with the JDBC driver are a bit thin.
>
> Thanks.
|