SQL Flashcards
1
Q
How do you install SQL Express with tools 64-bit?
A
2
Q
How do you run a script?
A
- Open SSMS, right-click a database on the left side, and select New Query
- Paste the script into the query window
- Press Parse to validate SQL syntax
- Press Execute to run the script
3
Q
How do you set SQL to log into a file?
A
4
Q
Explain the difference between Windows vs. SQL authentication
A
Windows authentication checks the Windows User account that’s logged in using a principal token, whereas SQL authentication uses a username and password stored in within the SQL instance
5
Q
How do you view a table for the VCM database?
A
- Expand the SqlServer instance tree
- Expand the VCM Database
- Expand Tables
6
Q
How do you view permissions for a database?
A
- Right-click a database in the Object Explorer and select Properties
- On the right side, select the Permissions page
7
Q
How do you view Security Roles for a database?
A
8
Q
How do you take a backup of a database?
A
- Right-click a database in the Object Explorer and select Tasks > Back Up…
- Press Add to choose a file path to save to
- Press OK to back up the database
9
Q
How do you detach a database?
A
- Right-click a database in the Object Explorer and select Tasks > Detach
- Press OK
10
Q
How do you restore a database?
A
- Right-click a database in the Object Explorer and select Tasks > Restore > Database
- Choose Device and enter the file path of the .bak file
- Select the database from the drop-down
- Press OK
11
Q
How do you reattach a database?
A
- Right-click Databases and select Attach
- Press Add, then navigate to the location of the .mdf file
- Press OK