# Function: fn_diagramobjects

## Properties

Property | Value
--- | ---
Name | fn_diagramobjects
ID | 1703677117
Schema | dbo
Owner | dbo
Execute As | dbo
Type | SQL SCALAR FUNCTION
Uses Ansi Nulls |
Uses Quoted Identifier |
Is Schema Bound |
Uses Database Collation |
Null on Null Input |
Encrypted |
MS Shipped |
Published |
Schema Published |
Deterministic |
Precise |
System Verified |
System Data Access |
User Data Access |
Modify Date | 6/20/2011 3:16:00 PM
Creation Date | 6/20/2011 3:16:00 PM

## Extended Properties

No extended properties defined.

## Permissions

#### Permissions for: guest

Permission | Grantor | Grant | With Grant Option | Deny
--- | --- | --- | --- | ---
Alter |  |  |  |
Control |  |  |  |
Execute | dbo |  |  |
References |  |  |  |
Take Ownership |  |  |  |
View Definition |  |  |  |

#### Permissions for: public

Permission | Grantor | Grant | With Grant Option | Deny
--- | --- | --- | --- | ---
Alter |  |  |  |
Control |  |  |  |
Execute | dbo |  |  |
References |  |  |  |
Take Ownership |  |  |  |
View Definition |  |  |  |

## Parameters

No function parameters defined.

## Recordset Returned

Datatype | Has Default Value | Default Value | Xml Document | Description
--- | --- | --- | --- | ---
int |  |  |  |

## Objects that depend on [fn_diagramobjects]

- dbo.fn_diagramobjects

## Objects on which [fn_diagramobjects] depends

- dbo.fn_diagramobjects

## SQL

Script
SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON CREATE FUNCTION dbo.fn_diagramobjects() RETURNS int WITH EXECUTE AS N'dbo' AS BEGIN declare @id_upgraddiagrams int declare @id_sysdiagrams int declare @id_helpdiagrams int declare @id_helpdiagramdefinition int declare @id_creatediagram int declare @id_renamediagram int declare @id_alterdiagram int declare @id_dropdiagram int declare @InstalledObjects int select @InstalledObjects = 0 select @id_upgraddiagrams = object_id(N'dbo.sp_upgraddiagrams'), @id_sysdiagrams = object_id(N'dbo.sysdiagrams'), @id_helpdiagrams = object_id(N'dbo.sp_helpdiagrams'), @id_helpdiagramdefinition = object_id(N'dbo.sp_helpdiagramdefinition'), @id_creatediagram = object_id(N'dbo.sp_creatediagram'), @id_renamediagram = object_id(N'dbo.sp_renamediagram'), @id_alterdiagram = object_id(N'dbo.sp_alterdiagram'), @id_dropdiagram = object_id(N'dbo.sp_dropdiagram') if @id_upgraddiagrams is not null select @InstalledObjects = @InstalledObjects + 1 if @id_sysdiagrams is not null select @InstalledObjects = @InstalledObjects + 2 if @id_helpdiagrams is not null select @InstalledObjects = @InstalledObjects + 4 if @id_helpdiagramdefinition is not null select @InstalledObjects = @InstalledObjects + 8 if @id_creatediagram is not null select @InstalledObjects = @InstalledObjects + 16 if @id_renamediagram is not null select @InstalledObjects = @InstalledObjects + 32 if @id_alterdiagram is not null select @InstalledObjects = @InstalledObjects + 64 if @id_dropdiagram is not null select @InstalledObjects = @InstalledObjects + 128 return @InstalledObjects END EXEC sys.sp_addextendedproperty @name=N'microsoft_database_tools_support', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'FUNCTION',@level1name=N'fn_diagramobjects'

#### See also

List of Functions