Skip to main content

Posts

Showing posts from October, 2011

restore for db_unique_Name

when restoring oracle spfile, I get the following error. RMAN> set dbid=1170383141 executing command: SET DBID database name is "PROD" and DBID is 1170383141 RMAN> run 2> { 3> allocate channel t1 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo_rman_p7_ibms_prod.opt)'; 4> restore spfile; 5> restore controlfile; 6> } allocated channel: t1 channel t1: sid=27 devtype=SBT_TAPE channel t1: Data Protection for Oracle: version 5.4.1.0 Starting restore at 24-OCT-2011:15:37:55 released channel: t1 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of restore command at 10/24/2011 15:37:55 RMAN-06758: DB_UNIQUE_NAME is not unique in the recovery catalog query the rman catalog database to verify that there are multiple db_unique_name sh

ORA_RMAN_SGA_TARGET

assume that we lost all the files of oracle database but we do have rman backup, when trying to bring up a dummy database before restore start, I get this error. RMAN> startup nomount force; WARNING: cannot translate ORA_RMAN_SGA_TARGET value startup failed: ORA-01078: failure in processing system parameters ORA-01565: error in identifying file '+DATA/PROD/spfilePROD.ora' ORA-17503: ksfdopn:2 Failed to open file +DATA/PROD/spfilePROD.ora ORA-15056: additional error message ORA-17503: ksfdopn:DGOpenFile05 Failed to open file +DATA/prod/spfileprod.ora ORA-17503: ksfdopn:2 Failed to open file +DATA/prod/spfileprod.ora ORA-15173: entry 'spfileprod.ora' does not exist in directory 'prod' ORA-06512: at line 4 starting Oracle instance without parameter file for retrival of spfile RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =================================

powershell collect sql server information

#* FileName: ServerInventory.ps1 #*============================================================================= #* Script Name: [ServerInventory] #* Created: [12/14/07] #* Author: Jesse Hamrick #* Company: PowerShell Pro! #* Email: #* Web: http://www.powershellpro.com # Modified by : jiulu sun # Modified at : Oct 28th, 2010 # usage : CTV IT managed sqlservers # How to use : run powershell, type $PathOf\filename.ps1>outputfilePath and file, it will loop all servers in file d:cvb\Computers.txt # you need to change executionpolicy first if its at restricted mode. or you will get an error # "File C:\vb\sqlserver_info1.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_sig # ning" for more details." # this is an example # PS C:\vb> Get-ExecutionPolicy # Restricted # PS C:\vb> set-executionpolicy remotesigned # PS C:\vb> Get-ExecutionPolicy # RemoteSigned #

kill MSAS session

sometimes BPC server has some dead loop mdx query that run a few hours, make the server cpu 90% busy, and active thread is more than 9. to identify those dead loop mdx sessions, run the following mdx query. select session_connection_id,session_user_name, session_start_time ,session_last_command_start_time as cmd_start_time,session_last_command_end_time as cmd_end_time, session_last_command_elapsed_time_ms as cmd_elapsed_time_ms,session_idle_time_ms,session_last_command FROM $SYSTEM.DISCOVER_SESSIONS pay attention to those that have 0 session_idle_time_ms and big cmd_elapsed_time_ms, pick up there connection_id and kill them. to kill the sesion, run (Cancel xmlns="http://schemas.microsoft.com/analysisservices/2003/engine") (ConnectionID) replace_with_id_number (/ConnectionID) (/Cancel)