如何向 ola.hallengren 备份脚本添加加密。
简而言之我想实现这个目标
BACKUP DATABASE [MyTestDB]
TO DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Backup\MyTestDB.bak'
WITH
COMPRESSION,
ENCRYPTION
(
ALGORITHM = AES_256,
SERVER CERTIFICATE = MyTestDBBackupEncryptCert
),
STATS = 10
Go
Run Code Online (Sandbox Code Playgroud) 我有一个名为列createdate的datetime数据类型。我想提取今天和昨天之间的数据。
select * from table1(nolock) where createdate ='2018-06-01' --not getting any output
Run Code Online (Sandbox Code Playgroud)
我想要这样的东西:
select * from table1(nolock) where createdate between '2018-06-01' and '2018-06-02'
Run Code Online (Sandbox Code Playgroud)
而不是硬编码日期,我需要之间dateadd(d,-1,getdate()) and getdate(),但getdate()提供当前时间戳。我怎样才能搜索一整天 like2018-06-02而不是2018-06-02 02:12:13.423?