My Oracle Support Banner

Sp_adduser For Empty SQL Server Database Install Does Not Create User Correctly CCB (Doc ID 1207194.1)

Last updated on MARCH 26, 2019

Applies to:

Oracle Utilities Customer Care and Billing - Version 2.2.0.0.0 and later
Information in this document applies to any platform.

Goal

The following error is encountered after creating an empty database:

"Error: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot find the user '<DB USER NAME>', because it does not exist or you do not have permission."


Problem explanation:

MS SQL Server Name: <SERVER NAME> (No named instance on our test environment)
Name of the SQL Server admin account: <ADMIN USERNAME>
Password for '<ADMIN USERNAME>': <ADMIN PASSWORD>
Database name: <DATABASE NAME>
Collation: SQL_LAtin1_General_CP1_CS_AS
Directory: C:\temp (note no spaces)
Application user: <DB USER NAME>
Password for the application user: <DB USER PASSWORD>
1> 2> 3> use <DATABASE NAME> exec sp_addlogin '<DB USER NAME>','<DB USER PASSWORD>','<DATABASE NAME>' exec sp_adduser

'<DB USER NAME>','<DB USER PASSWORD>', 'public'


The last part of the above code runs:

exec sp_adduser '<DB USER NAME>','<DB USER PASSWORD>', 'public'
ALTER procedure [sys].[sp_adduser]
Selecting 'S', providing:
Name of the admin: <ADMIN USERNAME>
Password for '<ADMIN USERNAME>': <ADMIN PASSWORD>
Database name: <DATABASE NAME>
ODBC Connection: CCB220
Application user that will connect: <DB USER NAME> (as set up previously, and shown in the screenshots)


This fails, providing the errors shown below.The errors are repeating, and following this pattern (Cannot find the user '<DB USER NAME>').

--Generating security ...
GRANT SELECT,INSERT,UPDATE,DELETE ON C0_INSTALLATION to <DB USER NAME>;
--Error: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot find the user '<DB USER NAME>', because it does not exist or you do not have permission.


-- Workaround:

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.