`
xxd
  • 浏览: 21763 次
  • 性别: Icon_minigender_1
  • 来自: 北京
最近访客 更多访客>>
文章分类
社区版块
存档分类
最新评论
文章列表
把从Oracle数据库导出的数据导入到MySql数据库中1. 使用默认的结束符号导入到MySql数据库中: LOAD DATA LOCAL INFILE 'd:\oracle.txt' IGNORE INTO TABLE alarmLog 此时Fields的结束符默认的就是'\t'制表符,而不是"\t"字符串.2. 当设定Fields结束符导入到MySql数据库中: LOAD DATA LOCAL INFILE 'd:\oraclea.txt' IGNORE INTO TABLE alarmLog FIELDS TERMINATED BY '~' 以上两种情况使用的数据 ...
1. Log tableIF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[HotelOrder_OrderStatus_Log]') AND type in (N'U')) BEGIN CREATE TABLE [dbo].[HotelOrder_OrderStatus_Log]( [OrderStatusLogID] [int] IDENTITY(1,1) NOT NULL, [AppName] [nvarchar](50) NOT NULL, ...
/* --1---Create table---- */create table Sync_Table([id] [int] IDENTITY(1,1) NOT FOR REPLICATION NOT NULL,[Table_Name] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,CONSTRAINT [PK_Sync_Table] PRIMARY KEY CLUSTERED( [id] ASC)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]) ON [PRIMARY] /* --2---Insert data ...
MySQL Performance BlogPar example, on vais creater une table pour noter le traffic de l'Internet, il y a une table avec le traffic et le numero de package de le port et l'IP de address.la table comme:Create Table: CREATE TABLE `ipstat` ( `ip` int(10) unsigned NOT NULL, `hits` int(10) unsigned NOT N ...
--方法1查询表改为动态select * from sysobjects exec('select ID,Name from sysobjects') exec sp_executesql N'select ID,Name from sysobjects'--多了一个N为unicode --方法2:字段名,表名,数据库名之类作为变量时,用动态SQL declare @FName varchar(20) set @FName='ID' exec('select '+@FName+' from sysobjects where '+@FName+'=5' ) declare @s varchar( ...
DECLARE @rows_per_page AS INTEGERDECLARE @current_page AS INTEGERDECLARE @total_pages AS INTEGERDECLARE @start_item AS INTEGERDECLARE @items_count AS INTEGER-- 设置每页的行数SET @rows_per_page = 10-- 设置要显示的页号(从1开始)SET @current_page = 3SELECT @total_pages = COUNT(*) / @rows_per_page + 1,@items_count= COUNT(* ...
use profiler to capture a server status for 24 hrs, the result stored into table Conn_AdminIII_2009_02_100. create indexCreate index idx_starttime on Conn_AdminIII_2009_02_10(starttime) 1.SQL query:select * from Conn_AdminIII_2009_02_10 where starttime between '2009-02-20 00:00:05.680' and '2009-02-2 ...
This script is actually another slow log detector, but it will also send mail instead of writing logs only. 1. monitor MySQL, if the connection >= 30 then call the sendmail function---------------------------------------------------------$ more master_mysql_monitor.sh #!/bin/shflag=30 //more than ...
c:\ mstsc /v:Server IP /admin // on local c:\ tsadmin.exe // on target server, to kill some session, then reconnect by Remote Desktop You have to cp tsadmin.exe from windows 2003's system32 to XPRef:http://thebackroomtech.com/2008/04/09/howto-remotely-disconnect-a-terminal-services-session/
This StoredProcedure is using master.sys.xp_dirtree and master.sys.xp_create_subdir USE Master;GOSET NOCOUNT ON-- 1 - Variable declaration
select job_name, run_datetime,SUBSTRING(run_duration, 1, 2) + ':'
**Index is slowing down the selecting actions ** Description the problem: Table size 30G, Ram size 16G mysql> select * from program_access_log where program_id between 1 and 4000; very slow Try to select the top 500,000 records: mysql> select * from program_access_log where id between 1 and ...
Example 1: SELECT * INTO #
CREATE TABLE [DatabaseLog] (ID INT PRIMARY KEY IDENTITY(1,1),Command NVARCHAR(1000),PostTime NVARCHAR(24),[Event] NVARCHAR(100),[Schema] NVARCHAR(100),LoginName NVARCHAR(100),XmlEvent xml,[object] NVARCHAR(100),[login] NVARCHAR(100),hostname NVARCHAR(100),spid NVARCHAR(24))CREATE TRIGGER [ddlDatabase ...
1. Delete all tables DECLARE @tablename varchar(50)DECLARE @truncatesql varchar(255)DECLARE TrCun_Cursor CURSOR FORselect [name] from sysobjects where type = 'U'-- or select [name] from sysobjects where type = 'U' and name 'table_you_do_NOT_want_to_delete' OPEN TrCun_CursorFETCH TrCun_Cursor INTO @ ...
Global site tag (gtag.js) - Google Analytics