Youry's Blog

Youry's Blog

Archive for the ‘Database Management Systems (DBMS)’ Category

Oracle Scripts

leave a comment »

  • Cold Backup

I’ve use scripts from internet with my modifications for our local servers. It’s for myself and my colleagues only to help with day-to-day activity.

at the first I prefer to use a short path to the local folder which keeps necessary scripts. I use c:\scripts

good link is here: http://toolkit.rdbms-insight.com/cold_backup_scr.php

She has a copyright, but because she wrote:

“You will have to create two additional files, shutdown.sql and startup.sql — see comments in the second scipt. You will also need to precreate the backup log and, of course, customize the directories and SID for your system.”  “Note: Proofread any scripts before using. Always try scripts on a test instance first. I’m not responsible for any damage, even if you somehow manage to make my scripts corrupt every last byte of your data, set your server on fire and serve you personally with an eviction notice from your landlord!

I assume I have a right to correct her script for my configuration with appropriate credits for her work. If anybody has any problem with the updated script, please let me know. I’ll be happy to remove the updated script from this blog and to write my own. This is only to save my time, because I already wrote a lot of other scripts in the past, but I’ve lost many of them as well.

--------CUT-----------Updated by YK ------------------CUT---------------------

REM make_cold_backup.sql
REM copyright 2001-2004 N Roshak, updated by YK on Sun Vov 4, 2012
REM this is a sql script to generate a DOS backup script

rem YK's correction
connect / as sysdba
set heading off
set pagesize 0
set echo off
set feedback off
set verify off
set linesize 500
col mything for a500
spool C:\scripts\cold_backup.bat
prompt REM Script to take full cold database backup
prompt REM generated by make_cold_backup_scr.sql
prompt REM does not back up tempfiles
prompt REM
REM updated by YK
prompt set oracle_home=C:\ORACLE\PRODUCT\10.2.0
prompt set backup_dir=Y:\klo-sciora-1_backup\coldSCI254Backup
REM corrected by YK on Nov. 4th, 2012
select distinct 'copy ' || leaf
|| ' %backup_dir%' || substr(leaf,instr(leaf,'\',-1,1), length(leaf))
as  cmdstr
from
(select name as LEAF from v$datafile
union
select name from v$controlfile
union
select member from v$logfile)
/
prompt REM Copy init.ora and pwd files
prompt copy %oracle_home%\db_1\database\SPFILESCI254.ORA %backup_dir%\SPFILESCI254.ORA
prompt copy %oracle_home%\db_1\database\PWDsci254.ora %backup_dir%\PWDsci254.ora
spool off
exit

--------CUT-----------------------------CUT---------------------

REM backup.bat
REM this is a DOS batch script
REM to take a full cold backup
REM copyright 2002-2004 N Roshak, updated by YK on Nov 4th, 2012

REM requires two sql scripts in addition to the above sql script:
REM shutdown.sql (connect / as sysdba, shutdown immediate, exit)
REM startup.sql (connect / as sysdba, startup open, exit)

set oracle_home=C:\ORACLE\PRODUCT\10.2.0\db_1
set script_dir=c:\scripts
set shutdown=%script_dir%\shutdown.sql
set startup=%script_dir%\startup.sql
set scriptgen=%script_dir%\sci254ColdBackup.sql
set log=%script_dir%\backup.log

echo >> %log%
echo ----------BEGIN FULL COLD BACKUP OF DB---------- >> %log%
date /T >> %log%
time /T >> %log%
echo Generating cold backup script... >> %log%
%oracle_home%\bin\sqlplus /nolog @%scriptgen%

date /T >> %log%
time /T >> %log%
echo Shutting down... >> %log%

%oracle_home%\bin\sqlplus /nolog @%shutdown%

echo Backing up... >> %log%
call %SCRIPT_DIR%\cold_Backup.bat >> %log% 2>&1

echo Starting up... >> %log%
%oracle_home%\bin\sqlplus /nolog @%startup%

date /T >> %log%
time /T >> %log%
echo Succesfully completed. >> %log%
echo -----------END FULL COLD BACKUP OF DB----------- >> %log%

--------CUT-----------------------------CUT---------------------
Advertisements

Written by youryblog

November 4, 2012 at 5:49 PM

Database research, conferences and papers

leave a comment »

http://web.mit.edu/newsoffice/2012/making-crowdsourcing-easier.html

Interesting paper about crowdsourcing:

Making crowdsourcing easier

A new system for crowdsourcing database operations spares the user from worrying about the computational details but improves cost effectiveness. Larry Hardesty, MIT News Office
“Crowdsourcing is a technique for farming out labor-intensive tasks over the Internet by splitting them into small chunks that dozens, hundreds or even thousands of people complete at their desks for a few cents each.”
And this paper is very interesting as well: http://web.mit.edu/newsoffice/2012/making-web-applications-more-efficient-0831.html

Making Web applications more efficient

A new system that automatically streamlines database access patterns can make large Web applications up to three times as fast.

Larry Hardesty, MIT News Office

“Most major websites these days maintain huge databases: Shopping sites have databases of inventory and customer ratings, travel sites have databases of seat availability on flights, and social-networking sites have databases of photos and comments. Almost any transaction on any of these sites requires multiple database queries, which can slow response time.”

Written by youryblog

September 8, 2012 at 3:02 PM

The Best Small Business Accounting Software

leave a comment »

By: Jeffrey L. Wilson 05.13.2010
Ideally every small business would have a full time accountant to manage the books. In reality, most business owners are on their own. Fortunately, accounting software makes managed your businesses finances easier than ever. We tested all the major players, and tell you the best way to keep track of your money.
http://www.pcmag.com/article2/0,2817,2363725,00.asp

Written by youryblog

May 15, 2010 at 12:56 AM

Oracle grid computing and cloud computing

leave a comment »

Oracle grid computing and cloud computing: Special report
By Shayna Garlick, Associate Editor
25 Mar 2010 | SearchOracle.com
http://searchoracle.techtarget.com/news/2240017004/Oracle-grid-computing-and-cloud-computing-Special-report?
As cloud computing soars in popularity, it leaves us with the questions — where does grid computing fit in? How are they different? While there isn’t always an obvious answer, and each technology may have different meanings for different people, having a clear understanding of grid computing and cloud computing in Oracle is important. In this special report, we take a look at the definition of grid computing and cloud computing, how they compare to other technologies such as clustered computing, how grid computing and cloud computing are used in Oracle and the future of their adoption.

Written by youryblog

May 13, 2010 at 9:37 AM

How to determine your SQL database through needs analysis

leave a comment »

13 Nov 2009 | Frank Ohlhorst, SearchOracle.com Contributor

Taking the frustration out of picking the right SQL database: A guide to evaluating database offerings from Oracle, IBM and Microsoft.

While there are many players in the enterprise database market, most IT managers have to choose among three primary vendors: Microsoft with SQL Server, IBM with DB2, and Oracle with 11g. According to the Gartner Group, Oracle captured 33.8% of the database market last year, up from 31.4% the previous year. Next was IBM, maintaining a steady 30% share of database sales. A distant third with a 13.9% share was Microsoft with SQL Server, mainly because SQL Server is available only on Windows-based systems, while the products of its two archrivals cater to a variety of platforms.

Written by youryblog

November 26, 2009 at 9:38 AM