SERVER Í£Ö¹,ÎÞ·¨Æô¶¯,¹ýÆÚÁË (ÆÀ¹À°æ2000)(2008-04-25 22:31:17)±êÇ©£ºsql server ÎÞ·¨Æô¶¯ ¹ýÆÚ ½â¾ö·½·¨ it
µ± SQL Server 2000 ÆÀ¹À°æµÄ 120 ÌìÆÀ¹ÀÆÚ¹ýÆÚºó£¬SQL Server ½«ÎÞ·¨Æô¶¯¡£
ÔÚ Windows ʼþ²é¿´Æ÷Ó¦ÓóÌÐòÈÕÖ¾ÖУ¬Äú¿ÉÄܻῴµ½ÏÂÃæµÄ´íÎó£º
SQL Server evaluation period has expired.
½â¾ö·½·¨£º(ÎÒµÄÊÇWindows2003)
תµ½: C:\Documents and Settings\All Users\¡¸¿ªÊ¼¡¹²Ëµ¥\³ÌÐò\Æô¶¯
¾ÍÊÇ ¿ªÊ¼²Ëµ¥µÄÆô¶¯ÏîÄÇÀï, ´´½¨Ò»¸öÎļþ: Æô¶¯SQLSERVER.Bat
ÓÒ¼ü.batÎļþ--> ±à¼ -->ÊäÈë:
date/t>temp.txt
date 2008-03-15
net start mssqlserver
@for /f "tokens=1" %%c in (temp.txt) do date %%c
±£´æ¡£
ÕâÑùÏ´ÎÖØÆð¼ÆËã»úʱ£¬Ëü»áÏÈÐÞ¸ÄϵͳÖÁ 2008-03-15 £¨Õâ¸öʱ¼ä×Ô¼º¶¨£¬µ«ÒªÔÚÄã×°Sql server2000 µÄ 120 ÌìÖ®ÄÚ.£©
È»ºó»á×Ô¶¯ÖØÆð Sql server Õâ¸ö·þÎñ¡£ µ±Æô¶¯³É¹¦ºó£¬ÏµÍ³»á×Ô¶¯¸Ä»Øµ½ÏµÍ³ÕýÈ·µÄʱ¼ä.
(×¢Ò⣺Èç¹ûÄãÓÐ×°×èÖ¹ÐÞ¸Äϵͳʱ¼äµÄÈí¼þ AutoRun (autoרɱ) µÄ»°£¬¿ÉÄÜ»áʧ°Ü.)
......
ÔÚʹÓÃÊý¾Ý¿âµÄ¹ý³ÌÖУ¬¾³£»áÓöµ½Êý¾Ý¿âǨÒÆ»òÕßÊý¾ÝǨÒƵÄÎÊÌ⣬»òÕßÓÐͻȻµÄÊý¾Ý¿âË𻵣¬ÕâʱÐèÒª´ÓÊý¾Ý¿âµÄ±¸·ÝÖÐÖ±½Ó»Ö¸´¡£µ«ÊÇ£¬´Ëʱ»á³öÏÖÎÊÌ⣬ÕâÀï˵Ã÷¼¸ÖÖ³£¼ûÎÊÌâµÄ½â¾ö·½·¨¡£
¹ÂÁ¢Óû§µÄÎÊÌâ
±ÈÈ磬ÒÔÇ°µÄÊý¾Ý¿âµÄºÜ¶à±íÊÇÓû§test½¨Á¢µÄ£¬µ«Êǵ±ÎÒÃǻָ´Êý¾Ý¿âºó£¬testÓû§´Ëʱ¾Í³ÉÁ˹ÂÁ¢Óû§£¬Ã»ÓÐÓëÖ®¶ÔÓ¦µÄµÇ½Óû§Ãû£¬ÄÄÅÂÄ㽨Á¢ÁËÒ»¸ötestµÇ¼Óû§Ãû£¬¶øÇÒÊÇÒÔÇ°µÄÓû§ÃÜÂ룬ÓøÃÓû§µÇ¼ºóͬÑùû°ì·¨²Ù×÷ÒÔÇ°ÊôÓÚtestµÄÓû§±í¡£
Õâ¸öÎÊÌâÓÐÁ½ÖÖ°ì·¨½â¾ö¡£
ÏÈ˵½â¾öµÄÇ°ÌáÌõ¼þ¡£
Ê×ÏÈ£¬ÒªÓñ¸·ÝÎļþ»¹ÔÊý¾Ý¿â£¬ÎÒÃÇÕâÀïµÄÊý¾Ý¿âÃûΪtestdb£¬ÀïÃæÓÐÊôÓÚÓû§testµÄÓû§±í¡£Õâ¸öºÜÈÝÒ×Á˲Ù×÷ÁË£¬²»¶à½²ÁË£¬ÔÚÆóÒµ¹ÜÀíÆ÷Öкܷ½±ã¿ÉÒÔ»Ö¸´¡£»Ö¸´ºó£¬¾Í²úÉúÁ˹ÂÁ¢Óû§test¡£
[separator]
È»ºó£¬ÓÃsaÓû§»òÕß¾ßÓÐDBAȨÏÞµÄÓû§µÇ¼£¬´´½¨Ò»¸ötestÊý¾Ý¿âµÇ¼Óû§£¬ÃÜÂëËæ±ãÉèÖÃÁË£¬Ò²¿ÉÒÔºÍÒÔÇ°µÄ±£³ÖÒ»Ö¡£ÎÒà ......
ÔÚ SQLServer2005 ÖÐ¶Ô XML µÄ´¦Àí¹¦ÄÜÏÔÈ»ÔöÇ¿Á˺ܶ࣬ÌṩÁË query(),value(),exist(),modify(),nodes() µÈº¯Êý¡£
¹ØÓÚ xml £¬ÄÑÒÔÀí½âµÄ²»ÊÇ SQLServer ÌṩµÄº¯Êý£¬¶øÊÇ¶Ô xml ±¾ÉíµÄÀí½â£¬¿´Ëƺܼòµ¥µÄÎļþ¸ñʽ£¬´¦ÀíÆðÀ´È´ÊǷdz£À§Äѵġ£±¾ÎÄÖ»Êdzõ̽һ϶øÒÑ¡£
Ïê¼û SQLServer Áª»ú°ïÖú£º
Ö÷Ìâ
˵Ã÷
query() ·½·¨£¨ xml Êý¾ÝÀàÐÍ£©
´Ë·½·¨ÓÃÓÚ¶Ô XML ʵÀý½øÐвéѯ¡£
value() ·½·¨£¨ xml Êý¾ÝÀàÐÍ£©
´Ë·½·¨ÓÃÓÚ´Ó XML ʵÀý¼ìË÷ SQL ÀàÐ͵ÄÖµ¡£
exist() ·½·¨£¨ xml Êý¾ÝÀàÐÍ£©
´Ë·½·¨ÓÃÓÚÈ·¶¨²éѯÊÇ·ñ·µ»Ø·Ç¿Õ½á¹û¡£
modify() ·½·¨£¨ xml Êý¾ÝÀàÐÍ£©
´Ë·½·¨ÓÃÓÚÖ¸¶¨ XML DML Óï¾äÒÔÖ´ÐиüС£
nodes() ·½·¨£¨ xml Êý¾ÝÀàÐÍ£©
´Ë·½·¨ÓÃÓÚ½« XML ²ð·Ö³É¶àÐÐÒÔ½« XML ÎĵµµÄ×é³É²¿·Ö´«²¥µ½Ðм¯ÖС£
CREATE TABLE VisioXML
(
ID INT,
Doc XML
);
GO
INSERT INTO VisioXML(ID,Doc)
SELECT 4,* from OPENROWSET(BULK ......
ÔÚ SQLServer2005 ÖÐ¶Ô XML µÄ´¦Àí¹¦ÄÜÏÔÈ»ÔöÇ¿Á˺ܶ࣬ÌṩÁË query(),value(),exist(),modify(),nodes() µÈº¯Êý¡£
¹ØÓÚ xml £¬ÄÑÒÔÀí½âµÄ²»ÊÇ SQLServer ÌṩµÄº¯Êý£¬¶øÊÇ¶Ô xml ±¾ÉíµÄÀí½â£¬¿´Ëƺܼòµ¥µÄÎļþ¸ñʽ£¬´¦ÀíÆðÀ´È´ÊǷdz£À§Äѵġ£±¾ÎÄÖ»Êdzõ̽һ϶øÒÑ¡£
Ïê¼û SQLServer Áª»ú°ïÖú£º
Ö÷Ìâ
˵Ã÷
query() ·½·¨£¨ xml Êý¾ÝÀàÐÍ£©
´Ë·½·¨ÓÃÓÚ¶Ô XML ʵÀý½øÐвéѯ¡£
value() ·½·¨£¨ xml Êý¾ÝÀàÐÍ£©
´Ë·½·¨ÓÃÓÚ´Ó XML ʵÀý¼ìË÷ SQL ÀàÐ͵ÄÖµ¡£
exist() ·½·¨£¨ xml Êý¾ÝÀàÐÍ£©
´Ë·½·¨ÓÃÓÚÈ·¶¨²éѯÊÇ·ñ·µ»Ø·Ç¿Õ½á¹û¡£
modify() ·½·¨£¨ xml Êý¾ÝÀàÐÍ£©
´Ë·½·¨ÓÃÓÚÖ¸¶¨ XML DML Óï¾äÒÔÖ´ÐиüС£
nodes() ·½·¨£¨ xml Êý¾ÝÀàÐÍ£©
´Ë·½·¨ÓÃÓÚ½« XML ²ð·Ö³É¶àÐÐÒÔ½« XML ÎĵµµÄ×é³É²¿·Ö´«²¥µ½Ðм¯ÖС£
CREATE TABLE VisioXML
(
ID INT,
Doc XML
);
GO
INSERT INTO VisioXML(ID,Doc)
SELECT 4,* from OPENROWSET(BULK ......
ͨÅä·û ˵Ã÷
_ ÓëÈÎÒâµ¥×Ö·ûÆ¥Åä
% Óë°üº¬Ò»¸ö»ò¶à¸ö×Ö·ûµÄ×Ö·û´®Æ¥Åä
[ ] ÓëÌض¨·¶Î§£¨ÀýÈ磬[a-f]£©»òÌض¨¼¯£¨ÀýÈ磬[abcdef]£©ÖеÄÈÎÒâµ¥×Ö·ûÆ¥Åä¡£
[^] ÓëÌض¨·¶Î§£¨ÀýÈ磬[^a-f]£©»òÌض¨¼¯£¨ÀýÈ磬[^abcdef]£©Ö®ÍâµÄÈÎÒâµ¥×Ö·ûÆ¥Åä¡£
Àý×Ó:
• WHERE FirstName LIKE '_im' ¿ÉÒÔÕÒµ½ËùÓÐÈý¸ö×ÖĸµÄ¡¢ÒÔ im ½áβµÄÃû×Ö£¨ÀýÈ磬Jim¡¢Tim£©¡£
• WHERE LastName LIKE '%stein' ¿ÉÒÔÕÒµ½ÐÕÒÔ stein ½áβµÄËùÓÐÔ±¹¤¡£
• WHERE LastName LIKE '%stein%' ¿ÉÒÔÕÒµ½ÐÕÖÐÈÎÒâλÖðüÀ¨ stein µÄËùÓÐÔ±¹¤¡£
• WHERE FirstName LIKE '[JT]im' ¿ÉÒÔÕÒµ½Èý¸ö×ÖĸµÄ¡¢ÒÔ im ½áβ²¢ÒÔ J »ò T ¿ªÊ¼µÄÃû×Ö£¨¼´½öÓÐ Jim ºÍ Tim£©
• WHERE LastName LIKE 'm[^c]%' ¿ÉÒÔÕÒµ½ÒÔ m ¿ªÊ¼µÄ¡¢ºóÃæµÄ£¨µÚ¶þ¸ö£©×Öĸ²»Îª c µÄËùÓÐÐÕ¡£ ......
ͨÅä·û ˵Ã÷
_ ÓëÈÎÒâµ¥×Ö·ûÆ¥Åä
% Óë°üº¬Ò»¸ö»ò¶à¸ö×Ö·ûµÄ×Ö·û´®Æ¥Åä
[ ] ÓëÌض¨·¶Î§£¨ÀýÈ磬[a-f]£©»òÌض¨¼¯£¨ÀýÈ磬[abcdef]£©ÖеÄÈÎÒâµ¥×Ö·ûÆ¥Åä¡£
[^] ÓëÌض¨·¶Î§£¨ÀýÈ磬[^a-f]£©»òÌض¨¼¯£¨ÀýÈ磬[^abcdef]£©Ö®ÍâµÄÈÎÒâµ¥×Ö·ûÆ¥Åä¡£
Àý×Ó:
• WHERE FirstName LIKE '_im' ¿ÉÒÔÕÒµ½ËùÓÐÈý¸ö×ÖĸµÄ¡¢ÒÔ im ½áβµÄÃû×Ö£¨ÀýÈ磬Jim¡¢Tim£©¡£
• WHERE LastName LIKE '%stein' ¿ÉÒÔÕÒµ½ÐÕÒÔ stein ½áβµÄËùÓÐÔ±¹¤¡£
• WHERE LastName LIKE '%stein%' ¿ÉÒÔÕÒµ½ÐÕÖÐÈÎÒâλÖðüÀ¨ stein µÄËùÓÐÔ±¹¤¡£
• WHERE FirstName LIKE '[JT]im' ¿ÉÒÔÕÒµ½Èý¸ö×ÖĸµÄ¡¢ÒÔ im ½áβ²¢ÒÔ J »ò T ¿ªÊ¼µÄÃû×Ö£¨¼´½öÓÐ Jim ºÍ Tim£©
• WHERE LastName LIKE 'm[^c]%' ¿ÉÒÔÕÒµ½ÒÔ m ¿ªÊ¼µÄ¡¢ºóÃæµÄ£¨µÚ¶þ¸ö£©×Öĸ²»Îª c µÄËùÓÐÐÕ¡£ ......
JAVA Á¬½Ó SQLServer 2000 ËùÐèÒªµÄÈý¸öJAR°ü¡£
http://download.csdn.net/source/2283940
----------------
Code:
------------------------
Connection conn = null;
Statement sta = null;
try {
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
if (conn == null || conn.isClosed()) {
conn = DriverManager.getConnection(
"jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=pubs","sa", "");
}
sta = conn.createStatement();
ResultSet rs = sta.executeQuery("select * from jobs ");
while (rs.next()) {
System.out.print(rs.getInt(1) + "\t");
System.out.print(rs.getString(2) + "\t");
System.out.print(rs.getString(3) + "\t");
System.out.println(rs.getString(4));
&nbs ......
JAVA Á¬½Ó SQLServer 2000 ËùÐèÒªµÄÈý¸öJAR°ü¡£
http://download.csdn.net/source/2283940
----------------
Code:
------------------------
Connection conn = null;
Statement sta = null;
try {
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
if (conn == null || conn.isClosed()) {
conn = DriverManager.getConnection(
"jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=pubs","sa", "");
}
sta = conn.createStatement();
ResultSet rs = sta.executeQuery("select * from jobs ");
while (rs.next()) {
System.out.print(rs.getInt(1) + "\t");
System.out.print(rs.getString(2) + "\t");
System.out.print(rs.getString(3) + "\t");
System.out.println(rs.getString(4));
&nbs ......
½ñÌìÔÚ¸ø¹«Ë¾×öÍøվʱ£¬Ö÷¹Ü¸øÁËÒ»¸öеÄÐèÇó¸øÎÒ£¬ÓÉÓÚ¹«Ë¾µÄµç»°±íÊý¾Ý±È½Ï¶à£¬ÐèÒªµ¼Èëµ½Êý¾Ý¿â±íÖУ¬ËùÒÔÌØÒâµÄ´ÓÍøÉϲéÔÄÁËһЩ×ÊÁÏ£¬¼òÒ×µÄдÁ˸ö´ÖÂÔµÄÀ࣬»ù±¾ÔÀíÊÇ£º°ÑExcel×öΪÊý¾ÝÔ´£¬ÐγÉdatable¶ÔÏó£¬ È»ºóÔÚÊý¾Ý¿â½¨Á¢Ò»ÕűíÒ»ÁÐÒ»ÁеĽ«Êý¾ÝÌí¼Óµ½Ð±íÖУ¬ÊµÏÖµÄÀࣺ
using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.OleDb;
using System.Data.SqlClient;
using PublicClass;
/// <summary>
/// ½«ExcelÊý¾ÝÌí¼Óµ½Êý¾Ý¿âµÄ±í
/// </summary>
public class ExceltoSqlserver
{
public ExceltoSqlserver()
{
//
//TODO: ÔÚ´Ë´¦Ìí¼Ó¹¹Ô캯ÊýÂß¼
//
}
OleDbConnection myoledb;
OleDbCommand oledbcmd;
SqlConnection sqlcn;
SqlCommand sqlcmd=new SqlCommand();
MySQL mysql=new MySQL();
/// & ......