Error recreating a user on NAV

taher.bha
Member Posts: 48
Hi all,
Am having the following problem when trying to reCreate A user on Dynamics NAV 5.0 that uses an SQL 2005 Database.
2714,"42S01",[Microsoft][ODBC SQL Server Driver][SQL Server]An object named 'UserZ' already exists on the database.
2759,"42000",[Microsoft][ODBC SQL Server Driver][SQL Server] CREATE SCHEMA failed due to anterior Errors.
Here's what i did exactly before starting getting this error :
The user UserZ was in the database but i removed it directly using the Server Management Studio (context menu on MyServer->Security->Logins->UserZ)
As the userZ was a user on 2 Databases (MyServer->Databases->DB1->Users) I tried removing it directly using the context menu with no success.
I run the following T-SQL Command
Any ideas ?
Am having the following problem when trying to reCreate A user on Dynamics NAV 5.0 that uses an SQL 2005 Database.
Sorry but am using a french version of SQL Server 2005. Here's my own traduction of the two first lines :2714,"42S01",[Microsoft][ODBC SQL Server Driver][SQL Server]Il existe déjà un objet nommé 'UserZ' dans la base de données.
2759,"42000",[Microsoft][ODBC SQL Server Driver][SQL Server]Échec de CREATE SCHEMA en raison d'erreurs antérieures.
SQL:
{CALL [sp_grantdbaccess](?)}
2714,"42S01",[Microsoft][ODBC SQL Server Driver][SQL Server]An object named 'UserZ' already exists on the database.
2759,"42000",[Microsoft][ODBC SQL Server Driver][SQL Server] CREATE SCHEMA failed due to anterior Errors.
Here's what i did exactly before starting getting this error :
The user UserZ was in the database but i removed it directly using the Server Management Studio (context menu on MyServer->Security->Logins->UserZ)
As the userZ was a user on 2 Databases (MyServer->Databases->DB1->Users) I tried removing it directly using the context menu with no success.
I run the following T-SQL Command
select * from information_schema.schemata where schema_owner = 'UserZ'and got one line. I used the found schema_name :
Alter authorization on schema::UserZ to dboI could then delete the User using
drop user UserZI did the same on a second database.
Any ideas ?
0
Answers
-
is there allready a user (SQL User) on the Server :?:
is there allready a user (SQL User) on the database because its a copy of a database from a other server :?:Do you make it right, it works too!0 -
Waou!!!, already one response ! Looks like a chat
I recreated the user as it's a requirement to create Users inside Navision.
There are other users but all of them were created directly on the current server.0 -
I tied the following :
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA
In the resultset I got a line with UserZ as Schema_Name
May this help ?0 -
Hi all,
I could finally create the User on the master Db and the Dbs that were used by the User 'UserZ'.
Don't ask me why cause i cannot reaaly understand what it was. It seems that the schema userZ was still used in one of the DB. I ran the following commands on the All the Dbs used.
drop user adelZ
drop schema AdelZ
drop login AdelZ
Hope this will help others
Thank you all.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions