fjmingyang - by - 04 一月, 2008 17:12

V240不同的是,Sun Fire V480, V880, V490, and V890 SC使用的不是ALOM而是RSCRSC的配置可以在正常状态#下完成,并不需要借助console口!rsc的配置软件不是系统默认安装的,首先要在服务器上安装rsc的软件包Sun Remote System Control (RSC) 2.2.3 Software,可以在sun的补丁光盘里面找到,位于光盘的目录:sun/progs/RSC/2.2.3中。该软件包也可以从sun的网站上下载,如下是参考链接地址:

http://www.sun.com/servers/rsc.html

solaris 8上软件包是rsc2.2.3_packages_s8.zipsolaris 9solaris 10使用同样的软件包是rsc2.2.3_packages_s8.zip

该软件安装步骤如下:

 查看全文


fjmingyang - by - 04 一月, 2008 16:22

ALOM(Advanced Lights Out Manager)集成在v240服务器上,上面提供Serial MGTNET MGT两个接口。其中,Serial MGT普通网线V240自带的那个银色RJ45-DB9转接头连接PC9针串口,即可进入控制台(console),提示输入用户名。如果用Notebook连接,Notebook没有串口,故需要一个DB9-USB的转接头,另外还要安装驱动程序。

DMAP01 console login --输入root用户名和密码

 查看全文


fjmingyang - by - 26 十二月, 2007 19:19

一、介绍两种备份方式

1 init s 进入单用户模式,用ufsdump来备份,举例:

root@TEST01 # df -k

Filesystem kbytes used avail capacity Mounted on

/dev/dsk/c1t0d0s0 20174761 672566 19300448 4% /

/dev/dsk/c1t0d0s4 5046030 1530161 3465409 31% /usr

/proc 0 0 0 0% /proc

fd 0 0 0 0% /dev/fd

mnttab 0 0 0 0% /etc/mnttab

/dev/dsk/c1t0d0s1 10086988 153326 9832793 2% /var

swap 11384008 24 11383984 1% /var/run

swap 11385168 1184 11383984 1% /tmp

/dev/dsk/c1t0d0s5 26584007 104447 26213720 1% /export/home

这里我们只需要备份红色字体的四个ufs,

ufsdump 0cuf /dev/rmt/0 /dev/dsk/c1t0d0s0

 查看全文


fjmingyang - by - 26 十二月, 2007 14:39

世界对小孩子来说,完全是陌生的,只有充满了好奇的小孩子,才会不断提出各种问题,这说明孩子的求知欲很强烈。

孩子的问题有很多家长无法解释,但是不要乱说,要诚恳、诚实。我当时对自己孩子那些问题的回答基本有三种方式:

1、我知道的,尽量用孩子能听懂的语言讲解;

2、我说不准的,我会告诉孩子,等妈妈看看书再告诉你,然后我找答案,第二天再给孩子解释:

3、孩子不可能一下子就懂的,我会用类似这样的回答:“这个问题,等到你上了高中的时候,有一门课叫化学的,那里就会讲到了……。”

 查看全文


fjmingyang - by - 25 十二月, 2007 16:31

以9.2.0.1升级到9.2.0.8为例

1、下载

到metalink.oracle.com -〉Patches&Updates-〉Bug Database-〉Product or Family-〉输入RDBMS Server-〉Release选Oracle 9.2.0.8-〉Patch Type选Patchset/MiniPack-〉Platform选欲安装的OS类型-〉Go

2、安装

用Oracle安装帐号登陆

先设置下DISPLAY变量

unzip解压,进入解压目录运行./runInstaller,其他默认

最后运行root.sh脚本,提示选y



fjmingyang - by - 20 十二月, 2007 18:58

I am trying to connect to SUN Solaris/HP-UNIX/IBM AIX using XDMCP, but I get the error message:
"XDMCP Connection failed."
In order to use XDMCP connection, CDE login should be enabled on your remote server.
Follow the instruction below to enable CDE login:

Login as a root.
Enable CDE login when system boot:
$ /usr/dt/bin/dtconfig -e
dtconfig -reset
If you want to disable the CDE login setting, do the following:
$ /usr/dt/bin/dtconfig -d
 查看全文


fjmingyang - by - 20 十二月, 2007 18:50

Uploading and downloading files in the proper mode is important. Find out why it matters, and which should be transferred as ascii & which as binary.

Ascii or Binary?

