Shared Flashcard Set

Details

Microsoft 70-462 - Managing SQL Server 2012
N/A
73
Computer Science
Post-Graduate
05/11/2015

Additional Computer Science Flashcards

 


 

Cards

Term
When configuring log shipping for a database, what mode should the receiving database be in for reporting to be done on it?

What is the other mode that does not allow access to the database after log shipping is done? Why does it not allow access?
Definition
STANDBY mode is preferred for databases with log shipping.

NORECOVERY mode simply takes in the transaction log and does nothing. Uncommitted transactions are left as-is. In STANDBY mode, uncommitted transactions are rolled back.
Term
What does the model system database do? Are the AUTO CLOSE and AUTO SHRINK options used with it?
Definition
This is the template for all new databases that are created on an instance of SQL Server.

And yes, both the AUTO CLOSE and AUTO SHRINK options are kept in the model DB. These will also apply to new databases created.

It also is used to generate the tempdb database at runtime.
Term
What does the AUTO CLOSE option for a database do?
Definition
Auto Close determines whether a database is automatically closed and its resources freed when there are no connections to the database.
Term
What does the AUTO SHRINK option for a database do?
Definition
This makes the Database Engine automatically shrinks databases that have free space.
Term
When mirroring a database, what recovery model must the database use?
Definition
The Full Recovery Model
Term
When doing database mirroring, can you replicate databases that use FILESTREAMs?

What is a FILESTREAM?
Definition
No. A FILESTREAM enabled object will store BLOB objects in the hosts OS's file system.
Term
When mirroring databases, can you mirror system databases (tempdb, model, msdb)?
Definition
No.
Term
What two types of database mirroring are there?
Definition
1) High Performance - Primary Server keeps processing even if mirrored instance does not say it's received the shipped log.

2) High Safety - The database log is synchronized with the mirror so no data loss is possible.
Term
Can the x86 and x64 versions of SQL Server 2012 exist at the same time on a computer?
Definition
Yes.
Term
Can you attach a new database (when migrating from x86 to x64) to the new instance of SQL Server without creating associated SQL Server logins from the old box on the new box?
Definition
Yes, although in order to log into the database you would need to recreate these and map them to the users in the newly attached database.
Term
What is the difference between the SQLIO and SQLIOSIM applications included with SQL Server?
Definition
SQLIO = Raw benchmark of I/O performance on a HDD, SAN, etc.

SQLIOSIM: Simulates database activity on a particular set of hardware (read-ahead reads, backup, checkpoint, etc.)
Term
What is the minimum amount of RAM SQL Server needs?
Definition
1GB
Term
What is the proper tool to use to uninstall SQL Server Components? Installation center or Programs & Features?
Definition
Programs and Features. Installation Center only adds components.
Term
If you specify a minimum amount of memory for SQL Server, will it automatically consume that at startup?
Definition
No, it will only keep the minimum amount if the DBMS grows its RAM needs to meet that minimum.

Thus, if you set a 16GB minimum, but only 10GB is ever used, SQL Server will never use 16GB of RAM.
Term
What is the difference between processor affinity and I/O affinity?
Definition
Processor affinity assigns SQL Server threads to specific cores. I/O affinity does the same thing, but only for I/O tasks.
Term
What is the stored procedure you use to modify instance-level settings? (Database Mail, Index Fill Factor, Memory Reqs, etc)
Definition
sp_configure
Term
How many instances of SQL Server can you install on a single machine? A failover cluster?
Definition
You can install 50 instances on a single machine, and 25 on a failover cluster.
Term
What are the two components of Resource Governor on SQL Server?
Definition
- Resource Pools: Subset of physical resources (CPU / RAM) on a server

- Workload Groups: Assigned to resource groups. These allocate session requests to a particular resource pool.
Term
When using Resource Governor, how would you assign work from a session to a Workload Group and Resource Pool?

Once created, how do you assign this to the resource governor?
Definition
You must use a Resource Governor Classifier Function.

You assign this function (which is a standard scalar function) to resource Governor with this command:
ALTER RESOURCE GOVERNOR with (CLASSIFIER_FUNCTION = dbo.DayNightClassifier) ALTER RESOURCE GOVERNOR RECONFIGURE
Term
Can Resource Governor control SSIS, SSRS, or SSAS?
Definition
Nope, just the DBMS.
Term
If you are installing the Report Server feature on a machine, what must be installed prior on the Windows Server installation for this to work?
Definition
The Web Server Role.
Term
What utility do you need to use to assign permissions to SSIS?
Definition
dcomconfig.exe
Term
What object in SQL Server contains one or many full text indexes?
Definition
A full text index catalog.
Term
What underlying database mechanism allows you to create a FILETABLE?

What does this underlying feature do? What is a FILETABLE?
Definition
FILESTREAM enables FILETABLES. FILESTREAM allows SQL Server to store BLOBs (varbinary(MAX)) on the underlying NTFS filesystem for faster access.

