MSSQL
Kelvin-Liang
Nothing is impossible
展开
-
可以以单个mdf文件直接注册数据库
在Query Analyzer中执行如下的语句: exec sp_detach_db yourDBName,true --卸除这个DB在MSSQL中的注册信息 到日志的物理文件所在的目录中去删除该日志文件或者将该日志文件移出该目录 在Query Analyzer中执行如下的语句: exec sp_attach_single_file_db yourDBName,'d:\ms转载 2014-04-02 15:35:44 · 845 阅读 · 0 评论 -
Investigation report of MSSQL data read and write performance
MSSQL 2008CPU Xeon E5 2G (12 CORE ) X 2RAM 128Gcase 1:while @i<1,000,000beginInsert into T1(column1,column2,column3,...column34) values(@i,getdate(),rand()*getdate,......)endT原创 2014-03-30 01:06:21 · 6813 阅读 · 0 评论 -
直接使用DBCC SHRINKFILE,BACKUP LOG WITH NO_LOG 和 WITH TRUNCATE_ONLY 选项已废止
注意 BACKUP LOG WITH NO_LOG 和 WITH TRUNCATE_ONLY 选项已废止。使用完整恢复模式或大容量日志恢复模式时,如果必须删除数据库中的日志备份链,请切换至简单恢复模式。有关详细信息,请参阅有关从完整恢复模式或大容量日志恢复模式切换的注意事项。 有关常规日志截断的详细信息,请参阅事务日志截断。http://msdn.microsoft.co转载 2014-03-29 23:31:52 · 6519 阅读 · 0 评论 -
Could not load file or assembly ‘Microsoft.VisualStudio.Tools.Applications.Core’
I was migrating SSIS packages from a SQL Server 2008 R2 server to a new SQL Server 2012.When I loaded a package in the SQL Server Data Tools, I got the following error:I was only getti转载 2014-11-12 10:28:18 · 2548 阅读 · 0 评论 -
Notes about process and thread
从逻辑角度来看,多线程的意义在于一个应用程序中,有多个执行部分可以同时执行。但操作系统并没有将多个线程看做多个独立的应用,来实现进程的调度和管理以及资源分配。这就是进程和线程的重要区别。多线程是为了同步完成多项任务,不是为了提高运行效率,而是为了提高资源使用效率来提高系统的效率。线程是在同一时间需要完成多项任务的时候实现的。转载 2014-04-04 00:56:10 · 1044 阅读 · 0 评论 -
Investigation on performance of data load
reference conceptSoft-NUMA - software non-uniform memory accessConsider the following example. A computer with eight CPUs does not have hardware NUMA. Three soft-NUMA nodes are configure原创 2014-03-31 18:19:37 · 1064 阅读 · 0 评论 -
Study note about bulk import and export data in MSSQL
An XML native Format fileThis format file was created by using the following bcp command.cmd>bcp myTeam format nul -f myTeam.Xml -x -n -T -d AdventureWorksTips: You can use -T option instead of原创 2014-03-29 19:23:25 · 1036 阅读 · 0 评论