Delete User Script¶
SQL Server Command Line Tool sqlcmd must be installed on Totalview Server. Can be dowloaded from Microsoft website. To verify: Open cmd and run sqlcmd -? It should output version number and command line usage.
Get User’s ID¶
Open Totalview Client and right click on the user that is to be deleted. In the popup context menu, under Details, the Rec Id is the user’s ID, that is to be used a input to the script.
Execute the Script¶
1. Stop all Totalview Services¶
2. Take Backup of Database¶
3. Run SQL Script¶
sqlcmd -U <db userid> -S <db server name> -d <database name> -v resourceid=<user id to be deleted> -i <path to deleteresource.sql script>
sqlcmd -U sa -S localhost -d totalviewdb -v resourceid=6187 -i “C:\Program Files (x86)\formula.fo\Totalview3\Misc\deleteresource.sql”