GPS系统,因存储量过大,决定按天动态创建数据数据库,每天23点定时执行作业
-- ============================================= -- Author:<Author,,Name> -- Create date: <Create Date,,> -- Description:<Description,,> -- ============================================= ALTER PROCEDURE [dbo].[proc_created_database_log] AS declare @sqlStr varchar(200) BEGIN set @sqlStr=‘if not exists (select * from master.dbo.sysdatabases where name=‘‘Log‘+convert(varchar(8),getdate()+1,112)+‘‘‘) create database Log‘+convert(varchar(8),getdate()+1,112); exec (@sqlStr); END
exec proc_created_database_log
时间: 2024-10-21 01:31:26