У нас вы можете посмотреть бесплатно You do not have access to Microsoft Dynamics NAV or Dynamics 365 Business Central Error или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
Dynamics 365 LS Central NAV Power Manager v2.5.1- You do not have access Dynamics 365 Business Central Error Error when login to Business Central ON-PREM Manage users - Delete all users Dynamics 365 ✅ General Explanation of What This Part Does: Main Purpose: This section is responsible for deleting all users from the Dynamics 365 Business Central database, including their records, permissions, and roles at the SQL Server level. 🟢 What Exactly Does It Do? Connects to the Server and Database: Prompts you to enter the SQL Server name, database name, and the NAV Server Instance name. Loads the Dynamics Admin Tool (NavAdminTool): Ensures proper handling of server configuration and applying changes. Deletes All Users from Dynamics Tables: Clears all user data, permissions, customizations, and any user-related information from specific tables in the database. Removes Users with DB_OWNER Role at SQL Level: Deletes any user assigned with DB_OWNER role, except essential system users like dbo and sa to keep the system stable. Restarts the NAV Server Instance: Ensures all changes take effect and the server runs without any users. 🟢 Practical Benefits of This Part: 🔹 Complete User Cleanup: If you have a Test, UAT, or Production environment and need to start fresh without any users, this part clears all users completely. 🔹 Environment Reset: Useful when there are permission issues, or when you need to quickly delete all users instead of doing it manually through the system or SQL. 🔹 Preparing for a New Environment: Perfect before restoring a new backup or setting up the system for a new client, allowing you to start with a clean database. 🔹 System Protection: Ensures essential system users (dbo, sa) are not deleted, keeping the database functional. 🟢 Summary: "A powerful tool to completely remove all users and their related data from the Dynamics BC system and database, providing a fast and easy way to reset the environment." ✅ What Enhancements Were Made to the Module? 1️⃣ Input Validation: 🔹 Previous Issue: The user could accidentally enter an empty value for the server name, database name, or username, which would cause the module to fail or throw an error. 🔹 Enhancement: I added input validation checks to ensure that if the user leaves the input empty, the module will keep asking until a valid value is provided: powershell Copy Edit do { $serverInstance = Read-Host "Enter the server instance name" if ([string]::IsNullOrWhiteSpace($serverInstance)) { Write-Host "Server instance name cannot be empty!" -ForegroundColor Red } } while ([string]::IsNullOrWhiteSpace($serverInstance)) 🔹 Benefit: The module will not proceed unless all inputs are valid and correctly entered, preventing errors due to incorrect input. 2️⃣ Comprehensive Error Handling (Try/Catch): 🔹 Previous Issue: If any step (like restarting the server, deleting a user, or executing SQL) encountered an error, the module would stop immediately. 🔹 Enhancement: I added Try/Catch blocks around all critical operations to handle any errors gracefully: powershell Copy Edit try { Restart-NAVServerInstance -ServerInstance $serverInstance } catch { Write-Host "Error restarting server: $_" -ForegroundColor Red } 🔹 Benefit: If an error occurs, the module shows a clear message and either continues or exits safely without breaking the environment or crashing. 3️⃣ Fixing Issue with Deleting Users Owning Schemas: 🔹 Issue: You were encountering the error: "The database principal owns a schema in the database, and cannot be dropped." 🔹 Enhancement: I added a step before deleting each user to: Transfer ownership of any Schemas owned by the user to dbo first. sql Copy Edit DECLARE @sql NVARCHAR(MAX) = N''; SELECT @sql += N'ALTER AUTHORIZATION ON SCHEMA::[' + name + N'] TO [dbo];' + CHAR(13) FROM sys.schemas WHERE principal_id = USER_ID(N'$userName'); EXEC sp_executesql @sql; Then, after transferring ownership, the user is safely deleted. 🔹 Benefit: This completely solves the issue and allows all users to be deleted cleanly without schema ownership errors. 4️⃣ Improving User Experience (UX): The module now shows clear, color-coded messages for each step (success or failure). It checks if a user exists before attempting to create or delete. Added an option to repeat adding users in a more organized way. 🟢 Summary of Enhancements: No. Enhancement Practical Benefit 1 Input Validation Prevents errors caused by empty or incorrect inputs. 2 Try/Catch for All Critical Steps Prevents module from crashing and provides clear messages. 3 Fixing Schema Ownership Deletion Issue Allows safe deletion of users without SQL errors. 4 Improved User Experience Clear messages, understandable steps, and smoother usage. #Dynamics365 #LSCentral #NAVPowerManager #BusinessCentral #ERPManagement #RetailSolutions #SQLAutomation #SystemOptimization #NAVAdministration #MicrosoftERP #databasemanagement