![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
SQLServer
文章平均质量分 63
老友记茶舍
一个爱编程,喜欢茶,乐交友的程序员。
展开
-
SQL Server 2005 SQL 注入
--攻与防,矛与盾 --sql server 2005上测试成功的。再加上影子账户及删除日志。那就是很强的后门了。 --enabble xp_cmdshell EXEC sys.sp_configure N'show advanced options', N'1' RECONFIGURE WITH OVERRIDE go EXEC sys.sp_configure N'xp_cmdshell',原创 2016-09-02 11:47:57 · 364 阅读 · 0 评论 -
How to run an&nbs…
If you want to execute an existing Microsoft SQL Server Agent Job in C# you an use the following function: The function uses SQL authentication to connect to the Microsoft SQL Server instance. using S原创 2016-09-02 11:49:09 · 231 阅读 · 0 评论 -
Create SQL Agent …
Introduction This sample code can be used to create SQL Agent job by using SQL Server Management Objects ( SMO ) http://msdn.microsoft.com/en-us/library/ms162169.aspx. You can use this code sample C#原创 2016-09-02 11:49:06 · 328 阅读 · 0 评论 -
ExecutionLog2 View -&n…
There are several options for monitoring performance of a report server. The fourth article in our technical note series on performance and scalability covers information for optimizing entire repo原创 2016-09-02 11:49:01 · 505 阅读 · 0 评论 -
Exporting from SSRS&nb…
Original answer follows: If you can get the URL for the Excel output (some versions of SSRS leave the browser displaying it), you can append some code to the end: &rc:SimplePageHeaders=True This原创 2016-09-02 11:48:59 · 224 阅读 · 0 评论 -
Sql server 删除重复记录的SQL语句
有两个意义上的重复记录,一是完全重复的记录,也即所有字段均重复的记录,二是部分关键字段重复的记录,比如Name字段重复,而其他字段不一定重复或都重复可以忽略。 1、对于第一种重复,比较容易解决,使用 select distinct * from tableName 就可以得到无重复记录的结果集。 如果该表需要删除重复的记录(重复记录保留1条),可以按以下方法删除 select distinct原创 2016-09-02 11:48:56 · 240 阅读 · 0 评论 -
SQL Server 2008备份实战
一、直接备份到磁盘文件 --完整备份数据库到磁盘文件 backup database DemoDB2008 --备份数据库 to disk='c:\sql2008trainning\BackupDB\DemoDB2008.bak' with name='DemoDB2008 完整备份', description='DemoDB2008 backup' --差异备份数据库到磁盘文件 backup原创 2016-09-02 11:48:41 · 203 阅读 · 0 评论 -
SQL SERVER 2008 复制注意事项
前两天部署了SQL SERVER 2008的复制环境,简单的心得如下: 1. 尽量按照推荐账户进行,模拟账户是很难成功,除非发布和订阅在相同机器上。 2. 使用域账户和共享文件夹 3. 使用sa账户或其他sql server账户(sysman角色下)。 暂时使用的结果:内网,机器和应用都清闲,确保能在秒级。原创 2016-09-02 11:48:33 · 204 阅读 · 0 评论 -
SQLSERVER2008 表数据量统计
-- sp_msforeachtable 'exec sp_spaceused ''?''' exec sp_msforeachtable @precommand=N' create table ##( 表名 sysname, 记录数 int, 保留空间 Nvarchar(10), 使用空间 varchar(10), 索引使用空间 varchar(10), 未用空间 varchar(10)) ',原创 2016-09-02 11:48:30 · 434 阅读 · 0 评论 -
Sqlserver2008 R2 机器改名
今天在做SQL SERVER 2008 复制的发布时,发现所用的服务器被改名过,发布时总是找回原来的名称。 1.对于安装好Sqlserver 2008 R2 的机器首先要启动混合方式登录,允许Sa账户登录 R2 机器改名" TITLE="Sqlserver2008 R2 机器改名" /> R2 机器改名" TITLE="Sqlserver2008 R2 机器改名" /> 2.重启机器更名原创 2016-09-02 11:48:26 · 295 阅读 · 0 评论 -
SQL Server 2008中清除日志
--操作于2013-01-25 10:08 --在SQL2008中清除日志就必须在简单模式下进行,等清除动作完毕再调回到完全模式。 USE [master] GO ALTER DATABASE SamrtEnterprise SET RECOVERY SIMPLE WITH NO_WAIT GO ALTER DATABASE SamrtEnterprise SET原创 2016-09-02 11:48:05 · 229 阅读 · 0 评论 -
SQL SERVER DMO 简介
一、SQL SERVER DMO 简介 简介: 从SQLServer2005开始,微软引入了一个名叫DMO(动态管理对象)的新特性,DMO可以分为DMFs(Dynamic Manage Functions,动态管理函数)和DMVs(Dynamic Manage Views,动态管理视图)两部分。这些函数和视图用于查找SQLServer实例内部统计信息以供性能监控所用。它们提供实时原创 2016-09-02 11:49:19 · 815 阅读 · 0 评论