sqlserver 使用全备和增备 还原数据库
1,还原全备的时候,“选项”选项里面1)勾选覆盖现有数据库(with replace)。2)不对任何数据库执行操作,不回滚未提交事务。 2,还原增备和普通的一样。
sqlserver连接oracle
1,在服务器对象中新增"链接服务器"2,输入连接服务器名称"test",选择“其他数据源”3,访问接口选择“oracle provider for OLE DB” 产品名称输入"oracle" 数据源输入tnsnames.ora中的连接字符串,如:"primary"4,安全性里选择“使用此安全上下文建立连接” &nb...
sqlserver 2005 客户端连接出现 error:40
sqlserver 2005 客户端连接出现 error:40 sqlserver 2005 -->配置工具 --> sqlserver configuration manager中 sqlserver 2005 网络配置 的 mssqlserver的协议的 via的状态调整为 "已禁用" 即可。
oracle临时表
C:\Users\wlcsp>sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on 星期日 12月 22 09:52:41 2013Copyright (c) 1982, 2010, Oracle. All rights reserved.连接到:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit ProductionWith the Partitioning, OLAP, Data M...
需要使用临时段的操作
create index ...select .... order by ..select distinct ...select .... group byselect ...unionselect ...intersectselect ...minusunindex join,subquery以上操作都有可能会使用temp segmentorder by ,group by ,distinct 有可能会使用两个temp segment....
expdp/impdp transport_tablespace
expdp/impdp transport_tablespace[@more@][oracle@primary ~]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Mon Nov 18 13:07:45 2013Copyright (c) 1982, 2009, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> alter tablespace wlcsp read only;Tablespace altered.[oracle@primary ~]$ expdp system/wlcsp123 directory=temp_dir dumpfile=wlcs
impdp network_link
impdp network_link[@more@]C:Userswlcsp>sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on 星期一 11月 18 11:49:50 2013Copyright (c) 1982, 2010, Oracle. All rights reserved.连接到:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> grant create database link to wlcsp;授权成功。SQL> conn wlcsp/wlcsp123已连接。SQL> create database link primary connect to wlcsp identified
RAC执行root.sh报libcap.so.1: cannot open shared object file
装oracle11.2.0.3 RAC,执行root.sh的时候,出现了如下错误:[@more@]Failed to create keys in the OLR, rc = 127, Message: /opt/app/11.2.0/grid/bin/clscfg.bin: error while loading shared libraries: libcap.so.1: cannot open shared object file: No such file or directory 执行如下操作,就可以在此执行root.sh了[root@rac1 ~]# cd /lib64[root@rac1 lib64]# ls libcap*libcap-ng.so.0 libcap-ng.so.0.0.0 libcap.so.2 libcap.so.2.16[root@rac1 lib64]# ln -s libcap.so.2.16 libcap.so.1 [root@rac2 lib64]# ln -s libcap
vmware workstation创建虚拟共享磁盘
vmware workstation创建虚拟共享磁盘[@more@]c:Program FilesVMwarevmware workstation>vmware-vdiskmanager.exe -c -s 8000Mb-a lsilogic -t 2 "C:vmdatarac-sharediskdata01VixDiskLib: Invalid configuration file parameter. Failed to read configurationfile.Creating disk 'C:vmdatarac-sharediskdata01' Create: 100% done.Virtual disk creation successful.c:Program FilesVMwarevmware workstation>vmware-vdiskmanager.exe -c -s 6000Mb-a lsilogic -t 2 "C:vmdatarac-sharediskfra01VixDiskLib: Invalid c
asm createdisk时提示没有权限
[root@rac1 ~]# /etc/init.d/oracleasm createdisk data01 /dev/sdb1Marking disk "data01" as an ASM disk: [FAILED][@more@][root@rac1 ~]# more /var/log/oracleasmInstantiating disk: oracleasm-instantiate-disk: Unable to create ASM disk "DATA01": Permission deniedfailed 出现这个需要将selinux disable掉[root@rac1 ~]# more /etc/selinux/config# This file controls the state of SELinux on the system.# SELINUX= can take one of these three values:# enforcing - SE
ORA-0131:Insufficient privileges.(DEBUG CONNECT SESSION)
ORA-0131:Insufficient privileges.Note:Debugging requires the DEBUG CONNECT SESSION system privileges[@more@]后经查找,是缺失 DEBUG CONNECT SESSION 系统权限所致。解决办法:以SYS用户登录数据库,执行赋权操作: SQL> grant DEBUG CONNECT SESSION to user_name; 不需要赋予DEBUG ANY PROCEDURE 也可以的。 SQL> conn / as sysdba; Connected. SQL> select * from role_sys_privs where privilege like 'DEBUG%' order by 2; ROLE PRIVILEGE ADM ---------------- -------------------
RAC中删除特定instance的session
单实例session可以直接通过v$session和v$locked_object两个视图就可以kill。[@more@]select distinct 'ALTER SYSTEM KILL SESSION '''||b.sid||', '||b.serial#||''';' from v$locked_object a,v$session b where a.session_id=b.sid 但是这个不能删除RAC中session alter system kill session 的语法: The KILL SESSION clause lets you mark a session as terminated, roll back ongoing transactions, release all session locks, and partially recover session resources. To use this clause, your instance must have the databa
利用msmtp+mutt 发送mail
利用msmtp+mutt 发送mail[@more@]首先下载msmtp-1.4.27.tar.zip压缩包[root@primary opt]# unzip msmtp-1.4.27.tar.zip[root@primary opt]# tar -xvf msmtp-1.4.27.tar.bz2[root@primary opt]# cd msmtp-1.4.27[root@primary msmtp-1.4.27]# ./configure --prefix=/opt/msmtp --with-ssl=openssl[root@primary msmtp-1.4.27]# make[root@primary msmtp-1.4.27]# make install[root@primary msmtp-1.4.27]# cd ..[root@primary opt]# lltotal 620drwxr-xr-x 4 root root 4096 Oct 22 13:53 msmtpdrwxr-xr-x 8 1000 1000 4096 Oct 22 13:53
redhat 6.4 安装oracle11g RAC 安装RDAC
linux安装oracle RAC的时候,挂载lun的时候,需要安装多路径软件RDAC,具体步骤如下:[@more@]下载package的地址为: http://support.netapp.com/NOW/public/apbu/oemcp/ 1,安装需要的package:tar -zxvf rdac-LINUX-09.03.0C05.0652-source.tar.gzcd linuxrdac-09.03.0C05.0652/2,之后需要make,make install,但是缺少package,所以需要使用yum 安装kernel-devel,gcc之类的包yum install kernel-develyum install gcc*3,需要在rdac解压目录中执行如下步骤makemake install4,make install之后根据提示修改/boot/efi/EFI/redhat/grub.conf中
Linux安装Oracle 11g Grid Infrastructure 出现OUI-10182错误解决
已确保安装的ORACLE_BASE目录是属于grid:oinstall但安装时总是报:OUI-10182 The effective user ID does not match the owner of the file ..........--------------------------------------------------- 解决方法:用root帐户在/etc下建立文件oraInst.loc,并写入以下内容:inventory_loc=/home/app/oraInventoryinst_group=oinstall重新执行安装程序即可。==这个问题自己遇到了,然后在网上百度到的解决方法.[@more@]
yum安装
yum安装[@more@]mount /dev/cdrom /mnt修改mv /etc/yum.repos.d/rhel-debuginfo.repo /etc/yum.repos.d/wlcsp.repo修改wlcsp.repo的配置入下:[root@primary yum.repos.d]# more wlcsp.repo #[rhel-debuginfo][rhel-wlcsp] name=Red Hat Enterprise Linux $releasever - $basearch - Debug #baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/$basearch/Debuginfo/ baseurl=file:///mnt/Server enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-g
linux下删除oracle11g
linux下删除oracle11g[@more@] 1: 停数据库 SQL*Plus: Release 11.2.0.3.0 Production on Mon Apr 9 15:22:13 2012 Copyright (c) 1982, 2011, Oracle. All rights reserved. Enter user-name: /as sysdba Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> 2: 停监听和
Oracle 数据库12c 16大新特性总结
http://tech.it168.com/a2013/0802/1516/000001516310.shtml (转)[@more@]
ORA-00845: MEMORY_TARGET not supported on this system
[root@XY-EMPIDB ~]# su - oracle[@more@][oracle@XY-EMPIDB ~]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Mon May 27 15:09:48 2013Copyright (c) 1982, 2009, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL>SQL> show parameter memoryNAME TYPE VALUE------------------------------------ -----
ORA-00704,ORA-39700
今天在恢复数据库的时候,出现如下错误:SQL> recover database until cancel using backup controlfile;ORA-00279: change 714627217 generated at 07/01/2013 13:07:34 needed for thread1ORA-00289: suggestion : /mnt/db1/arch/1_1600_799170678.dbfORA-00280: change 714627217 for thread 1 is in sequence #1600[@more@]Specify log: {=suggested | filename | AUTO | CANCEL}cancelMedia recovery cancelled.SQL> alter database open resetlogs 2 ;alter database open resetlogs*ERROR at li