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