发新随笔
发新文章 联系 聚合管理

oracle提供的分区方法有四种:范围分区,散列分区,复合分区,列表分表


dbca 命令调出创建和删除数据库


DEFINE定义替换变量
UNDEFINE取消定义替换变量
set verify off进行校验

TRUNCATE 清除表中所有数据 /CREATE 创建 /DROP 删除 /ALTER 修改 
input
在当前行之后插入一行新的数据
delete
del + 回车 删除当前行
del 1 3 删除第一到第三行s
delete
del + 回车 删除当前行
del 1 3 删除第一到第三行


查询序列:
user_sequences
last_number 序列将要产生的下一个号是多少;

select sequence_name,min_value,max_value,increment_by last_number from user_sequences;

伪列:NEXTVAL 引用下一个可用的序列值,不同的用户每次引用都会获得一个唯一的值。
      CURRVAL 得到当前的值(刚被领走的号)。
在CURRVAL执行前必须先通过NEXTVAL得到一个初始的值。

序列名.NEXTVAL/CURRVAL
 
序列发生间隙是正常的,保证唯一即可。


序列的修改:
   ALTER SEQUENCE sequence_name 
   increment by
  maxvalue
  cycle   
  cache;

start with 不能修改。

删除序列:

drop  SEQUENCE sequence_name;


解锁用户和锁定用户
alter user jane account unlock;
alter user jane account lock;
解过期用户
alter user jane password expire;


 set feedback off     关闭系统反馈的信息
   set heading off      列标题关闭
   set pagesize 0       不分页
   set autocommit on    设置自动提交打开
   set timing on        打开时间统计
   set time on          打开一个时钟
       
        set heading off   --关闭列的标题
        set feedback off  --关闭反馈信息
 
instance ---memory structure
            background process
database--- data file
            log file
            control file
show sga
select * from v$bgprocess;所有后台进程
select * from v$bgprocess where paddr<>'00'不等于00

查看日志文件,控制文件,数据文件
select * from V$logfile
select * from V$controlfile
select * from V$datafile
共享缓存区
show parameter shared
show parameter db_cache
show parameter log
dynamic

查看全局区
show parameter sga
共享泄用大泄
用户进程不能直接控制数据库
必须的进程:dbwn pmon ckpt lgwr smon reco
可选的进程:arcn lmon snnn qmnn lmdn cjqo pnnn lckn dnnn

ofa(optimal flexible architecture)优化灵活结构

posted @ 2008-09-07 22:16 faye 阅读(110) | 评论 (0)编辑 收藏
 

D:\oracle\product\10.1.0\Db_1\BIN dgmgrl命令行管理

正常关闭:shutdown normal
立即关闭:shutdown immediate
强行关闭: shutdown abort

database closed 数据库被关闭
database dismounted 数据库被卸裁
oracle instance shut down:数据库例程被关闭
正常启动:startup normal
安装启动: startup mount
非安装启动:  startup nomount
约束启动:  startup restrict
强制启动:  startup force
带初始化参数启动:startup pfile

orapwd.exe 这个可执行文件在管理员忘记了数据服务器超级密码时特别有用,它可以更改SYS默认用户别名internal的口令,是忘记数据库服务器密码的情况下使用的最后一项措施

imp.exe:文件用于数据库的导入,主要用于逻辑恢复
exp.exe:该文件用于数据库的导出,主要用于逻辑备份。是imp.exe文件的逆过程
select distinct job from scott.emp distinct 是除去相同的记录

like 和not like 适合字符型字段的查询,%代表任意长度的字符串,_下划线代表一个任意的字符。like 'm%'代表m开头的任意长的字符串,like'm_'代表开头m的长度为2的字符串。

ORDER BY 可以指定查询结果如何排序,形式为字段名 排序关键词:asc代表升序排列,desc代表降序排列,多个排序字段之间通过逗号分割。若有where查询条件,order by 要放在where语句后面
having是检查分组后的各组是否满足条件。having语句只能配合group by 语句使用,没有group by 时不能使用having,但可以使用where
带any的嵌套查询和some的嵌套查询功能是一样的。
exists关键词用来查询子查询中是否有满足条件的记录


利用子查询语句查询结果,然后再利用insert语句将结果插入数据表,子查询和insert中的数据表即可以相同,也可以不同,但要求查询结果的字段和insert插入的数据表中字段属性完全一致

组名不能以数字开头,也不能包含任何特殊字符,如&符号.一旦创建了组就无法再更改组名

