Home » Archive

Articles in the Administration Category

Administration, Backup Recovery, Oracle »

[23 Nov 2009 | No Comment | 244 views]

Your database has to be in archive log mode for this script to work.
Code:

RMAN> run {
2> # backup the database to disk
3> allocate channel d1 type disk;
4> backup
5> full
6> tag full_db
7> format ‘/backups/db_%t_%s_p%p’
8> (database);
9> release channel d1;
10> }

Administration, Backup Recovery, Oracle »

[23 Nov 2009 | No Comment | 253 views]

This script will backup all the datafiles using the RMAN utility reducing the cost of resources.
Code:
resync catalog;
run {
allocate channel c1 type disk;
copy datafile 1 to ‘C:\rman1.dbf’;
copy datafile 2 to ‘C:\rman2.dbf’;
copy datafile 3 to ‘C:\rman3.dbf’;
copy datafile 4 to ‘C:\rman4.dbf’;
copy datafile 5 to ‘C:\rman5.dbf’;
}
exit
echo exiting after successful hot backup using RMAN

Administration, Backup Recovery, Oracle »

[23 Nov 2009 | No Comment | 184 views]

This script will perform datafile recovery
Code:
RMAN> run {
2> allocate channel d1 type disk;
3> sql “alter tablespace users offline immediate”;
4> restore datafile 5;
5> recover datafile 5;
6> sql “alter tablespace users online”;
7> release channel d1;
8> }

Backup Recovery »

[23 Nov 2009 | No Comment | 2,061 views]

rman target sys/change_on_install nocatalog
  run {
     allocate channel t1 type disk;
     # set until time ‘Apr 17 2004 22:11:51′;
     restore tablespace user;
     recover tablespace user;
     release channel t1;
  }

Administration, MS SqlServer, MS SqlServer Code, Tips Scripts »

[23 Nov 2009 | No Comment | 603 views]

These scripts have been created to set up a peer to peer system.
The settings I’ve used:

Login:
PAULSDOMAIN\Administrator

Password:
password

Database name:
peertopeerPublisher

Table with PK:
PITest

Server1
HOME-SERVER

Server2 
HOME-SERVER\FIRSTINSTANCE

You’ll need to create an identically named database on 2 servers (called peertopeerPublisher for me) or on a default and a named instance (this is because the publication names must be identical, so we can’t do this on the same instance). After that you’ll need to enable distribution on each server and publishing of the database. This is much the same as before, albeit in a different part of the GUI. There …

Backup Recovery »

[23 Nov 2009 | No Comment | 200 views]

rman target sys/change_on_install nocatalog
  run { 
     allocate channel t1 type disk;
     backup 
        format ‘/backup/full_backup/%d_t%t_s%s_p%p’
            ( database 
            release channel t1;
}