FILETABLES are predefined tables that allow organization of these BLOBs.
Term
How many full text indexes can you set on a regular table in SQL Server? A partitioned table?
Definition
1024 on a regular table. 1 on a partitioned table.
Term
What system stored procedure would you use to estimate the space savings by turning on compression?
Definition
sp_estimate_data_compression_savings
Term

What steps must you go through to enable transparent data encryption?

Definition
  1. Create the master encryption key
  2. Create the certificate protected by the master key
  3. Create a Database Encryption Key (DEK) and protect it using the cert
  4. Encrypt the database
Term

What two things you need to set up in order to enable table partitioning?

 

Which object do you need to create first before you can set up table partitioning?

Definition
  1. Partition Function
    • Defines how the table using the partition will be split
    • Syntax: CREATE PARTITION FUNCTION <name> (<datatype>) AS RANGE LEFT/RIGHT FOR VALUES (<value>)

  2. Partition Scheme
    • Defines what filegroups the partitions will fall into
    • Requires a Partition Function to operate 
    • Syntax: CREATE PARTITION SCHEME <name> AS PARTITION <partitionFunctionName>
Term

What does the DBCC CHECKDB command do?

Definition

This command checks the database for corruption and can fix them (to a limited extent - constraints are ignored during a REPAIR operation).  Generates a lot of I/O.

 

NOTE: Some system databases cannot be fixed with DBCC CHECKDB

Term

In a SIMPLE recovery model database, what happens when the CHECKPOINT command is run? 

 

What about in a DB at the FULL recovery model?

Definition

SIMPLE: The transaction log is truncated.

 

FULL: The transaction log is truncated as far back as when the last log backup was taken (after a CHECKPOINT).

Term

Can you install SQL Server on Windows Server 2003?

Definition

Nope!

Term

In what circumstances can you NOT detach a database (when you are upgrading SQL Server, for instance)?

Definition
  • The DB is replicated and published
  • The DB is mirrored
  • The database has snapshots in place
  • The DB is a system DB
Term
What system catalog view shows you all logins and whether or not a user can log in or not?
Definition
SYS.SERVER_PRINCIPLES
Term

What is the difference between the CREATE ROLE and CREATE SERVER ROLE commands?

Definition

The CREATE ROLE statment refers to a database-level role, while the CREATE SERVER ROLE refers to a server role.

Term
Can you use the ALTER ROLE statement to add or remove a user from a user-defined database role?
Definition
No, you must use the sp_addrolemember system stored procedure.
Term
What is a SQL Server Application Role?
Definition
This allows you to assign an application certain rights to the database.  Users connect to the DBMS, pass an application passwork through (via the app they are using) and this app can use any permissions assigned to it.
Term
If a login is locked out in SQL Server, how do you unlock it?
Definition
The 'status' pane of the Login Properties window
Term
What are the two components necessary in order to audit activity in SQL Server?
Definition

1. A SQL Server Audit

2. An Audit Specification

Term
What is the permission necessary to play with SQL Server Audits?
Definition
ALTER ANY DATABASE AUDIT
Term

Say you run the following statement:

 

GO

sp_configure "c2 audit mode", 1;

GO

 

What is the next statement you must run to make sure this takes effect?

Definition
RECONFIGURE
Term

True or False?  You can create server-level audits and database-level audits.

 

What commands must you run to create an audit?

Definition

True.

 

You must run the CREATE SERVER AUDIT SPECIFICATION and CREATE DATABASE AUDIT SPECIFICATION before an audit will run.

Term
What does the sys.server_principles stored proc do?
Definition
sys.server_principals Provides information on server-level principals, including principal type, whether the principal is disabled, creation date, and modification date
Term
What does the sys.server_role_members system stored procedure do?
Definition
Provides information on role membership
Term
What does the sys.sql_logins system stored procedure do?
Definition
Provides information on whether a login is subject to password policy and is configured with an expiration date.
Term
When mirroring databases, what is Snapshot Publication?
Definition
This pushes a full copy of a database to the mirroring server.  Updates to the principal database are not reflected in the mirror until the next snapshot.
Term
Using AlwaysOn availability groups, what is the difference between Asynchronous-commit mode and Syncronous-Commit mode?
Definition
  • Asynchronous-commit mode: the primary will not wait for secondaries to harden the log (write log records to disk) and will run with minimum transaction latency.

  • Synchronous-commit mode: Each transaction is applied to the secondary replica before being written to the local log file. The primary verifies that the transaction has been applied to the secondary before entering a SYNCHRONIZED state.
Term
Using AlwaysOn Availability Groups, you can do automatic failovers if you set the failover mode to AUTOMATIC on which node(s)?
Definition
Both the primary and at least one secondary replica must be set to the AUTOMATIC failover mode.
Term

For a planned manual failover, what state must the replica DB's be in?

 

What type of failover mode must these databases be in?

Definition
SYNCHRONIZED state, and syncronous commit mode
Term

