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, 1052👍, 0💬
Popular Posts:
What are binary literals supported in SQL Server Transact-SQL? Binary literals in Transact-SQL are s...
How To Convert Numeric Values to Integers in SQL Server Transact-SQL? Sometimes you need to round a ...
How To Download Oracle Database 10g XE in Oracle? If you want to download a copy of Oracle Database ...
How To Get the Definition of a Stored Procedure Back in SQL Server Transact-SQL? If you want get the...
How REAL and FLOAT Literal Values Are Rounded in SQL Server Transact-SQL? By definition, FLOAT(n) sh...