Collections:
Verifying a User Name with SQLCMD Tool in SQL Server
How To Verify a User name with SQLCMD Tool in SQL Server?
✍: FYIcenter.com
The quickest way to verify a user name in a database is probably to use the SQLCMD tool. You can connect to the server, select the database, and check which user name is linked the current login name as shown below.
Start a command window and enter the following command:
C:\>SQLCMD -S LOCALHOST\SQLEXPRESS -U Fyi_Login -P IYF 1> USE FyiCenterData; 2> GO Changed database context to 'FyiCenterData'. 1> PRINT User_Name(); 2> GO Fyi_User
This shows user "Fyi_User" in database "FyiCenterData" is linked to login name "Fyi_Login".
Â
2017-08-25, 1633👍, 0💬
Popular Posts:
How To Change the Name of a Database User in SQL Server? If you want to change the name of an existi...
What Do You Need to Connect PHP to MySQL in MySQL? If you want to access MySQL database server in yo...
Where to find answers to frequently asked questions on CREATE, ALTER and DROP Statements in MySQL? H...
How To Replace NULL Values in Expressions using ISNULL() in SQL Server Transact-SQL? As you learned ...
What is mscorsvw.exe - Process - Microsoft .NET Framework NGEN in SQL Server? Process mscorsvw.exe i...