create user 创建用户
create tablespace 创建表空间
create role 创建角色
alter any role 修改角色
alter tablespace 修改表空间
alter user 修改用户
alter database 修改数据库
drop any role 删除角色
drop user删除角色
drop user 删除用户
grant any privilege 授予任何系统权限
grant any role 授予任何角色
manage tablespace管理表空间
sysdba 系统管理员
sysoper 系统操作员


常用数据对象系统权限
create any table
create any cluster
create any index
create any view
create any trigger
create any procedure
create any snapshot
create any synonym
alter any table
alter any cluster
alter any index
alter any view
alter any trigger
alter any procedure
alter any snapshot
alter any synonym
drop any table
drop any cluster
drop any index
drop any view
drop any trigger
drop any procedure
drop any snapshot
backup any table 备份表
lock any table 给表加锁
select any table 查询表
insert any table 插入表数据
delete any table 删除表数据
update any table 更新表数据
comment any table 给表加上注释

arch(归档):arch进程都对已写满的日志文件进行存档
将段分成4段,取数据段、索引段、回退段,临时段

truncate table 命令:
truncate与delete 命令的区别在于,前者快速删除记录并释放空间,不使用事务处理因此无法回滚,而delete命令可在执行删除之后,通过学习rollback撤销删除
事务只有在提交(commit)后,对数据库的更改才可以永久保持
revoke命令:要撤销已授予用户的权限
group by 子句用于将信息表划分为组,按组进行聚合运算
分析函数根据一组行来计算聚合值

posted @ 2008-09-07 22:01 faye 阅读(109) | 评论 (0)编辑 收藏
 

进程分两种(服务器进程,用户进程)
服务器进程
系统监控进程(SMON) 进程监控进程(PMON) 数据库写入进程(DBWR)日志写入进程(LGWR)
归档进程(ARCH)检查点进程(CKPT) 恢复进程(RECO) 锁进程(LCKN)
快照进程(SNPn)高度进程(Dnnn)

系统全局区(SGA)(一种用于进程之间传递信息)
由四个部份组成(数据缓冲区、字典缓冲区、日志缓冲区、SQL共享泄)

程序全局区(PGA)一种用于保存单个用户进程所需要的信息
逻辑结构(数据库、表空间、逻辑对象、数据段、数据区间、数据块)
存储结构(数据库、物理文件、物理块)
通过数据库链接访问数据表的形式:数据表名@数据库链接名/

触发器:触发器是一种特殊类型的存储过程,由一些SQL语句组成,主要用于强制性的业务规则或要求,但不返回结果
数据库之间通过net8协议连接。因此异种网络之间也可以互联互通。

posted @ 2008-09-07 21:45 faye 阅读(142) | 评论 (0)编辑 收藏
 
            堵塞socket 就是在accept、read、write等IO操作的的时候,如果没有可用符合条件的资源,不马上返回,一直等待直到有资源为止。
            非堵塞socket 则是在执行select的时候,当没有资源的时候堵塞,当有符合资源的时候,返回一个信号,然后程序就可以执行accept、read、write等操作,这个时候,这些操作是马上完成,并且马上返回。

            而windows的winsock则有所不同,可以绑定到一个EventHandle里,也可以绑定到一个HWND里,当有资源到达时,发出事件,这时执行的io操作也是马上完成、马上返回的。一般来说,
            如果使用堵塞socket,通常我们时开一个线程accept socket,当有socket链接的时候,开一个单独的线程处理这个socket;
            如果使用非堵塞socket,通常是只有一个线程,一开始是select状态,当有信号的时候马上处理,然后继续select状态。 



         ioctlsock()设置套接字的阻塞和非阻塞模式 


_______________________________________________________________________________
      
   一组网络服务原语
   
   listen            阻塞操作,等待一个进入的连接
   connect       与一个正在等待的对等体建立连接
   receive        阻塞操作,等待一个进入的报文
   send            约会对等体发送一个报文
   disconnect   终止一个连接

_______________________________________________________________________________

Receives data from a datagram or stream socket.

int lrs_receive ( char *s_desc, char *bufindex, [char *flags], LrsLastArg );

s_desc
A descriptor identifying a connected socket.
buffer
A descriptor identifying a buffer.
flags
Receive and Send Flags that specify various ways which the call can be made (optional). Use the following format:
"Flags=flags"
LrsLastArg
A marker indicating the end of the parameters (used where optional parameters are available).

The lrs_receive function reads the incoming data from a datagram or stream socket. If no incoming data is available at the socket, lrs_receive waits for data to arrive unless the socket is non-blocking.

