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".
⇒ "ALTER USER" - Changing the Name of a Database User in SQL Server
⇐ Finding the Login Name Linked to a Given User Name in SQL Server
2017-08-25, 4636🔥, 0💬
Popular Posts:
Where to find answers to frequently asked questions on CREATE, ALTER and DROP Statements in MySQL? H...
How To Connect ASP Pages to Oracle Servers in Oracle? If you are running Windows IIS Web server and ...
How To Get the Definition of a Stored Procedure Back in SQL Server Transact-SQL? If you want get the...
How To Get Year, Month and Day Out of DATETIME Values in SQL Server Transact-SQL? You can use DATEPA...
How To Connect to a MySQL Server with a Port Number in MySQL? If you want to connect a MySQL server ...