In order to automatically set up AlwaysOn, what type of accounts do the SQL Server accounts need to be?

 

If this isn't available, what must you create to support it?

Definition
Domain Accounts, otherwise you need to set up endpoints on your own.
Term
What mode must availability group instances be in for automatic failover?
Definition
Syncronous-Commit
Term

What version of SQL Server is capable of online index rebuilds?

 

What two datatypes prevent an online index rebuild from happening?

Definition

SQL Server Enterprise.

 

XML and Spacial datatypes cannot be online rebuilt.

Term
How many index key columns can a non-clustered index have?
Definition
16
Term
If you decide to use a Virtual Account on a server for a SQL Server service to run as, will this account have access to other computers via ADDS?
Definition
No, virtual accounts are only given access to the local computer.
Term

You need to restore two damaged pages to a database and then bring the database current again using a transaction log backup. 

 

What are the steps you must follow to do this?

Definition
  1. RESTORE DATABASE <db_name> PAGE <pages> FROM <full_backup> WITH NORECOVERY
     
  2. RESTORE LOG <log_backup>

  3. BACKUP LOG <db_name> TO <new_log_backup>

  4. RESTORE LOG <db_name> FROM <new_log_backup> WITH RECOVERY
Term
If you have two mirrored databases, but no witness server and one server explodes, what command must you run to force a failover?
Definition

ALTER DATABASE <db_name> SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS

 

This forces the database to fail over to the mirror.

Term
What SQL Server service CANNOT run on Windows Server Core?
Definition
Reporting Services.
Term
What server roles can add SQL Agent jobs?
Definition

1. Sysadmin

2. SQLAgentUserRole

3. SQLAgentOperatorRole

Term
What is the difference between c2 Audit Mode and 'Common Criteria Complicant' mode?
Definition
CCC mode adds in requirements that make table-level DENY permissions override column level GRANTs.
Term
When using FILESTREAM and FILETABLEs, can you modify an existing table to become a FILETABLE?
Definition
Nope
Term
You need to install software on a windows computer.  Do you give an account Power User or Administrator status?
Definition
Administrator.  Power user is only there for backwards compatibility.
Term

What is the difference between RAID 1 and RAID 0?

 

If you care more about performance than redundancy, what would you pick?

Definition

RAID 1 is disk mirroring.   RAID 0 is striping.

 

RAID 0 is more applicable for pure performance. 

Term
If SSRS needs to reach out to other servers, do you give the appropriate permissions to the Service Account or Execution Account?
Definition
The execution account, as the service account only runs the local service.
Term
What steps must you take to enable FILESTREAM access for an instance that has never supported it?
Definition
  1. Enable FILESTREAM and FILESTREAM I/O in SQL Config Manager
     
  2. Run the EXEC sp_configure filestream_access_level command, then RECONFIGURE

  3. Restart the DBMS Instance
     
  4. Create a FILESTREAM filegroup

  5. Add FILESTREAM files to the filegroup 
Term
If you are upgrading from SQL Server 2005 Std, what versions of 2012 can you upgrade to?
Definition
  • Standard
  • Enterprise
  • Business Intelligence
Term
When enlisting other servers for SQL Agent jobs, do you run the enlist commands on the master server or enlisted servers?
Definition
Run the enlist commands on the enlistment targets, NOT the master.
Term
True or False - you can detach databases with multiple filegroups associated with them.
Definition
True
Term
In case a database failure happens, do you need to perform a restore of only the most recent transaction log and differential backups?
Definition
No, you must restore each subsequent transaction log and differential backup for a database to come back online properly.
Term
What is the difference between the default trace on a SQL instance vs. the c2 audit mode?
Definition
The default trace only records changes to configuration options.  C2 audit mode tracks access to objects.
Term

Say you need to divy up a CPU by 20% for request type A, 30% for request type B, and the rest for other queries using resource governor.

 

How many resource pools do you need for this?  How many workload groups?

 

Further, what function must you create to place requests in the right workload group?

Definition

You need two of each.

 

The resource pool is the physcal resource (%CPU), and you need the workload groups to contain categories for requests A & B.

 

Finally, you need a classifier function that will rout requests to the appropriate workload group / resource pool.

Term

If you need to restore a database that was encrypted with TDE (Transparent Data Encryption), what two items do you need to recover the DB?

 

Further, where is the database encryption key (DEK) stored?

Definition

1) Private Key

2) Server Certificate

 

The DEK is stored in the server cert, so you do not need it to restore the database.

Term
When restoring a database and transaction logs, in what order do you restore items?
Definition

1) Restore the database in NORECOVERY mode

2) Back up existing transaction log into a new file

3) Restore archive transaction log backup

4) Restore new transaction log backup

5) RESTORE LOG WITH RECOVERY

Term

What command do you need to run to change the ownership of an ENDPOINT?

 

What about changing the security type used for the ENDPOINT?

Definition

1) ALTER AUTHORIZATION

2) ALTER ENDPOINT

Supporting users have an ad free experience!