Comparing SQL Server configurations via the command-line
OmniCompare 0.9.0 was the first release to ship with the CLI module. This is a separate application, allowing comparisons to be called from 3rd party applications, such as SQL Server Agent jobs,...
View ArticleValidate a SQL Server Backup can be Restored
Problem We need to programmatically validate our SQL Server database backups are not corrupted and that the backup can be successfully restored . We have limited storage and time so we are unable to...
View ArticleStudying Failures
Tim Mitchell Tim Mitchell is a business intelligence consultant, author, trainer, and SQL Server MVP with over a decade of data management experience. He is a partner with Linchpin People and is the...
View ArticleSQL SERVER How to Find Out When Your SQL Login Will Expire?
If you are a SQLDBA, you must have created a login and you must have known about enforcing password policy to SQL Logins.Once of my client asked to provide script to find expiry details about SQL...
View ArticleSQL Server 2016 and Transaction Log Backup
Backing up SQL Server transaction logs may not end up on the cover of Newsweek. But protecting transaction logs has a big impact on database recoverability, and on your ability to recover within...
View ArticleFind Blocking Processes Using SQL Server Profiler
By:Ben Snaidero || Related Tips:More >Locking and Blocking Problem A lot of the performance issues in SQL Server often relate to slow running queries. In my last tip I showed you a method for...
View ArticleSQL Server Replication Error - Cannot generate SSPI context
By:Douglas Correa || Related Tips:More >Replication Problem After setting up SQL Server Transactional Replication via scripts, replication didn't work and showed the following error: "Target...
View ArticleLOB and Row-Overflow Storage in In-Memory OLTP in SQL Server 2016
I think many of us felt quite excited and the same time disappointed with In-Memory OLTP in SQL Server 2014. It was the great and promising technology but it had way too many limitations. The biggest...
View ArticleMicrosoft SQL Server 2016 It Just Runs Faster: Always On Availability Groups ...
When we released Always On Availability Groups in SQL Server 2012 as a new and powerful way to achieve high availability, hardware environments included NUMA machines with low-end multi-core processors...
View ArticleCannot bulk load because the file could not be opened. Operating system error...
[Total: 1 Average: 5/5] In this blog post, we are going to discuss how to solve the following error “ Cannot bulk load because the file could not be opened. Operating system error code 5 (Access is...
View ArticleWhat are Exactly Orphaned Users in SQL Server?
An orphaned user in SQL Server, is a user that exists in a database (Database -Security - Users) but for any reason, does not have a corresponding login in the instance's security (master database)....
View ArticleSQL SERVER 9003错误解决方法
SQLSERVER 9003错误解决方法 只适用于SQL2000(只适用于SQL2000)"无法打开新数据库 'POS'。CREATE DATABASE 中止。 (Microsoft SQL Server,错误: 9003)"看是9003错误,就想到可能是由于日志文件的原因,再看数据库文件可能损坏,于是想到dbcc...
View ArticleSqlServer 英文单词全字匹配详解及实现代码
SqlServer英文单词全字匹配环境:Vs2013+Sql Server2012问题:现在数据库记录如下: Sentence列保存的是英文的句子,我现在想找出所有包含“I”(单词)的句子,如果我用 Sentence like...
View Articlesql server 编译与重编译详解
SQLSERVER编译与重编译编译的含义当SQLSERVER收到任何一个指令,包括查询(query)、批处理(batch)、存储过程、触发器(trigger)、预编译指令(prepared statement)和动态SQL语句(dynamic SQL Statement)要完成语法解释、语句解释,然后再进行“编译(compile)”,生成能够运行的“执行计划(execution...
View ArticleSQL SERVER 2000 9003错误的解决方法(只适用于SQL2000)
关于SQLSERVER 9003错误解决方法 只适用于SQL2000:"无法打开新数据库 'POS'。CREATE DATABASE 中止。 (Microsoft SQL Server,错误: 9003)"看是9003错误,就想到可能是由于日志文件的原因,再看数据库文件可能损坏,于是想到dbcc checkdb指令.方法如下:1.我们使用默认方式建立一个供恢复使用的数据库(如pos)。可以在SQL...
View ArticleSql Server如何查看被锁的表及解锁的方法
查看被锁表:select spIdfrom master..SysProcesseswhere db_Name(dbID) = '数据库名称'and spId <> @@SpIdand dbID <> 0解除锁:exec ('Kill '+cast(@spid as varchar))查看被锁表:select request_session_id...
View ArticleSQL2000安装后,SQL Server组无项目解决方法
昨天装了个SQL2000,打开企业管理器,发现SQL Server组下面没有任何的内容,提示“无项目”。之前sa设置的都是空密码就没碰到这个现象,这次sa用户设置了密码就出现这个情况!解决方法打开企业管理器,如下图,在“SQL Server组”上右击,选“新建SQL...
View ArticleSQL Server通过重建方式还原master数据库
SQL Server通过重建方式还原master数据库,具体内容如下1、备份master数据库2、停止服务,直接删除master数据文件3、用安装程序重建master数据文件控制台下进入安装目录就不说了D:\SetUp\sqlserver2012>Setup /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=sqlserver2012...
View ArticleSQL查询数据库中符合条件的记录的总数
1. select count(*) from table; //统计元组个数2. select count(列名) from table; //统计一列中值的个数3. select count(*) from table where 字段 = ""; //符合该条件的记录总数4. sql_count = "select count(*) from article a where 1=1...
View Article