设为首页 - 加入收藏  
您的当前位置:首页 >数据库 >SQL Server元数据的管理与应用 正文

SQL Server元数据的管理与应用

来源:亿华互联编辑:数据库时间:2025-11-05 12:22:39
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.

相关文章:

相关推荐:

最新文章

6.1133s , 17453.125 kb

Copyright © 2025 Powered by SQL Server元数据的管理与应用,亿华互联  滇ICP备2023000592号-16

sitemap

Top