VuGen determines the expected size of the buffer from the recorded session. If the buffer size does not match (smaller or larger), lrs_receive rereads the incoming data carried by the socket, until the receive_timeout. By default the receive_timeout is 10 seconds. You can modify the timeout using lrs_set_recv_timeout or lrs_set_recv_timeout2.

Note that the successful completion of a lrs_receive does not indicate that all of the data was successfully received. If the received buffer does not match the expected buffer, VuGen sends a message to the output indicating the mismatch and continues with script execution.

If the socket's type is TCP and the remote side has shut down the connection in an orderly way, lrs_receive finishes without returning any data. If the connection was aborted, lrs_receive returns one of the Windows Sockets error codes.

This function is recorded during a Windows Socket session.


  
posted @ 2008-04-10 17:39 faye 阅读(683) | 评论 (0)编辑 收藏
 

 

文件名

大小

上传时间

weblogic tuning_BEA.rar

399KB

2006/9/21

高级性能测试_CSTC.rar

813KB

2006/9/21

oracle 10g concepts中文.rar

1047KB

2006/9/21

Oracle10g_Views.rar

173KB

2006/9/19

posted @ 2008-04-07 21:39 faye 阅读(121) | 评论 (0)编辑 收藏
 
     摘要:   阅读全文
posted @ 2008-04-07 21:31 faye 阅读(1220) | 评论 (0)编辑 收藏
 

以复合协议加入一个windows socket协议。
录制win32,
程序路径为\\mercury\lodrunner\bin\wplus_init_wsock.exe
让客户端(角色)指向loadrunner探针所在IP及port
posted @ 2008-01-21 17:32 faye 阅读(256) | 评论 (0)编辑 收藏
 


char * iToLoFont(int i) //将两字节i转换为"/x00/x00"形式,低位在前
{
 int len;
 char  hex[8]="";
 char formatstr[12]="";
 itoa(i,hex,16);
 len = strlen(hex);
 switch(len)
 {
  case 1:
    strcat(formatstr,"\\x0");
    strcat(formatstr,hex);
    strcat(formatstr,"\\x00");
    break;

  case 2:
    strcat(formatstr,"\\x");
    strcat(formatstr,hex);
    strcat(formatstr,"\\x00");
    break;

  case 3:
    strcat(formatstr,"\\x");
    strncat(formatstr,hex+1,2);
    strcat(formatstr,"\\x0");
    strncat(formatstr,hex,1);
     break;
  case 4:
    strcat(formatstr,"\\x");
    strncat(formatstr,hex+2,2);
    strcat(formatstr,"\\x");
    strncat(formatstr,hex,2);
    break;
 }
 return formatstr;
 //lr_output_message("iToLoFont return %s",formatstr);
}


char * iToHiFont(int i)//将两字节i转换为"/x00/x00"形式,高位在前
{
 int len;
 char  hex[8]="";
 char formatstr[12]="";
 itoa(i,hex,16);
 len = strlen(hex);
 switch(len)
 {
  case 1:
    strcat(formatstr,"\\x00\\x0");
    strcat(formatstr,hex);
    break;

  case 2:
    strcat(formatstr,"\\x00\\x");
    strcat(formatstr,hex);
    break;

  case 3:
    strcat(formatstr,"\\x0");
    strncat(formatstr,hex,1);
    strcat(formatstr,"\\x");
    strncat(formatstr,hex+1,2);
    break;
  case 4:
    strcat(formatstr,"\\x");
    strncat(formatstr,hex,2);
    strcat(formatstr,"\\x");
    strncat(formatstr,hex+2,2);
    break;
 }
 return formatstr;
 //lr_output_message("iToHiFont return %s",formatstr);
}

posted @ 2008-01-21 00:04 faye 阅读(287) | 评论 (0)编辑 收藏
 
maxfree:VMM中空闲内存列表(freelist)的最大值。
minfree:VMM中空闲内存列表(freelist)的最小值。
maxperm:设置允许的文件缓存占物理内存的最大百分比。
minperm:设置允许的文件缓存占物理内存的最小百分比。
posted @ 2007-12-20 12:08 faye 阅读(207) | 评论 (0)编辑 收藏
 
     摘要: FTP的命令行格式为:
ftp -v -d -i -n -g [主机名] ,其中   阅读全文
posted @ 2007-11-29 16:18 faye 阅读(200) | 评论 (0)编辑 收藏
仅列出标题
共3页: 1 2 3 
CALENDER
<2024年4月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

公告

好记性不如烂笔头

常用链接

随笔分类

收藏夹

TEST

搜索

  •  

Powered By: 博客园
模板提供沪江博客