SQL Server元数据的管理与应用

数据库2025-11-05 13:52:0236729
SQL Server元数据的管理与应用
复制 CREATE PROCEDURE [dbo].[pAdd_Application] @ServerName varchar(50),元用 @DatabaseName varchar(100), @ApplicationName varchar(100) AS --Add any new databases created, but not recorded in the repository, to the repository UPDATE dbo.Database_Applications SET ApplicationName = @ApplicationName WHERE ServerName = @ServerName AND DatabaseName = @DatabaseName AND ApplicationName IS NULL --Determine if there is already an application for this database in the repository, if not, then add it IF (SELECT COUNT(*) FROM dbo.Applications WHERE ApplicationName = @ApplicationName) = 0    BEGIN    INSERT INTO dbo.Applications (ApplicationName)    VALUES (@ApplicationName)    PRINT Added new Application: + @ApplicationName + to Applications table    SELECT * FROM dbo.Applications WHERE ApplicationName = @ApplicationName    END    --List the new record in the repository    SELECT ServerName, DatabaseName, ApplicationName    FROM dbo.Database_Applications    WHERE ServerName = @ServerName    AND DatabaseName = @DatabaseName    AND ApplicationName = @ApplicationName1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.22.23.24.25.
本文地址:http://www.bzuk.cn/news/19f6799913.html
版权声明

本文仅代表作者观点,不代表本站立场。
本文系作者授权发表,未经许可,不得转载。

全站热门

葫芦娃手机(科技进步引领儿童通讯新时代)

面试问了分布式锁,你会答吗?

时序数据库的现状及核心技术

用iptables做IP的静态映射

解决电脑1079错误的方法(解决电脑无法启动的问题)

Nagios监控全解-手机短信

企业在什么情况下有引入分布式数据库的必要性?

限制Nagios报警次数技巧(Escalations)

友情链接

滇ICP备2023006006号-33