CLR Flashcards

1
Q

What are the permissions you can set in WITH PERMISSION_SET when creating an assembly?

A

SAFE
EXTERNAL_ACCESS
UNSAFE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is SAFE permission_set?

A

It is the most restrictive permission set. It cannot access the network, files, env variables or registry

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is EXTERNAL_ACCESS permission_set?

A

Enables assemblies to access certain external system resources such as files, networks, env variables and registry

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is UNSAFE permission_set?

A

Unrestricted access both within SQL instance and without. Very UNSAFE (Hence the name)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the code to implement a .net framework assembly?

A

EXTERNAL NAME Assembly.Class.Method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the syntax to use a DLL in SSMS (IE: CLR stored procedure)?

A

CREATE ASSEMBLY AssemblyName FROM N’C:\PATH\ASSEMBLY.DLL’ WITH PERMISSION_SET = [SAFE,UNSAFE,EXTERNAL_ACCESS]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do you enable the system to use CLR Integration?

A

EXEC sp_configure ‘clr enabled’, 1;

RECONFIGURE;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly