²Î¿¼¡¶ASP.NETÓëSQLÒ»Æð´ò°ü²¿Êð°²×°¡·
£¬ÕâÆªÎÄÕÂÊÇÕë¶ÔVB.NETÓëSQL Ò»Æð´ò°üµÄ,µ«ÊÇÎÒʹÓõÄÊÇC#,µ±È»Ö»ÒªÐÞ¸ÄÒ»ÏÂÖ÷Òª°²×°Àà¿â¾ÍÐÐÁË!C#µÄÀà¿â´úÂëÈçÏÂ:DBCustomAction.cs
using System;
using System.Collections;
using System.Data.SqlClient;
using System.ComponentModel;
using System.Configuration.Install;
using System.Diagnostics;
using System.IO;
using System.Xml;
using System.Reflection;
namespace PMS
{
/// <summary>
/// DBCustomAction µÄժҪ˵Ã÷¡£
/// </summary>
[RunInstaller(true)]
public class DBCustomAction : System.Configuration.Install.Installer
{
/// <summary>
/// ±ØÐèµÄÉè¼ÆÆ÷±äÁ¿¡£
/// </summary>
private System.ComponentModel.Container components = null;
public DBCustomAction()
{
// ¸Ãµ÷ÓÃÊÇÉè¼ÆÆ÷Ëù±ØÐèµÄ¡£
InitializeComponent();
// TODO: ÔÚ InitializeComponent µ÷ÓúóÌí¼ÓÈκγõʼ»¯
&nb ......
²Î¿¼¡¶ASP.NETÓëSQLÒ»Æð´ò°ü²¿Êð°²×°¡·
£¬ÕâÆªÎÄÕÂÊÇÕë¶ÔVB.NETÓëSQL Ò»Æð´ò°üµÄ,µ«ÊÇÎÒʹÓõÄÊÇC#,µ±È»Ö»ÒªÐÞ¸ÄÒ»ÏÂÖ÷Òª°²×°Àà¿â¾ÍÐÐÁË!C#µÄÀà¿â´úÂëÈçÏÂ:DBCustomAction.cs
using System;
using System.Collections;
using System.Data.SqlClient;
using System.ComponentModel;
using System.Configuration.Install;
using System.Diagnostics;
using System.IO;
using System.Xml;
using System.Reflection;
namespace PMS
{
/// <summary>
/// DBCustomAction µÄժҪ˵Ã÷¡£
/// </summary>
[RunInstaller(true)]
public class DBCustomAction : System.Configuration.Install.Installer
{
/// <summary>
/// ±ØÐèµÄÉè¼ÆÆ÷±äÁ¿¡£
/// </summary>
private System.ComponentModel.Container components = null;
public DBCustomAction()
{
// ¸Ãµ÷ÓÃÊÇÉè¼ÆÆ÷Ëù±ØÐèµÄ¡£
InitializeComponent();
// TODO: ÔÚ InitializeComponent µ÷ÓúóÌí¼ÓÈκγõʼ»¯
&nb ......
ÔÚÍøÉÏËÑË÷Á˰ëÌ죬Ö÷ÒªÔÒòÊÇoci.dllÊÇ64λµÄ,¶øPL/SQL developerÖ»ÓÐ32λµÄ,ÔÚʹÓÃ64λoci.dllÎļþʱ³ö´í.
ÔÚÍøÉÏÕÒÁ˺ܶà×ÊÁÏ,×î·½±ãµÄ½â¾ö·½°¸ÈçÏÂ:
1.µ½oracle¹ÙÍøÏÂÔØOracle InstantClient,ÎÒϵÄÊÇinstantclient-basiclite-win32-10.2.0.4.zip,°ÑËü½âѹËõµ½
oracle°²×°Ä¿Â¼productÏÂ,ÆäÖл¹ÓÐÒ»¸öĿ¼Ϊ10.2.0.ÔÚÆäÖеÄdb_1/NETWORK/ADMINĿ¼Ï¿½±´tnsnames.ora
Îļþµ½InstantClient½âѹĿ¼.
2.·ÇµÇ¼״̬ϽøÈëPL/SQL developer,½øÈëÊ×Ñ¡Ïî,ÔÚconnectionÖÐÉèÖÃOracle_HomeºÍOCI Library,ÆäÖÐ
Oracle_HomeÉèÖÃΪInstantClientµÄ½âѹĿ¼,OCI LibraryÉèÖÃΪ¸ÃĿ¼ÏµÄoci.dll.
3.×îºóÒªÉèÖÃÆô¶¯PL/SQL developerµÄ»·¾³,ÔÚPL/SQL developerµÄ°²×°Ä¿Â¼Ï½¨Á¢Ò»¸öbatÎļþ,ÎļþÄÚÈÝÈçÏÂ:
@echo off
set path=E:\develop\oracle\product\instantclient_10_2
set ORACLE_HOME=E:\develop\oracle\product\instantclient_10_2
set TNS_ADMIN=E:\develop\oracle\product\instantclient_10_2
set NLS_LANG=AMERICAN_AMERICA.AL32UTF8
start plsqldev.exe
ÆäÖÐNLS_LANGǰ²¿·Ö±ØÐëÊÇAMERICAN_AMERICA,ºó²¿·ÖÊÇÊý¾Ý¿â²ÉÓõÄ×Ö·û¼¯. ......
ÔÚÍøÉÏËÑË÷Á˰ëÌ죬Ö÷ÒªÔÒòÊÇoci.dllÊÇ64λµÄ,¶øPL/SQL developerÖ»ÓÐ32λµÄ,ÔÚʹÓÃ64λoci.dllÎļþʱ³ö´í.
ÔÚÍøÉÏÕÒÁ˺ܶà×ÊÁÏ,×î·½±ãµÄ½â¾ö·½°¸ÈçÏÂ:
1.µ½oracle¹ÙÍøÏÂÔØOracle InstantClient,ÎÒϵÄÊÇinstantclient-basiclite-win32-10.2.0.4.zip,°ÑËü½âѹËõµ½
oracle°²×°Ä¿Â¼productÏÂ,ÆäÖл¹ÓÐÒ»¸öĿ¼Ϊ10.2.0.ÔÚÆäÖеÄdb_1/NETWORK/ADMINĿ¼Ï¿½±´tnsnames.ora
Îļþµ½InstantClient½âѹĿ¼.
2.·ÇµÇ¼״̬ϽøÈëPL/SQL developer,½øÈëÊ×Ñ¡Ïî,ÔÚconnectionÖÐÉèÖÃOracle_HomeºÍOCI Library,ÆäÖÐ
Oracle_HomeÉèÖÃΪInstantClientµÄ½âѹĿ¼,OCI LibraryÉèÖÃΪ¸ÃĿ¼ÏµÄoci.dll.
3.×îºóÒªÉèÖÃÆô¶¯PL/SQL developerµÄ»·¾³,ÔÚPL/SQL developerµÄ°²×°Ä¿Â¼Ï½¨Á¢Ò»¸öbatÎļþ,ÎļþÄÚÈÝÈçÏÂ:
@echo off
set path=E:\develop\oracle\product\instantclient_10_2
set ORACLE_HOME=E:\develop\oracle\product\instantclient_10_2
set TNS_ADMIN=E:\develop\oracle\product\instantclient_10_2
set NLS_LANG=AMERICAN_AMERICA.AL32UTF8
start plsqldev.exe
ÆäÖÐNLS_LANGǰ²¿·Ö±ØÐëÊÇAMERICAN_AMERICA,ºó²¿·ÖÊÇÊý¾Ý¿â²ÉÓõÄ×Ö·û¼¯. ......
/*
´¥·¢Æ÷»ñÈ¡SQLÓï¾äÔöÁ¿´«Êä
¹¦ÄÜ£º²¶×½Ð޸ıíµÄSQLÓï¾ä
ʹÓÃ˵Ã÷£º 1¡¢ÏÈн¨Ò»±íÊÖ¶¯Ð´ÈëÖ÷¼üÐÅÏ¢»òÕßΨһË÷Òý
Create table prmary_key
(tab_name varchar(255),
key_name varchar(255))
--´Ë±í½öÔÚ½¨Á¢´¥·¢Æ÷ʱʹÓ㬽¨ÍêËùÓд¥·¢Æ÷ºó ¼ÇµÃɾ³ý
2¡¢½¨´¥·¢Æ÷½öÐèÒªÐÞ¸Ä@tab_name±äÁ¿£¬¼´¿É
Create By Yujiang
*/
Declare @cursql varchar(8000),
@cursqltmp varchar(8000),
@curkey Varchar(500), --Ö÷¼ü»òΨһË÷Òý
@curkeytmp Varchar(2000), --Ö÷¼üÑ»·ÓÃ
@curkeywhere Varchar(1000), --Ö÷¼üÌõ¼þ
@curkeyjoin Varchar(1000), --¹ØÁªÌõ¼þ
@curexecsql varchar(5000), --Ö´ÐÐSQL
@curcols varchar(2000), --ËùÓеÄÁÐÃû
@curcolstmp varchar(2000), --Ñ»·ÓÃ
@tab_name varchar(255),
@curtmp varchar(255), --Ñ»·ÓÃ
@curcoltype varchar(255) --×Ö¶ÎÊý¾Ý ......
Introduction
Microsoft SQL Server 2008 R2 is the latest release of SQL Server. This article will introduce the top 10 features and benefits of SQL Server 2008 R2. The “R2” tag indicates this is an intermediate release of SQL Server and not a major revision. However, there are a number of interesting new features for both DBAs and developers alike. At the time of this article, R2 is available as a CTP (Community Technology Preview). In addition to new features, there are two new editions as well, SQL Server 2008 R2 Datacenter and SQL Server 2008 R2 Parallel Data Warehouse.
Report Builder 3.0
Report Builder is a tool set for developing rich reports that can be delivered over the web. Some of the features of Report Builder include the ability to create reports containing graphs, charts, tables, and printing controls. In addition, Report Builder also supports drill downs and sorting. If you are familiar with the third party tool Crystal Reports, then you have good idea of w ......
1.¼¯ºÏ²Ù×÷
ѧϰoracle
Öм¯ºÏ²Ù×÷µÄÓйØÓï¾ä£¬
ÕÆÎÕunion,union
all,minus,interestµÄʹÓÃ,Äܹ»ÃèÊö½áºÏÔËË㣬²¢ÇÒÄܹ»½«¶à¸ö²éѯ×éºÏµ½Ò»¸ö²éѯÖÐÈ¥£¬Äܹ»¿ØÖÆÐзµ»ØµÄ˳Ðò¡£
°üº¬¼¯ºÏÔËËãµÄ
²éѯ³ÆÎª¸´ºÏ²éѯ¡£¼û±í¸ñ1-1
±í1-1
Operator Returns content
UNION
ÓÉÿ¸ö²éѯѡÔñµÄËùÓв»Öظ´µÄÐÐ ²¢¼¯²»°üº¬Öظ´Öµ
UNION ALL
ÓÉÿ¸ö²éѯѡÔñµÄËùÓеÄÐУ¬°üÀ¨ËùÓÐÖØ¸´µÄÐÐ ÍêÈ«²¢¼¯°üº¬Öظ´Öµ
INTERSECT
ÓÉÿ¸ö²éѯѡÔñµÄËùÓв»Öظ´µÄÏཻÐÐ ½»¼¯
MINUS
ÔÚµÚÒ»¸ö²éѯÖУ¬²»ÔÚºóÃæ²éѯÖУ¬²¢ÇÒ½á¹ûÐв»Öظ´ ²î¼¯
ËùÓеļ¯ºÏÔËËãÓëµÈºÅµÄÓÅÏȼ¶Ïàͬ£¬Èç¹ûSQL
Óï¾ä°üº¬¶à¸ö¼¯ºÏÔËËã²¢ÇÒûÓÐÔ²À¨ºÅÃ÷È·µØÖ¸¶¨ÁíÒ»¸ö˳
Ðò£¬Oracle·þÎñÆ÷½«ÒÔ´Ó× ......
SELECT UPPER(F.TABLESPACE_NAME) "±í¿Õ¼äÃû",
D.TOT_GROOTTE_MB "±í¿Õ¼ä´óС(M)",
D.TOT_GROOTTE_MB - F.TOTAL_BYTES "ÒÑʹÓÿռä(M)",
TO_CHAR(ROUND((D.TOT_GROOTTE_MB - F.TOTAL_BYTES) / D.TOT_GROOTTE_MB * 100,
2),
'990.99') "ʹÓñÈ",
F.TOTAL_BYTES "¿ÕÏпռä(M)",
F.MAX_BYTES "×î´ó¿é(M)"
from (SELECT TABLESPACE_NAME,
ROUND(SUM(BYTES) / (1024 * 1024), 2) TOTAL_BYTES,
ROUND(MAX(BYTES) / (1024 * 1024), 2) MAX_BYTES
&nb ......