Database Research & Development

  • Home
  • NoSQL
    • NoSQL
    • Cassandra
  • Databases
    • Database Theory
    • Database Designing
    • SQL Server Coding Standards
    • SQL Server
    • PostgreSQL
    • MySQL
    • Greenplum
    • Linux
  • Interviews
    • SQL Server Interviews
    • MySQL Interviews
    • SQL Puzzles
  • DBA Scripts
    • SQL Server DBA Scripts
    • PostgreSQL DBA Scripts
    • MySQL DBA Scripts
    • Greenplum DBA Scripts
  • Home
  • Blog Archives !
  • (: Laugh@dbrnd :)
  • Contact Me !
sqlserverinterviews
Home 2016 July SQL Server Database Administrator Interview Questions and Answers (Day-1)

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

This article is half-done without your Comment! *** Please share your thoughts via Comment ***

How to check server side configuration?

1
SELECT * FROM sys.configurations;

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

1
2
3
SELECT name, physical_name AS current_file_location
FROM sys.master_files
WHERE database_id IN (DB_ID('master'), DB_ID('model'), DB_ID('msdb'), DB_ID('tempdb'));

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?

1
ALTER DATABASE AdvantureWorks2012 MODIFY FILEGROUP SecondaryFile 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
Jul 9, 2016Anvesh Patel
SQL Server: Database Log Shipping Interview Questions and Answers (Day-4)SQL Server Database Administrator Interview Questions and Answers (Day-2)
Comments: 3
  1. srinu
    March 2, 2017 at 1:39 pm

    why tempdb full ? what are the reasons ? please interviewer level

    • Anvesh Patel
      Anvesh Patel
      March 2, 2017 at 6:33 pm

      There are several reasons that might cause your tempdb to get very big.

      A lot of sorting – if this requires more memory than your sql server has then it will store all temp results in tempdb
      DBCC commands – if you’re frequently running commands such as DBCC CheckDB this might be the cause. These functions store its results in temp db
      Very large resultsets – these are also using temp db to run properly
      A lot of heavy transactions such as bulk inserts

    • Anvesh Patel
      Anvesh Patel
      March 2, 2017 at 6:35 pm

      Thank you Srinu, will prepare a detail post and will share here….

Anvesh Patel
Anvesh Patel

Database Engineer

July 9, 2016 SQL Server Interviewanswers, Anvesh Patel, configuration, database, database administrator, database maintenance plan, database research and development, dbrnd, interview, port, questions, SQL Query, SQL Server, SQL Server Administrator, SQL Server Monitoring, SQL Server Performance Tunning, SQL Server Tips and Tricks, TSQL
About Me!

I'm Anvesh Patel, a Database Engineer certified by Oracle and IBM. I'm working as a Database Architect, Database Optimizer, Database Administrator, Database Developer. Providing the best articles and solutions for different problems in the best manner through my blogs is my passion. I have more than six years of experience with various RDBMS products like MSSQL Server, PostgreSQL, MySQL, Greenplum and currently learning and doing research on BIGData and NoSQL technology. -- Hyderabad, India.

About DBRND !

dbrnd

This is a personal blog (www.dbrnd.com).

Any views or opinions represented in this blog are personal and belong solely to the blog owner and do not represent those of people, institutions or organizations that the owner may or may not be associated with in professional or personal capacity, unless explicitly stated.

Feel free to challenge me, disagree with me, or tell me I’m completely nuts in the comments section of each blog entry, but I reserve the right to delete any comment for any reason whatsoever (abusive, profane, rude, or anonymous comments) - so keep it polite.

The content of this website is protected by copyright. No portion of this website may be copied or replicated in any form without the written consent of the website owner.

Recent Comments !
  • Anvesh Patel { Sure will do... } – May 27, 12:43 PM
  • Anvesh Patel { Great... } – May 27, 12:41 PM
  • Anvesh Patel { Great... } – May 27, 12:39 PM
  • Anvesh Patel { Great... } – May 27, 12:36 PM
  • Anvesh Patel { Great... } – May 27, 12:28 PM
  • Anvesh Patel { Great... } – May 27, 12:27 PM
  • Anvesh Patel { Great... } – May 27, 12:16 PM
  • Older »
Follow Me !
  • facebook
  • linkedin
  • twitter
  • youtube
  • google
  • flickr
© 2015 – 2019 All rights reserved. Database Research & Development (dbrnd.com)
Posting....