Posts tagged "T-SQL"

Backup & Restore Examples

Below are some examples of backup scripts SQLCMD allows users to make multiple connections to different servers within the same script. File: backup_ReportServer.sql BACKUP DATABASE [ReportServer] TO DISK='C:\backups\ReportServer.bak' An example of backing up multiple databases using a single script: File: backup_databases.sql –Make a connection to 1st server using Windows Authentication :CONNECT–E –Issue a backup database command for 1st database BACKUP … Continue reading


Workload Groups

The Resource Governor Classifier identifies when a session starts and assigns the session to a workload group. Workload groups function as containers for session requests that share similar classification criteria. Workload groups are assigned to resource pools. There are two built-in workload group, the internal group and the default group, but we can create user-defined workload groups. These groups can … Continue reading


Configuring Resource Governor

Resource Governor is a SQL Server 2012 feature that enables you to place limits on the consumption of CPU and memory resources within a SQL Server 2012 Database Engine instance. It enables us to allocate session requests to different resources based on the characteristics of the session request properties It can help you get a handle on out-of-control queries by … Continue reading


SQL Study Notes: The From & Select Clauses

The FROM clause is the first clause to be evaluated logically in a SELECT query and has two main roles: it’s the clause where you indicate the tables that you want to query it’s the clause where you can apply table operators like joins to input tables In some cases, T-SQL supports omitting the schema name, as in FROM Employees, … Continue reading