SQL Server Database Administrator Interview Questions and Answers (Day-1)

How to check server side configuration?

How to check the current location of data and log files for the system databases?

What are the types of CHECKSUM?

SQL Server supports three types of checksums: a checksum on pages, a checksum in log blocks, and a backup checksum.

What is a SQL Server Credential?

A SQL Server credential is an object that is used to store authentication information required to connect to a resource outside of SQL Server.

How to remove all SQL Job related history from the related system tables?

Using this system stored procedure – sp_purge_jobhistory .

What are Database Maintenance Plans?

Database Maintenance Plans allow us to automate many database administration tasks in Microsoft SQL Server. Maintenance plans create a workflow of the tasks required to make sure that our database is optimized, regularly backed up, and free of inconsistencies.

What all options we have in a Database maintenance plans which helps a DBA to keep the database healthy?

  • Check Database Integrity
  • Shrink Database
  • Reorganize Index
  • Rebuild Index
  • Update Statistics
  • Clean Up History
  • Execute SQL Server agent job
  • All type of Database Backup
  • Maintenance clean up task

In which Database all the Maintenance Plans are stored?

MSDB database contains information about all the Database Maintenance plans.

Can we execute TSQL Statement using Database Maintenance Tasks?

Yes, we can run TSQL Statement in a Database Maintenance Plan.

Can we run a SQL Server Agent job using Database Maintenance Tasks?

Yes, we run a SQL Server Agent job in a Database Maintenance Plan.

Is it possible to mark Primary File Group as Read only?

No it’s not possible to make Primary File Group read only.

How to make the File Group read only?

What are the benefits of Read only file groups?

  • Can be compressed (using NTFS compression)
  • During recovery you don’t need to apply logs to recover a read-only file group
  • Protection of data from accidental modifications

What are the important dynamic management views to find different type of fragmentations?

  • dm_db_index_operational_stats
  • dm_db_index_physical_stats
  • dm_db_partition_stats
  • dm_db_index_usage_stats

What are the important dynamic management views to find space usage related information?

  • dm_db_file_space_usage
  • dm_db_task_space_usage
  • dm_db_session_space_usage

What is the Query Hints option?

Query hints override the default behavior of the query optimizer for the duration of the query statement.

You can use query hints to specify a locking method on the affected tables, one or more indexes, a query processing operation such as a table scan or index seek, or other options. Query hints are applied to the entire query.

What is BCP? When does it used?

BulkCopy is a tool used to copy huge amount of data from tables and views. BCP does not copy the structures same as source to destination. BULK INSERT command helps to import a data file into a database table or view in a user-specified format.

Can we add CPU to sql server?

Yes: Adding CPUs can occur physically by adding new hardware, logically by online hardware partitioning, or virtually through a virtualization layer.

What are the most common ports of SQL Server?

  • MSSQL Server: 1433
  • HTTP TCP: 80
  • HTTPS TCP: 443

Please share your ideas and opinions about this topic with me, your contribution will add true value to this topic.
If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.

If you like this post, then please share it with others.
Please follow dbrnd.com, I will share my experience towards the success of Database Research and Development Activity.

I put up a post every day, please keep reading and learning.
Discover Yourself, Happy Blogging !
Anvesh M. Patel.

More from dbrnd.com

Leave a Reply

Be the First to Comment!

Notify of