Ekinlikler
31 Mar 23 - 2 Nis 23
En büyük SQL, Fabric ve Power BI öğrenme etkinliği. 31 Mart – 2 Nisan. 400 ABD doları tasarruf etmek için FABINSIDER kodunu kullanın.
Bugün kaydolunBu tarayıcı artık desteklenmiyor.
En son özelliklerden, güvenlik güncelleştirmelerinden ve teknik destekten faydalanmak için Microsoft Edge’e yükseltin.
Applies to:
SQL Server 2016 (13.x) and later
Azure SQL Database
Azure SQL Managed Instance
Azure Synapse Analytics
Analytics Platform System (PDW)
SQL database in Microsoft Fabric
You can view a table's dependencies in SQL Server Database Engine, using SQL Server Management Studio or Transact-SQL.
Requires VIEW DEFINITION
permission on the database and SELECT
permission on sys.sql_expression_dependencies
for the database. By default, SELECT
permission is granted only to members of the db_owner fixed database role. When SELECT
and VIEW DEFINITION
permissions are granted to another user, the grantee can view all dependencies in the database.
In Object Explorer, expand Databases, expand a database, and then expand Tables.
Right-click a table, and then select View Dependencies.
In the Object Dependencies<object name> dialog box, select either Objects that depend on <object name>, or Objects on which<object name>depends.
Select an object in the Dependencies grid. The type of object (such as "Trigger" or "Stored Procedure"), appears in the Type box.
Not
Viewing dependencies using Object Explorer > View Dependencies isn't supported in Azure Synapse Analytics. Instead, use sys.sql_expression_dependencies. Azure Synapse Analytics SQL pools support tables, views, filtered statistics, and Transact-SQL stored procedures entity types from this list. Dependency information is created and maintained for tables, views, and filtered statistics only.
The code samples in this article use the AdventureWorks2022
or AdventureWorksDW2022
sample database, which you can download from the Microsoft SQL Server Samples and Community Projects home page.
In Object Explorer, connect to an instance of Database Engine.
On the Standard bar, select New Query.
Copy and paste the following example into the query window and select Execute.
USE AdventureWorks2022;
GO
SELECT *
FROM sys.sql_expression_dependencies
WHERE referencing_id = OBJECT_ID(N'Production.vProductAndDescription');
GO
In Object Explorer, connect to an instance of Database Engine.
On the Standard bar, select New Query.
The following example returns the objects that depend on the table Production.Product
. Copy and paste the following example into the query window and select Execute.
USE AdventureWorks2022;
GO
SELECT *
FROM sys.sql_expression_dependencies
WHERE referenced_id = OBJECT_ID(N'Production.Product');
GO
Ekinlikler
31 Mar 23 - 2 Nis 23
En büyük SQL, Fabric ve Power BI öğrenme etkinliği. 31 Mart – 2 Nisan. 400 ABD doları tasarruf etmek için FABINSIDER kodunu kullanın.
Bugün kaydolunEğitim
Modül
Tablolar, görünümler ve geçici nesneler oluşturma - Training
Bu içerik Tablo, görünüm ve geçici nesne oluşturma bölümünün bir parçasıdır.
Belgeler
Tabloları yeniden adlandırma (Veritabanı Altyapısı) - SQL Server
Veritabanı tablosunu yeniden adlandırmayı öğrenin.
Tablo Tanımını Görüntüleme - SQL Server
Veritabanı tablosunun tanımını görüntülemeyi öğrenin.