Wednesday, 25 January 2012

PERMISSIONS | SQL Server Interview Questions

1.Different Authentication modes in Sql server? If a user is logged under windows authentication mode, how to find his userid?
There are Three Different authentication modes in sqlserver.
  •     Windows Authentication Mode
  •     SqlServer Authentication Mode
  •     Mixed Authentication Mode
“system_user” system function in sqlserver to fetch the logged on user name.

2. Give the connection strings from front-end for both type logins(windows,sqlserver)?
This are specifically for sqlserver not for any other RDBMS
Data Source=MySQLServer;Initial Catalog=NORTHWIND;Integrated Security=SSPI (windows)
Data Source=MySQLServer;Initial Catalog=NORTHWIND;Uid=” ”;Pwd=” ”(sqlserver)

3. What are three SQL keywords used to change or set someone’s permissions?
Grant, Deny and Revoke

4. If a user does not have permission on a table, but he has permission to a view created on it, will he be able to view the data in table?
Yes.