ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Creating the geodatabase NIS users and connections

  • Creating an NIS editor user
  • Creating an NIS viewer user
  • Creating database connections for NIS users

Creating an NIS editor user

The nis user created previously is a data owner. Anybody connecting as the owner can delete the NIS tables or make any schema changes. To protect the NIS, an editor user can be created to edit data. The examples below show how to create a geodatabase editor user to access the NIS.

Note:

Copying and pasting the examples may cause syntax errors.

Create the editor login.

USE master
GO
EXEC sp_addlogin N'nis_editor', 'editor', @logindb, @loginlang
GO

Create user.

--use nisdb database
USE [nisdb]
GO
CREATE USER [nis_editor] FOR LOGIN [nis_editor]
GO

Grant privileges.

--use nisdb database
USE [nisdb]
GO
EXEC sp_addrolemember N'rlniseditor', N'nis_editor'
GO

Verify user permissions.

--use nisdb database
USE [nisdb]
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) = 'nis_editor' 
GO

Creating an NIS viewer user

Additionally, a viewer user can be created to provide read-only access to the NIS. The examples below show how to create a geodatabase viewer user to access the NIS.

Note:

Copying and pasting the examples may cause syntax errors.

Create the viewer login.

USE master
GO
EXEC sp_addlogin N'nis_viewer', 'viewer', @logindb, @loginlang
GO

Create user.

--use nisdb database
USE [nisdb]
GO
CREATE USER [nis_viewer] FOR LOGIN [nis_viewer]
GO

Grant privileges.

--use nisdb database
USE [nisdb]
GO
EXEC sp_addrolemember N'rlnisviewer', N'nis_viewer'
GO

Verify user permissions.

--use nisdb database
USE [nisdb]
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) = 'nis_viewer' 
GO

Creating database connections for NIS users

Database connections need to be created for the other NIS users. Create a database connection in ArcCatalog with the NIS_EDITOR and NIS_VIEWER users.

For more information, see Database connections in ArcGIS for Desktop

Note:

You can create a login for each user in the NIS database and, if using database authentication, type the user name of the NIS user for whom you want to create a database connection.

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2020 Esri. | Privacy | Legal