sid是什么文件类型

sid是什么文件类型,第1张

SID是局悉唯一身份编号。用来标识用户身份的。存在在本地SAM数据库中。这个库默认连管理员都没权读的。只有SYSTEM完全控制的。

打个比方我们能修改管理员的帐号。态腊败那修改前和修改过以后系统怎么识别你还是不是管理员呢?其实就是看SID号的。所以SID永不重复。就算你重新安装部分SID号还是不一样的。

而2000/XP以后帆颤的系统对SID的依赖比较高。明显的是对注册表、NTFS、EFS(加密文件)等都是依靠SID的。简单的GHOST只复制了系统中的SID。而另外分区上的可能被记录的SID没有被复制。所以恢复以后可能会造成访问失败。

用SYSPREP可以把系统中的SID号清掉。这样恢复以后系统会自动重新生成。

SAM库在XP可以这样打开:

REGEDIT

HKEY_LOCAL_MACHINE\SAM\SAM

这时候你看不到任何东西的。按上次的方法给自己权限。右键权限。给管理员组FULL CONTROL就能看到SID等信息。SID很长的。比如:

S-1-5-21-1177238915-1767777339-839522115

可以修改的,步骤如下:

1、修改实例名(sid)

1.1、检查原来的数据库实例名(sid)

oracle@oracle[/home/oracle]>echo $ORACLE_SID

orcl

oracle@oracle[/home/oracle]>sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Sun Dec 20 11:14:49 2009

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

sys@ORCL>select instance from v$thread

INSTANCE

--------------------------------------------------------------------------------

orcl

1.2、关闭数据库

注意不能用陵盯shutdown abort,只能是shutdown immediate或shutdown normal

sys@ORCL>shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

sys@ORCL>exit

Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

1.3、修改oracle用户的ORACLE_SID环境变量,如由orcl修改为ybbe

1.4、修改/etc/oratab文件,将sid名由旧的修改为新的,如从orcl修改为ybbe

可省略,只要确认好ORACLE_SID就可以了

1.5、进入到$ORACLE_HOME/dbs目录

将所有文件名中包含原来的sid的修改为对应的新sid的

如我对如下文件修改为其后对应的尺配和文件

hc_orcl.dat->hc_ybbe.dat

lkORCL->lkYBBE

orapworcl->orapwybbe

snapcf_orcl.f->snapcf_cnhtm.f

spfileorcl.ora->spfilecnhtm.ora

cd $ORACLE_HOME/dbs

orapwd file=orapwybbe password='ybbe' entries=5 force=y

可以用次命令进行对上面的文件进行自动生成

1.6、使新修改的ORACLE_SID环境变量生效

oracle@oracle[/oracle/app/10.1/dbs]>. ~/.bash_profile

oracle@oracle[/oracle/app/10.1/dbs]>echo $ORACLE_SID

cnhtm

1.7、重建口令文件

因为口令文件改名后不能在新实例中使用,所以重建

oracle@oracle[/oracle/app/10.1/dbs]>orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=oracle entries=5 force=y

oracle@oracle[/oracle/app/10.1/dbs]>ls -lrt orapw*

-rw-r----- 1 oracle oinstall 2048 Dec 20 11:27 orapwybbe

1.8、启动数据库

oracle@oracle[/oracle/app/10.1/卖笑dbs]>sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Sun Dec 20 11:29:53 2009

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to an idle instance.

idle>startup

ORACLE instance started.

Total System Global Area 167772160 bytes

Fixed Size 1218292 bytes

Variable Size 62916876 bytes

Database Buffers 96468992 bytes

Redo Buffers 7168000 bytes

Database mounted.

Database opened.

1.9、检查数据库实例名

通过如下语句检查数据库实例名,发现实例名已经由orcl变成ybbe

idle>select instance from v$thread

INSTANCE

--------------------------------------------------------------------------------

ybbe


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/tougao/12300947.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-24
下一篇 2023-05-24

发表评论

登录后才能评论

评论列表(0条)

保存