asp/asp.netÁ¬½Ósql anywhereÊý¾Ý¿â
<%
set conn= server.createobject("ADODB.connection")
conn.open "driver={sybase driver 10};"
"srvr=SYBASE;"
"UID=sa;"
"pwd=sybase;"
sql="select no from tab_stud"
set rs=conn.Execute("sql")
response.write rs
%>
string connStr = "Provider=SAOLEDB.10;uid=dba;pwd=sql;Links=TcpIp(host=192.168.1.2;serverport=2638);eng=mysadb";
OleDbConnection oleConn = new OleDbConnection(connStr);
OleDbCommand oleComm = new OleDbCommand("select count(*) from t_test");
oleComm.Connection = oleConn;
oleConn.Open();
Response.Write(oleComm.ExecuteScalar());
oleConn.Close();
ÆäÖÐÒªµã£¨¾¶à·½³¢ÊԵóö£©£º°ÑSql anywhereĿ¼win32ÏÂdboledb10.dll£¨°æ±¾Îª10.0.1£©¡¢dboledba10.dll£¨°æ±¾Îª10.0.1£©×¢²áregsvr32 ....
Èç¹ûc:\windows\system32ÏÂûÓÐÕâÁ½¸öÎļþÔò½«Æ临ÖƹýÈ¥¡£²âÊÔ10.0.0°æasp.net²»¿ÉÓÃ×ÜÌáʾSAOLEDBδע²á,winform¿ÉÒÔ£¬±ØÐëΪ10.0.1
Ïà¹ØÎĵµ£º
Ôړн¨”²Ëµ¥ÖУ¬ÓÐProgram window£¬Test window£¬SQL windowºÍCommand windowµÈ¡£
SQL windowºÍCommand windowÓÐʲôÇø±ð£¿£¿
Command windowʵÏÖÁËSQL*PlusµÄËùÓй¦ÄÜ£¬ÔÊÐíÔËÐÐsql*plusÃüÁsqlÃüÁsql½Å±¾¡£
SQL windowÓÃÓÚÖ´ÐÐsqlÓï¾ä£¬ÏÔʾsqlÊä³ö£¬Ö´ÐÐͳ¼ÆÐÅÏ¢¡££¨²âÊÔsqlÓï¾ä£¬²é¿´±íÖеÄÊý¾Ý£¬ ......
¹«¸æ£º±¾²©¿ÍΪ΢ÈíÔƼÆËãÖÐÎIJ©¿ÍµÄ¾µÏñ²©¿Í£¬²¢²»±£Ö¤Á´½Ó¿ÉÓÃÐÔ£¬ÎªÁ˱£Ö¤ÔĶÁÌåÑ飬Çë·ÃÎÊhttp://blogs.msdn.com/azchina¡£
SQL Azure vs. SQL Server
¸ÅÒª
SQL Azure Database ÊÇÒ»¸öÀ´×Ô΢ÈíµÄ£¬»ùÓÚÔƵĹØϵÐÍÊý¾Ý¿â·þÎñ¡£SQL Azure Ìṩ¹ØϵÐÍÊý¾Ý¿â¹¦ÄÜÀ´×÷Ϊ¹«Ó÷þÎñ¡£»ùÓÚÔƵÄÊý¾Ý¿â½â¾ö·½°¸ ......
-- ²é¿´µ±Ç°dbµÄµÇ½
select * from sys.sql_logins
-- ²é¿´ÐÔÄܼÇÊýÆ÷
SELECT * from sys.dm_os_performance_counters
-- Ö´ÐйýµÄÏß³ÌËùÓöµ½µÄËùÓеȴý(²»Êǵ±Ç°ÕýÔÚÔËÐеÄÏß³Ì, Ϊ×ÔÉÏ´ÎÖØÖÃͳ¼ÆÐÅÏ¢»òÆô¶¯·þÎñÆ÷ÒÔÀ´ÀÛ»ýµÄÊý¾Ý),¿É·ÖÎö¿¿Ç°µÄ¼¸¸öµÈ´ý½Ï¸ßµÄʼþ¡£
select * from sys.dm_os_wait_stats order by wa ......
(Ò»)ÉîÈëdz³öÀí½âË÷Òý½á¹¹
¡¡¡¡Êµ¼ÊÉÏ£¬Äú¿ÉÒÔ°ÑË÷ÒýÀí½âΪһÖÖÌØÊâµÄĿ¼¡£Î¢ÈíµÄSQL SERVERÌṩÁËÁ½ÖÖË÷Òý£º¾Û¼¯Ë÷Òý(clustered index£¬Ò²³Æ¾ÛÀàË÷Òý¡¢´Ø¼¯Ë÷Òý)ºÍ·Ç¾Û¼¯Ë÷Òý(nonclustered index£¬Ò²³Æ·Ç¾ÛÀàË÷Òý¡¢·Ç´Ø¼¯Ë÷Òý)¡£ÏÂÃ棬ÎÒÃǾÙÀýÀ´ËµÃ÷һϾۼ¯Ë÷ÒýºÍ·Ç¾Û¼¯Ë÷ÒýµÄÇø±ð£º
¡¡¡¡Æäʵ£¬ÎÒÃǵĺºÓï×ÖµäµÄÕýÎı ......
ÏÂÁÐÓï¾ä²¿·ÖÊÇMssqlÓï¾ä£¬²»¿ÉÒÔÔÚaccessÖÐʹÓá£
SQL·ÖÀࣺ
DDL—Êý¾Ý¶¨ÒåÓïÑÔ(CREATE£¬ALTER£¬DROP£¬DECLARE)
DML—Êý¾Ý²Ù×ÝÓïÑÔ(SELECT£¬DELETE£¬UPDATE£¬INSERT)
DCL—Êý¾Ý¿ØÖÆÓïÑÔ(GRANT£¬REVOKE£¬COMMIT£ ......