Available with Production Mapping license.
Creating the geodatabase user
The prodlib user created previously is a data owner. Anybody connecting as prodlib can delete the product library tables or make any schema changes. To protect the product library repository, an editor user can be created to access the product library. The editor user will not be able to create a new class in the product library, which only the data owner prodlib can do, but all the other functionality is available.
The examples below show how to create a geodatabase user to access the product library.
USE master
GO
EXEC sp_addlogin N'prodlibuser', 'prodlibuser', @logindb, @loginlang
GO
Create user.
--use prodlibdb database
USE [prodlibdb]
GO
CREATE USER [prodlibuser] FOR LOGIN [prodlibuser]
GO
Grant privileges.
--use prodlibdb database
USE [prodlibdb]
GO
EXEC sp_addrolemember N'ckb_users', N'prodlibuser'
GO
Verify user permissions.
--use prodlibdb database
USE [prodlibdb]
GO
select USER_NAME(p.grantee_principal_id) AS principal_name,
dp.type_desc AS principal_type_desc,
p.class_desc,
OBJECT_NAME(p.major_id) AS object_name,
p.permission_name,
p.state_desc AS permission_state_desc
from sys.database_permissions p
inner JOIN sys.database_principals dp
on p.grantee_principal_id = dp.principal_id
where USER_NAME(p.grantee_principal_id) = 'prodlibuser'
GO
Creating database connections for product library users
Database connections need to be created for the other product library users. Create a database connection in ArcCatalog with the PRODLIBUSER user; this will be the product library geodatabase connection.