摘要: 假如某个路径下包含大量的需要修改名称的文件,比如所有文件名中均包含_TEST。当我们需要将这些文件中的_TEST都替换为A时,可以使用Powershell来实现。首先进入到cmd的Powershell中C:\Users\wh42>powershellWindows PowerShellCopyrig... 阅读全文
posted @ 2014-11-15 17:00 Wison-Ho 阅读(377) 评论(0) 推荐(0) 编辑
摘要: 今天开发同事有咨询问题,报错An INSERT EXEC statement cannot be nested.经过在网上查询,最终找到解决方案,具体见:http://www.sommarskog.se/share_data.html#INSERTEXECDemo如下:use demo go alt... 阅读全文
posted @ 2014-09-25 16:52 Wison-Ho 阅读(1949) 评论(0) 推荐(0) 编辑
摘要: Mysql的event schedule可以让你设置你的mysql数据库在某个时间段执行你想要的动作create event test1on schedule every 1 daystarts '2007-09-01 12:00:00'on completion not preservedo in... 阅读全文
posted @ 2014-06-18 19:41 Wison-Ho 阅读(354) 评论(0) 推荐(0) 编辑
摘要: 针对不同的场景,采用不同的步骤。对非master以及resource系统数据库而言,分两种情况。1.非master以及resource系统数据库正常。这里以迁移msdb为例,将msdb从D:\SQL2K8_DATA\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\迁移到D:\SQ... 阅读全文
posted @ 2014-05-17 12:22 Wison-Ho 阅读(1218) 评论(0) 推荐(0) 编辑
摘要: use wisoncreate table a(id int identity(1,1),name varchar(10))insert into a select 'wison'select * into b_a from a此时,b_a表中的id仍然是自增列。此时,我们可以采取另外一个方法,来使... 阅读全文
posted @ 2014-05-08 09:39 Wison-Ho 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 1.Insert Set语句mysql> create table wison_test1(id int,name varchar(10));Query OK, 0 rows affected (0.10 sec)mysql> insert into wison_test1 set id=1,nam... 阅读全文
posted @ 2014-04-30 15:17 Wison-Ho 阅读(206) 评论(0) 推荐(0) 编辑
摘要: Mysql常用命令:--在Mysql中,语句的结尾要么使用;要么使用\g或者\G作为结束符。进入Mysql (---其中Your MySQL connection id is 5表示到当前为止连接到Mysql数据库的次数,Server version: 5.5.37-log Source dist... 阅读全文
posted @ 2014-04-29 15:08 Wison-Ho 阅读(480) 评论(0) 推荐(0) 编辑
摘要: 之前有使用yum安装Mysql,执行过程比较简单。今天尝试使用源码编译的方式来安装Mysql。编译器使用cmake。选择的Mysql版本为:mysql-5.5.37,cmake的版本是cmake-2.8.10.2下载地址是:http://mysql.mirror.kangaroot.net/Down... 阅读全文
posted @ 2014-04-23 17:04 Wison-Ho 阅读(339) 评论(0) 推荐(0) 编辑
摘要: 1. ENABLE OUTBOUND CONNECTIONS ON THE FIRST SERVER.1.1. Create the SQL service master key.On the master database, create the SQL service master key. T... 阅读全文
posted @ 2014-04-19 16:05 Wison-Ho 阅读(439) 评论(0) 推荐(0) 编辑
摘要: 背景:今天检查一个服务器上实例中镜像数据库的状态,发现主库这边所有被镜像的数据库的状态均为:Principal/Disconnected,而从库那边除了镜像数据库DB_A 之外,其他镜像数据库的状态为Mirror/Recovering/Pending.处理方法:第一步:首先检查两边数据库服务器是否可... 阅读全文
posted @ 2014-04-19 16:03 Wison-Ho 阅读(515) 评论(0) 推荐(0) 编辑