标签:
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
标签:
原文地址:http://www.cnblogs.com/cglandy/p/5878025.html