My PL/SQL practice 8/2/10
SQLPlus :http://www.orafaq.com/wiki/SQL*Plus_FAQ
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/sqloperations.htm
1. Transfer values from a sql scripts:
CNT=`sqlplus -s username/password1@dbname @getUVQuery_NULLCNT`;
Note : Remeber to use option "-s" (-s or -silent -- start sqlplus in silent mode. Not recommended for beginners!)
if not use "-s" , will return something as below :
SQL*Plus: Release 10.2.0.3.0 - Production on Tue Feb 9 11:03:08 2010
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
0
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
2.getUVQuery_NULLCNT.sql
set term off
column cnt noprint new_value total
SELECT count(inquiry_id) cnt
from inquire_all_current a
WHERE FORM_COMPLETE_STATUS = 'Y'
and ITEM_POPULATE_STATUS = 'N'
and expand_type='uvall'
and uv_query is null
ORDER BY INQUIRY_ID ASC;
set term on
prompt &total
exit
3. Define cursor and use cursor:
DECLARE
CURSOR cur IS
SELECT inquiry_id
from inquire_all_current a
WHERE FORM_COMPLETE
相关文档:
具体实现如下:
SQL> select count(*) from v$session #连接数
SQL> Select count(*) from v$session where status='ACTIVE' #并发连接数
SQL> show parameter processes #最大连接
SQL> alter system set processes = value scope = spfile;重启数据库 #修改连接 ......
由于代码过于简单,直接贴出:
SqlDataSourceEnumerator SseInstance = SqlDataSourceEnumerator.Instance;
//ServerName:服务器名;
//InstanceName:实例名;
//IsClustered:是否为群集服务器的一部分;
//Version:版本,8.*是SQL 2000,9.*是SQL 2005
DataTable DtSqlInstance = SseInstance.GetDataSources();
注: ......
UrlScan的3.1是一个安全的工具,限制了IIS的HTTP请求将处理类型。 通过阻止特定的HTTP请求,在URLScan 3.1安全工具有助于防止对服务器应用程序可能有害的请求。 UrlScan的3.1是URLScan 2.5的更新版本。支持IIS 5.1中,IIS 6.0和IIS 7.0在Windows Vista和Windows Server 2008。下载地址http://download.csdn.net ......
create database test --建立test数据库
use test
create table BONUS --建立
(
ENAME NVARCHAR(10),
JOB NVARCHAR(9),
SAL FLOAT,
COMM FLOAT
)
create table DEPT --建立部门表
(
DEPTNO SMALLINT not null, --部门编号
DNAME NVARCHAR(14), --部门名
LOC NVARC ......