The general rule of thumb is if you can view the file in a text editor like notepad (ie. .html, .js, .css files etc) you should upload in ASCII mode, most others (including images, sound files, video, zip files, executable's etc) should be uploaded in Binary.

 查看全文


fjmingyang - by - 17 十二月, 2007 13:51

solaris8的配置和其他OS的配置大同小异,但是如果有些细节不注意的话,往往导致配置失败,还找不到原因。

1、登陆帐号下的.rhosts文件要写入"+" ,这个不像其他操作系统可以写入“IP +”或“IP user”。

2、solaris8不接受指定登陆帐号的rsh, 即-l 参数,也就是说:本地主机的当前用户帐号在远程主机上必须存在。



fjmingyang - by - 29 十一月, 2007 15:18

1、什么是审计

简单来讲,就是把对数据库的操作记录下来。不管你是否打开数据库的审计功能,以下这些操作系统会强制记录。

l 用管理员权限连接Instance

l 启动数据库

l 关闭数据库

2、和审计相关的两个主要参数

Audit_sys_operations

默认为false,当设置为true时,所有(注意是所有!)sys用户(包括以sysdba,sysoper身份登录的用户)的操作都会被记录,audit trail不会写在aud$表中,这个很好理解,如果数据库还未启动aud$不可用,那么像conn /as sysdba这样的连接信息,只能记录在其它地方。如果是windows平台,audti trail会记录在windows的事件管理中,如果是linux/unix平台则会记录在audit_file_dest参数指定的文件中

Audit_trail

有三个取值

None :默认值,不做审计

DB :将audit trail 记录在数据库的审计相关表中,如aud$

OS :将audit trail 记录在操作系统文件中,文件名由audit_file_dest参数指定

注:这两个参数是static参数,需要重新启动数据库才能生效。

 查看全文


fjmingyang - by - 28 十一月, 2007 22:27

SQL> show user
USER is "SYS"
SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Prod
PL/SQL Release 10.1.0.2.0 - Production
CORE 10.1.0.2.0 Production
TNS for 32-bit Windows: Version 10.1.0.2.0 - Production
NLSRTL Version 10.1.0.2.0 - Production

SQL> show parameter audit

NAME TYPE VALUE
------------------------------------ ----------- ---------------
audit_sys_operations boolean FALSE
audit_trail string DB
SQL> audit table ;

Audit succeeded.

SQL> delete from aud$;

5 rows deleted.

SQL> commit;

SQL> conn cmy/cmy;
Connected.
SQL> drop table t;

Table dropped.

SQL> select count(*) from user_audit_trail;

COUNT(*)
----------
1 --------审计成功


偶然发现如果drop table t这句放在toad 8.6版 里面执行,不会生成审计记录!不知道是不是toad的bug.



fjmingyang - by - 27 十一月, 2007 15:38

本文对一些基本概念只是一带而过甚至略过,更多的请参考官方文档。

What is Lock

Oracle的锁机制用于管理对共享资源的并发访问。锁由Oracle自动管理,当事务(Transaction)结束后,自动释放。

锁可分为两个基本类型:Share(共享锁)Exclusive(排它锁)

What is Deadlock?

当两个或多个用户等待彼此之间的资源时发生死锁(Deadlock,避免死锁的办法就是使事务按照一定的顺序对表加锁,同时考虑先加最昂贵(排它性最强)的锁。

 查看全文


fjmingyang - by - 21 十一月, 2007 11:32

假设有一个表t,

select * fromt t;

x

----

1

4

5

我们在sqlplus/toad/developer2000执行select avg(x) from t;都不会报错,但在Asp.net却会报:OCI-22053: 溢出错误
解决的办法: select round(avg(x),2) from t;

 查看全文


fjmingyang - by - 14 十一月, 2007 15:55

批量更改文件名

@echo off
for /f %%i in ('dir /b P??A*.pdf P??A*.csv') do (call :rn %%i)
goto :eof
:rn
set str=%1
ren %str% %str:~3%

解释:批量修改以P开头第四个字母为A的pdf,csv文件名,去掉文件名的前3个字符,其中str为环境变量,引用时需要前后加%,

在for循环的do部门,我们把变量%%i作为参数传递,

定义行标时,要以:开头,且单独一行,%n (n为0,1,2,3...9)代表程序接受的第几个参数,%0代表程序名,%*代表所有参数。

%str:~3%代表截取%str%第3个字符以后的所有字符

批量删除文件

@echo off
set/p f=请输入这个文件的名称,有空格也不用加引号,如123 4.txt:
set/p t=删除文件请按d,打开文件请按o:

for %%a in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do call :%t% %%a

:d
for /r %1:/ %%i in ("%f%") do del /f/q/a/s "%%i"
goto :eof

:o
for /r %1:/ %%i in ("%f%") do start "%%i"

搜索所有的盘符(a-z),删除或打开用户输入的文件名,其中文件名加引号("%f%")是为了防止文件名中带空格。其中%1:/后面的斜杠,应为反斜杠,因本blog过滤反斜杠,故本文用/代替.



fjmingyang - by - 13 十一月, 2007 14:54

From: http://www.cnblogs.com/fjchenq/archive/2007/08/06/845076.html

一.简单批处理内部命令简介

1.Echo 命令

打开回显或关闭请求回显功能,或显示消息。如果没有任何参数,echo 命令将显示当前回显设置。

语法:

echo [{on│off}] [message]
Sample:@echo off / echo hello world

 查看全文


fjmingyang - by - 11 十一月, 2007 22:47

From: http://tolywang.itpub.net/post/48/287344

dbms_stats包问世以后,Oracle专家可通过一种简单的方式来为CBO收集统计数据。目前,已经不再推荐你使用老式的分析表和dbms_utility方法来生成CBO统计数据。那些古老的方式甚至有可能危及SQL的性能,因为它们并非总是能够捕捉到有关表和索引的高质量信息。CBO使用对象统计,为所有SQL语句选择最佳的执行计划。

 查看全文


fjmingyang - by - 02 十一月, 2007 11:27

ORA-25153: Temporary Tablespace is Empty

想起前几天重建了控制文件,才导致tempfile丢失,重新把tempfile加进去就可以了

SYS>select * from v$tempfile;

no rows selected

SYS>alter tablespace temp2 add tempfile 'd:oracleoradatatestdbtemp01.dbf' reuse

Tablespace altered.



fjmingyang - by - 02 十一月, 2007 10:45

C:Documents and Settingsmingyang_chen>exp userid=cmy/cmy file=g:test.dmp log=
g:test.log rows=n indexes=y direct=y recordlength=65535

遇到如下错误>>

 查看全文


fjmingyang - by - 29 十月, 2007 13:32

Mingyang: 今天有一个未接来电076921736710,不知道哪里的区号,google一下,东莞的区号,在搜索结果中,无意中看到一个关于谨防骗子的标题,点击一看,这个电话号码竟在黑名单里面!骗子的来电!

全文摘录如下:

 查看全文


fjmingyang - by - 28 十月, 2007 22:59

情况描述

客户报告数据库故障,新来的系统管理员误操作。删掉了一些文件。具体情况是:删掉了所有重要数据文件、所有控制文件。数据库原来是归档模式,用rman备份数据,而rman 使用控制文件。幸运的是,最后一次 rman full 备份是包括了控制文件在内。系统没有设定自动备份控制文件。现在状况是数据库无法启动。

不用说,客户的备份方案不够完善,但是这时候再去说这些话责备用户有事后诸葛亮之嫌,"用户是上帝,不要去得罪他"。还有,客户有Full备份(虽然不是自动备份控制文件,这样无法用常规的恢复步骤来进行恢复)。这对我们来说是个绝对的好消息。

下面我们通过一次模拟操作来演示这个问题的解决办法。

 查看全文


fjmingyang - by - 28 十月, 2007 22:00

SQL> alter database mount;
alter database mount
*
ERROR at line 1:
ORA-00201: controlfile version 10.1.0.2.0 incompatible with ORACLE version
10.0.0.0.0
ORA-00202: controlfile: 'E:ORACLEPRODUCT10.1.0ORADATAORCLCONTROL01.CTL' 查看全文


fjmingyang - by - 26 十月, 2007 19:41

From: http://logzgh.itpub.net/post/3185/42513

scn号与oracle数据库恢复过程有着密切的关系,只有很好地理解了这层关系,才能深刻地理解恢复的原理,从而才能很好地解决这方面的问题。

一。SCN与CHECKPOINT
CKPT进程在checkpoint发生时,将当时的SCN号写入数据文件头和控制文件,同时通知DBWR进程将数据块写到
数据文件。
CKPT进程也会在控制文件中记录RBA(redo block address),以标志Recovery需要从日志中哪个地方开始。

与checkpoint相关的SCN号有四个,其中三个存在控制文件中,一个存放在数据文件头中。
这四个分别是:
1.System Checkpoint SCN
当checkpoint完成后,ORACLE将System Checkpoint SCN号存放在控制文件中。
我们可以通过下面SQL语句查询:
select checkpoint_change# from v$database;

2.Datafile Checkpoint SCN
当checkpoint完成后,ORACLE将Datafile Checkpoint SCN号存放在控制文件中。
我们可以通过下面SQL语句查询所有数据文件的Datafile Checkpoinnt SCN号。
select name,checkpoint_change# from v$datafile;

3.Start SCN号
ORACLE将Start SCN号存放在数据文件头中。
这个SCN用于检查数据库启动过程是否需要做media recovery.
我们可以通过以下SQL语句查询:
select name,checkpoint_change# from v$datafile_header;

4.End SCN号
ORACLE将End SCN号存放在控制文件中。
这个SCN号用于检查数据库启动过程是否需要做instance recovery.
我们可以通过以下SQL语句查询:
select name,last_change# from v$datafile;

在数据库正常运行的情况下,对可读写的,online的数据文件,该SCN号为NULL.

 查看全文


fjmingyang - by - 26 十月, 2007 18:10

1. Read the Data Block.

2. Read the Row Header.

3. Check the Lock Byte to determine whether there's an ITL entry.

4. Read the ITL entry to determine the Transaction ID (Xid).

5. Read the Transaction Table using the Transaction ID. If the transaction has been committed and has a System Commit Number less than the query's System Change Number, update the status of the block (block cleanout) and start over at step 1.

6. Read the last undo block (Uba).

7. Compare the block transaction ID with the transaction table transaction ID. If the Transaction ID in the undo block doesn't equal the Transaction ID from the Transaction Table, then issue ORA-1555, Snapshot Too Old.

8. If the Transaction IDs are identical, make a copy of the data block in memory. Starting with the head undo entry, apply the changes to the copied data block.

9. If the tail undo entry (the actual first undo entry in the chain, or the last in the chain going backwards!) indicates another data block address, read the indicated undo block into memory and repeat steps 7 and 8 until the undo entries don't contain a value for the data block address.

10. When there's no "previous data block address," the transaction has been completely undone.

11. If the undo entry contains:

a. a pointer to a previous transaction undo block address, read the Transaction ID in the previous transaction undo block header and read the appropriate Transaction Table entry. Return to step 5.

b. an ITL record, restore the ITL record to the data block. Return to step 4.
 查看全文


fjmingyang - by - 24 九月, 2007 11:42

Solaris性能监控的Swap空间管理

作者:Solaris社区 来源:Solaris社区

随着电子商务如火如荼的开展,网站服务器的性能变得尤其重要。一旦服务器的能力不能满足用户的需要,就会对用户的服务大打折扣,那么就需要对服务器进行升级扩容。但是,有些时候只需对服务器进行一些适当的性能调整,便可以越过性能的瓶颈,大大提高服务器的吞吐能力,从而减少服务器升级的费用。

  本文介绍了在Solaris平台上Swap(交换)空间的基本概念、实现的原理以及对Swap(交换)空间进行监控的方法和调整的策略。

  什么是SWAP(交换)空间

  对于一般的Solaris系统管理员来说,很少会接触Swap(交换)空间,在他们看来Swap区只不过是磁盘上的一两个分区或是几个Swap(交换)文件,当系统没有足够的物理内存来处理当前进程的时候,就利用Swap(交换)空间作为虚拟内存的临时存储空间,这种说法从技术角度来说是没有错的,但 Solaris在实现Swap时有其非常独特的地方。

 查看全文


fjmingyang - by - 20 九月, 2007 16:24

有时候在客户端xp编写的文本上传到solaris服务器后,回车符会变成^M(具体原因不详,notepad文件都会,editplus文件有时会),很是烦人,处理方法有两种:

1、 sed 's/^M//g' test.sh > a.txt

( 注意:^M的输入方法为:Ctrl+v+m )

2、 cat test.sh | tr -d '15' > a.txt

删除后如果要去掉多余的空行: sed '/^$/d' test.sh > a.txt



fjmingyang - by - 04 九月, 2007 09:25

在itpub上看到一个帖子,清楚介绍了raid1+0 与raid0+1的区别,摘录如下

http://www.itpub.net/845548,2.html

RAID 0+1: We stripe together drives 1, 2, 3, 4 and 5 into RAID 0 stripe set "A", and drives 6, 7, 8, 9 and 10 into RAID 0 stripe set "B". We then mirror A and B using RAID 1. If one drive fails, say drive #2, then the entire stripe set "A" is lost, because RAID 0 has no redundancy; the RAID 0+1 array continues to chug along because the entire stripe set "B" is still functioning. However, at this point you are reduced to running what is in essence a straight RAID 0 array until drive #2 can be fixed. If in the meantime drive #9 goes down, you lose the entire array.
RAID 1+0: We mirror drives 1 and 2 to form RAID 1 mirror set "A"; 3 and 4 become "B"; 5 and 6 become "C"; 7 and 8 become "D"; and 9 and 10 become "E". We then do a RAID 0 stripe across sets A through E. If drive #2 fails now, only mirror set "A" is affected; it still has drive #1 so it is fine, and the RAID 1+0 array continues functioning. If while drive #2 is being replaced drive #9 fails, the array is fine, because drive #9 is in a different mirror pair from #2. Only two failures in the same mirror set will cause the array to fail, so in theory, five drives can fail--as long as they are all in different sets--and the array would still be fine.
Clearly, RAID 1+0 is more robust than RAID 0+1. Now, if the controller running RAID 0+1 were smart, when drive #2 failed it would continue striping to the other four drives in stripe set "A", and if drive #9 later failed it would "realize" that it could use drive #4 in its stead, since it should have the same data. This functionality would theoretically make RAID 0+1 just as fault-tolerant as RAID 1+0. Unfortunately, most controllers aren't that smart. It pays to ask specific questions about how a multiple RAID array implementation handles multiple drive failures, but in general, a controller won't swap drives between component sub-arrays unless the manufacturer of the controller specifically says it will.

The same impact on fault tolerance applies to rebuilding. Consider again the example above. In RAID 0+1, if drive #2 fails, the data on five hard disks will need to be rebuilt, because the whole stripe set "A" will be wiped out. In RAID 1+0, only drive #2 has to be rebuilt. Again here, the advantage is to RAID 1+0.



fjmingyang - by - 17 八月, 2007 15:44

/usr/dt/bin/dtlogin

如果要阻止启动时自动登陆图形界面

/usr/dt/bin/dtconfig -d 禁用

/usr/dt/bin/dtconfig -e 启用



fjmingyang - by - 15 八月, 2007 14:08

早晨被雨声吵醒,醒来天已大亮,误以为迟到,心中一惊。幸好时间还早,倒头接着睡,直到被闹钟吵醒,匆忙洗漱后,看这雨丝毫没有要停的意思,忽大忽小,怎么去上班呢?骑车?打的?搭公交?犹豫了一下还是决定骑车撑伞。在出小区的路上,看到不少和我一样“志同道合”的兄弟姐妹,更是深受鼓舞,庆幸作了一个“明智”的选择。哪知途中风雨交加,骑至空旷处,狂风更加肆虐,吹得手中的扇摇摇晃晃,手也是握得隐隐生疼,无奈只得下车徒步牵行一段,此刻才意识到困难远比想象中的大。所幸的是上班没有迟到,不幸的是成了半只“落汤鸡”(下半身湿透了)。然而我所高兴的是 I make it !



fjmingyang - by - 15 八月, 2007 11:58

analyze table t compute statistics = analyze table t compute statistics for table for all indexes for all columns

for table的统计信息存在于视图:user_tables 、all_tables、dba_tables

for all indexes的统计信息存在于视图: user_indexes 、all_indexes、dba_indexes

for all columns的统计信息存在于试图:user_tab_columns、all_tab_columns、dba_tab_columns

当analyze table t delete statistics 会删除所有的statistics

 查看全文


fjmingyang - by - 12 七月, 2007 15:33

#sudo smbmount //servername/sharedir /mnt/share -o username=xxx,password=xxx

or

# sudo mount -t smbfs -o username=tridge,password=foobar //fjall/test /data/test

You may come across the following problem:

cli_negprot: SMB signing is mandatory and we have disabled it.
22538: protocol negotiation failed
SMB connection failed

The cause of the problem is the default security policy on Windows 2003 Server being set to always encrypt network connections under all circumstances. Whilst this is fine for most clients (especially Windows clients, understandably), the version of SMB that you uses doesn’t support encrypted connections. Apparently this support exists in Samba 3, but not on the version Hoary uses. The solution is to change the security policy to use encryption when it’s available and not otherwise. Here's how.

 查看全文


fjmingyang - by - 09 七月, 2007 15:37

每隔10天的11:40运行date命令,在Linux下可以写成:

40 11 */10 * * date

40 11 1,11,21,31 * * date

但在Unix下只能用第二种写法



博客日历
« 七月 2008 »
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
搜索
管理控制台
TOP_Read
TOP_Reply
文章分类
MY's Stories[7]
Solaris[17]
Linux[6]
Oracle[36]
Others[10]
新闻聚合
RSS 0.90
RSS 1.0
RSS 2.0
Atom 0.3