ASP.NET 2.0Á¬½ÓOracle 10g
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.OracleClient;//ÒýÈëÃüÃû¿Õ¼ä
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
String connstr = "Data Source=orcl;User ID=system;Password=orcl;Unicode=True";
OracleConnection oraConn = new OracleConnection(connstr);
OracleDataAdapter da = new OracleDataAdapter("select * from lin", oraConn);
DataSet ds = new DataSet();
da.Fill(ds);
GridView1.DataSource = ds.Tables[0];
GridView1.DataBind();
}
}
Á¬½ÓÊôÐÔ»òÔÚweb.confgiÖеÄÅäÖÃ
Æäʵֱ½ÓдÉÏÃæµÄ´úÂë»á³ö²»ÉÙ´íÎóµÄ£¬Òª×öÁ½¸ö¹¤×÷²Å¿ÉÒÔ¡£
1. ASP.NET2.0ÀïĬÈϲ»ÄÜÖ±½ÓÌí¼Óusing System.Data.OracleClient;ÐèÒªÔÚÌî¼ÓÒýÓõÄ.NET×é¼þ¿òÀïÑ¡ÔñSystem.Data.OracleClientÌí¼Óºó²ÅÄÜÓá£
2. ÔÚASP.NET1.1Öе÷ÓÃWeb.configÖеÄÊý¾Ý¿âÁ¬½Ó×Ö·û´®Ê±Ê¹ÓÃÓï¾äSystem.Configuration.ConfigurationSettings.AppSettings["oracle"];,ÔÚ2.0ÀïÐëҪʹÓÃSystem.Configuration.ConfigurationManager.AppSettings["oracleconn"];,²¢ÇÒÐèÏÈÔÚÌî¼ÓÒýÓõÄ.NET×é¼þ¿òÀïÑ¡ÔñSystem.ConfigurationÌí¼Óºó²ÅÄÜÓá£
3.ÒÔÉϲÉÓõÄÊÇ´ÓASP.NETǨÒÆÀ´µÄ´úÂë·ç¸ñ£¬Èç¹û²ÉÓÃ2.0ÖеÄconnectionStrings,ÐèÒªÐ޸ĵĴúÂëÈçÏÂ:
Web.Config
<connectionStrings>
<add name="oracleconn" connectionString="User ID=Óû§Ãû;Password=ÃÜÂë;Data Source=Êý¾Ý¿â·þÎñÃû" providerName="System.Data.OracleClient"/>
</connectionStrings>
´úÂëÈçÏÂÐèÒªÐÞ¸Ä,ÆäËû¶¼²»±ä:
string strcon = Syste
Ïà¹ØÎĵµ£º
oracle±í¿Õ¼ä²Ù×÷Ïê½â
1
2
3×÷Õߣº À´Ô´£º ¸üÐÂÈÕÆÚ£º2006-01-04
5
6
7½¨Á¢±í¿Õ¼ä
8
9CREATE TABLESPACE data01
10DATAFILE '/ora ......
OracleϵÁУºLOB´ó¶ÔÏó´¦Àí
Ö÷ÒªÊÇÓÃÀ´´æ´¢´óÁ¿Êý¾ÝµÄÊý¾Ý¿â×ֶΣ¬×î´ó¿ÉÒÔ´æ´¢4G×ֽڵķǽṹ»¯Êý¾Ý¡£
Ö÷Òª½éÉÜ×Ö·ûÀàÐͺͶþ½øÖÆÎļþÀàÐÍLOBÊý¾ÝµÄ´æ´¢£¬µ¥¶À½éÉܶþ½øÖÆÀàÐÍLOBÊý¾ÝµÄ´æ´¢¡£
Ò»£¬OracleÖеÄLOBÊý¾ÝÀàÐÍ·ÖÀà
1£¬°´´æ´¢Êý¾ÝµÄÀàÐÍ·Ö£º
¢Ù×Ö·ûÀàÐÍ£º
&nbs ......
Oracle Database 10g ÌṩÁËÒ»¸öÏÔÖø¸Ä½øµÄ¹¤¾ß£º×Ô¶¯¹¤×÷¸ºÔØÐÅÏ¢¿â (AWR:Automatic Workload Repository)¡£Oracle ½¨ÒéÓû§ÓÃÕâ¸öÈ¡´ú Statspack¡£AWR ʵÖÊÉÏÊÇÒ»¸ö Oracle µÄÄÚÖù¤¾ß£¬Ëü²É¼¯ÓëÐÔÄÜÏà¹ØµÄͳ¼ÆÊý¾Ý£¬²¢´ÓÄÇЩͳ¼ÆÊý¾ÝÖе¼³öÐÔÄÜÁ¿¶È£¬ÒÔ¸ú×ÙDZÔÚµÄÎÊÌâ¡£Óë Statspack ²»Í¬£¬¿ìÕÕÓÉÒ»¸ö³ÆΪ MMON µÄеĺó ......
½ñÄêµÄOracleÈ«Çò´ó»áÓÚ10ÔÂ11ÈÕ£15ÈÕÔÚÃÀ¹ú¾É½ðɽµÄMosconeÖÐÐÄÒѾÀ¿ªÐòÄ»ÁË¡£
¡¡¡¡ Oracle¶ÔSun¹«Ë¾µÄ³¤Æڼƻ®ÎÞÒÉÊDZ¾´ÎOOW´ó»áµÄ½¹µã¡£µ«ÔÚ̸ÂÛÕâ¸ö»°Ìâ֮ǰ£¬ÎÒÃÇ×¼±¸ÁËÒ»×é´ó»áµÄÓÐȤÊý¾Ý£¬ÏÈÈôó¼Ò¶Ô±¾´Î´ó»áÓиöÕûÌåµÄÓ¡Ïó¡£
¡¡¡¡ÓйØÕû¸ö´ó»áµÄÊý×Ö£º
¡¡¡¡· ½ü4.3ÍòÈ˵½»á
¡¡¡¡· ΪÃÀ¹ ......
Ç°¼¸ÌìÃæÊÔµÄʱºòÃæÊÔ¹Ù²ÅÎʹýÎÒORACLEµÄÌåϵ½á¹¹£¬ÈÃÎÒÔÚÒ»ÕÅ°×Ö½ÉÏ»³öÀ´¡£»ØÍ·ÏëÏ뵱ʱ´ðµÃ»¹²»´í£¬´ó²¿·ÖÄÚÈݶ¼ÃèÊö³öÀ´ÁË£¬ºÇºÇ£¬¸Õ²ÅÔÚÍøÉÏ¿´µ½Ò»Æª½²½âORACLEÌåϵ½á¹¹µÄÎÄÕ£¬¾õµÃ²»´í£¬×ª¹ýÀ´´æ×Å£¬½«À´¿ÉÄÜ»áÓõ½¡£
=================================================================================
ÔÚ±¾ÎÄÀ ......