## ɾ³ýÊý¾Ý¿â
drop database ecport;
## ´´½¨Êý¾Ý¿â
create database ecport;
## ʹÓÃÊý¾Ý¿â
use ecport;
## ¹ú¼Ò±í½á¹¹
create table COUNTRY(
country_id int primary key auto_increment,
name varchar(64)
);
## Ä£Äâ¹ú¼Ò±íÊý¾Ý
INSERT INTO COUNTRY( name ) VALUES ('Öйú');
## Ê¡·Ý±í½á¹¹
create table PROVINCE(
ÔÚ¡¶JDBC Driver For SQL2000/2005/2008
¡·Ò»ÎÄÖУ¬ÑûÔ½éÉÜÁËÈçºÎÏÂÔز¢Ê¹ÓÃjdbcÁ¬½ÓSQL Server,
½ñÌìÓÐÈËÎÊÆð£¬ÈçºÎÒÔwindows¼¯³É·½Ê½Á¬½ÓSQL Server,Õâ¸öÒÔÇ°ÕæûÊÔ¹ý¡£
ÓÚÊÇ£¬´ò¿ªnetBeans²âÊÔÁËһϣ¬´úÂëÈçÏ£º
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package testsqlconn;
import java.sql.*;
import com.microsoft.sqlserver.jdbc.*;
/** *//**
*
* @author: Administrator:downmoon(3w@live.cn)
* @date:2009-9-23 18:42:32
* @Encoding:UTF-8
* @File:TestSqlbyDS/TestSqlbyDS.java
* @Package:testsqlconn
*/
public class TestSqlbyDS {
public TestSqlbyDS(){}
public void GetResutls()
{
// Declare the JDBC objects.
Connection con = null;
CallableStatement cstmt = null;
ResultSet rs = null;
try {
// Establish the connection.
SQLServerDataSource ds = new SQLServerDataSource();
ds.setIntegratedSecurity(true);
ds.setServerName( ......
ÔÚ¡¶JDBC Driver For SQL2000/2005/2008
¡·Ò»ÎÄÖУ¬ÑûÔ½éÉÜÁËÈçºÎÏÂÔز¢Ê¹ÓÃjdbcÁ¬½ÓSQL Server,
½ñÌìÓÐÈËÎÊÆð£¬ÈçºÎÒÔwindows¼¯³É·½Ê½Á¬½ÓSQL Server,Õâ¸öÒÔÇ°ÕæûÊÔ¹ý¡£
ÓÚÊÇ£¬´ò¿ªnetBeans²âÊÔÁËһϣ¬´úÂëÈçÏ£º
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package testsqlconn;
import java.sql.*;
import com.microsoft.sqlserver.jdbc.*;
/** *//**
*
* @author: Administrator:downmoon(3w@live.cn)
* @date:2009-9-23 18:42:32
* @Encoding:UTF-8
* @File:TestSqlbyDS/TestSqlbyDS.java
* @Package:testsqlconn
*/
public class TestSqlbyDS {
public TestSqlbyDS(){}
public void GetResutls()
{
// Declare the JDBC objects.
Connection con = null;
CallableStatement cstmt = null;
ResultSet rs = null;
try {
// Establish the connection.
SQLServerDataSource ds = new SQLServerDataSource();
ds.setIntegratedSecurity(true);
ds.setServerName( ......
USE tempdb
GO
CREATE TABLE AuctionItems
(
itemid INT NOT NULL PRIMARY KEY NONCLUSTERED,
itemtype NVARCHAR(30) NOT NULL,
whenmade INT NOT NULL,
initialprice MONEY NOT NULL,
/* other columns */
)
--ÏîÄ¿ÀàÐÍ¡¢ÏîÄ¿µÄÖÆÔìÈÕÆÚÒÔ¼°ËüµÄ³õʼ¼Û¸ñ¡£Ö»ÓÐÓëËùÓÐÏîÄ¿ÓйصÄÊôÐÔ±»´æ´¢ÔÚAuctionItems
CREATE UNIQUE CLUSTERED INDEX idx_uc_itemtype_itemid
ON AuctionItems(itemtype, itemid)
INSERT INTO AuctionItems VALUES(1, N'Wine', 1822, 3000)
INSERT INTO AuctionItems VALUES(2, N'Wine', 1807, 500)
INSERT INTO AuctionItems VALUES(3, N'Chair', 1753, 800000)
INSERT INTO Aucti ......
µÈ´ýÀàÐÍ ËµÃ÷
ASYNC_DISKPOOL_LOCK
µ±³¢ÊÔͬ²½²¢ÐеÄỊ̈߳¨Ö´Ðд´½¨»ò³õʼ»¯ÎļþµÈÈÎÎñ£©Ê±³öÏÖ¡£
ASYNC_IO_COMPLETION
µ±Ä³ÈÎÎñÕýÔڵȴý I/O Íê³Éʱ³öÏÖ¡£
ASYNC_NETWORK_IO
µ±ÈÎÎñ±»×èÖ¹ÔÚÍøÂçÖ®ºóʱ³öÏÖÔÚÍøÂçдÈëÖС£
BACKUP
µ±ÈÎÎñ×÷Ϊ±¸·Ý´¦ÀíµÄÒ»²¿·Ö±»×èֹʱ³öÏÖ¡£
BACKUP_OPERATOR
µ±ÈÎÎñÕýÔڵȴý´Å´ø×°Èëʱ³öÏÖ¡£ÈôÒª²é¿´´Å´ø״̬£¬Çë²éѯ sys.dm_io_backup_tapes¡£Èç¹û×°Èë²Ù×÷ûÓйÒÆð£¬Ôò¸ÃµÈ´ýÀàÐÍ¿ÉÄÜָʾ´Å´ø»ú·¢ÉúÓ²¼þÎÊÌâ¡£
BACKUPBUFFER
ÔÚ±¸·ÝÈÎÎñµÈ´ýÊý¾Ý»òµÈ´ýÓÃÀ´´æ´¢Êý¾ÝµÄ»º³åÇøʱ·¢Éú¡£´ËÀàÐͲ»³£¼û£¬Ö»Óе±ÈÎÎñµÈ´ý×°Èë´Å´øʱ²Å»á³öÏÖ¡£
BACKUPIO
ÔÚ±¸·ÝÈÎÎñµÈ´ýÊý¾Ý»òµÈ´ýÓÃÀ´´æ´¢Êý¾ÝµÄ»º³åÇøʱ·¢Éú¡£´ËÀàÐͲ»³£¼û£¬Ö»Óе±ÈÎÎñµÈ´ý×°Èë´Å´øʱ²Å»á³öÏÖ¡£
BACKUPTHREAD
µ±Ä³ÈÎÎñÕýÔڵȴý±¸·ÝÈÎÎñÍê³Éʱ³öÏÖ¡£µÈ´ýʱ¼ä¿ÉÄܽϳ¤£¬´Ó¼¸·ÖÖÓµ½¼¸¸öСʱ¡£Èç¹û±»µÈ´ýµÄÈÎÎñÕý´¦ÓÚ I/O ½ø³ÌÖУ¬Ôò¸ÃÀàÐͲ»Ö¸Ê¾·¢ÉúÎÊÌâ¡£
BAD_PAGE_PROCESS
µ±ºǫ́´íÎóÒ³¼Ç¼Æ÷ÕýÔÚ³¢ÊÔ±ÜÃâÿ¸ôÎåÃëÒÔÉϵÄʱ¼äÔËÐÐʱ³öÏÖ¡£& ......
CREATE PROC [dbo].[UP_EC_JOB_UpdateAddressType]
(
@Count INT
)
AS
BEGIN
SET NOCOUNT ON
DECLARE @TransactionNumber INT
DECLARE @Cursor CURSOR
SET @Cursor = CURSOR LOCAL STATIC FORWARD_ONLY READ_ONLY
FOR
SELECT TOP(@Count) TransactionNumber
from dbo.CustomerShippingInfo WITH(NOLOCK)
WHERE AddressType IS NULL
OPEN @Cursor
FETCH NEXT from @Cursor INTO @TransactionNumber
WHILE (@@FETCH_STATUS = 0)
BEGIN
UPDATE dbo.CustomerShippingInfo
SET AddressType = 1
WHERE TransactionNumber = @TransactionNumber
FETCH NEXT from @Cursor INTO @Tran ......