Skip to content

Commit e7a900a

Browse files
authored
Merge pull request #381 from dbt-msft/add-nolock-metadata
add nolock to catalog call
2 parents 69b4189 + 967f0b6 commit e7a900a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dbt/include/sqlserver/macros/adapters/metadata.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
name as principal_name,
1010
principal_id as principal_id
1111
from
12-
sys.database_principals
12+
sys.database_principals with (nolock)
1313
),
1414

1515
schemas as (
@@ -18,7 +18,7 @@
1818
schema_id as schema_id,
1919
principal_id as principal_id
2020
from
21-
sys.schemas
21+
sys.schemas with (nolock)
2222
),
2323

2424
tables as (
@@ -28,7 +28,7 @@
2828
principal_id as principal_id,
2929
'BASE TABLE' as table_type
3030
from
31-
sys.tables
31+
sys.tables with (nolock)
3232
),
3333

3434
tables_with_metadata as (
@@ -49,7 +49,7 @@
4949
principal_id as principal_id,
5050
'VIEW' as table_type
5151
from
52-
sys.views
52+
sys.views with (nolock)
5353
),
5454

5555
views_with_metadata as (

0 commit comments

Comments
 (0)