小编Lea*_*SQL的帖子

如何配置 Ola Hallengren 备份脚本进行加密

如何向 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)

backup ola-hallengren

3
推荐指数
1
解决办法
2545
查看次数

如何提取昨天和今天之间的数据?

我有一个名为列createdatedatetime数据类型。我想提取今天和昨天之间的数据。

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

sql-server select datetime

-1
推荐指数
1
解决办法
5万
查看次数

标签 统计

backup ×1

datetime ×1

ola-hallengren ×1

select ×1

sql-server ×1