Sponsored Content
Top Forums Shell Programming and Scripting perl script for generates a report for backup times Post 302470714 by prakashoracledb on Thursday 11th of November 2010 12:02:19 AM
Old 11-11-2010
Hi,

oracle >more testdb.begin
---------------------------------------------------------------------------
11/10/10-02:47:30 --- testdb --- Beginning hot backup...
---------------------------------------------------------------------------
/mounts/testdb_data/oradata/testdb/dbfiles/system01.dbf
/mounts/testdb_data/oradata/testdb/dbfiles/sysaux01.dbf
/mounts/testdb_data/oradata/testdb/dbfiles/undotbs01.dbf
/mounts/testdb_data/oradata/testdb/dbfiles/users.dbf
/mounts/testdb_data/oradata/testdb/dbfiles/tools.dbf
/mounts/testdb_data/oradata/testdb/dbfiles/mpidata01.dbf
/mounts/testdb_data/oradata/testdb/dbfiles/redo01.log
/mounts/testdb_data/oradata/testdb/dbfiles/redo02.log
/mounts/testdb_data/oradata/testdb/dbfiles/redo03.log
/mounts/testdb_data/oradata/testdb/dbfiles/control01.ctl
/mounts/testdb_temp/oradata/testdb/tmpfiles/temp01.dbf
GROUP# THREAD# SEQUENCE# MEMBERS STATUS
---------- ---------- ---------- ---------- ----------------
1 1 601 1 INACTIVE
2 1 602 1 INACTIVE
3 1 603 1 CURRENT
Switching logfile...
System altered.

---------------------------------------------------------------------------
11/10/10-02:47:44 --- testdb --- Running: Alter database begin backup.
---------------------------------------------------------------------------

Database altered.
6 files out of 6 are in backup mode.
oracle >more testdb.end
---------------------------------------------------------------------------
11/10/10-03:15:29 --- testdb --- Finishing hot backup...
---------------------------------------------------------------------------

---------------------------------------------------------------------------
11/10/10-03:15:32 --- testdb --- Running: Alter database end backup.
---------------------------------------------------------------------------

Database altered.
0 files out of 6 are in backup mode.
Backing up control file to trace...
admindir = /u01/app/oracle/admin
udumpdir = /u01/app/oracle/admin/testdb/udump
Database altered.
a /u01/app/oracle/admin/testdb/udump/testdb_lgwr_11077.trc 6K
a /u01/app/oracle/admin/testdb/udump/testdb_ora_19457.trc 2K
a /u01/app/oracle/admin/testdb/udump/testdb_ora_27106.trc 4K
Switching logfile...
System altered.

Copying logs to arch_hold...
Cleaning up old logs in arch_hold
Attempting to tar files created during the hot backup ...
oracle >pwd
/u01/app/oracle/backup/usadc-0001/log

bold marked timestamp i need to capture

appreciated your help
Thanks
Prakash

---------- Post updated at 11:41 PM ---------- Previous update was at 11:40 PM ----------

any sample script for this please
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

backup report script

Hi , Let me know how to write a script that runs a <a backup command> to check the backups of a particular client from the last_night & today' dates and print the out. (2 Replies)
Discussion started by: new2prog
2 Replies

2. UNIX for Advanced & Expert Users

A Program Which Generates a Script Which Kills It

I have a C++ program, running on Fedora Linux, which has to be able to update itself to a new version, which it can obtain from a server. The way I do this is to have it create a shell script which kills it (the parent process), uninstalls it, downloads the new version (actually it does this... (1 Reply)
Discussion started by: BrandonShw
1 Replies

3. Shell Programming and Scripting

Help with perl mysql backup script

Hi, im trying to make a script that backups mysql databases but apparently I am having trouble with the variables, or simply something I am missing. Would appreciate any help, here is the script #!/usr/bin/perl -w use strict; require File::Spec; #VARIABLES my $databasename =... (4 Replies)
Discussion started by: Fireline
4 Replies

4. Solaris

How to find out the script which generates the file in solaris/unix ?

Hi A file is generated/created/modified during installation (or) execution of a script. vice versa..How to find out which script is responsible for creating/modifying a file. Example:- ....An existing file ( hosts.ulcm ), this file is created or modified by running a script ( may be... (1 Reply)
Discussion started by: frintocf
1 Replies

5. Shell Programming and Scripting

Help in modifying existing Perl Script to produce report of dupes

Hello, I have a large amount of data with the following structure: Word=Transliterated word I have written a Perl Script (reproduced below) which goes through the full file and identifies all dupes on the right hand side. It creates successfully a new file with two headers: Singletons and Dupes.... (5 Replies)
Discussion started by: gimley
5 Replies

6. Shell Programming and Scripting

Print one's place for 1 to N times, ksh Perl whatever?

Hello all, I would like to create a for loop or whatever is quick that will print the one’s place of a number for 1-N times say for example a printed page formatting is 132 characters wide, I would like a single line 123456789012345678901234567890... ...012 That is 132 characters long. I... (11 Replies)
Discussion started by: KmJohnson
11 Replies

7. Shell Programming and Scripting

Report generation using perl script

Hi, I have a perl script to read the log file and create a report from it. I have the script file and log file in a different directories. Now i have pipe the log file data to the perl script to create the report (HMTL file). I am using the below command this isn't working tail -f... (4 Replies)
Discussion started by: vel4ever
4 Replies

8. UNIX for Dummies Questions & Answers

I need perl script on cold backup in Oracle 10 g

Hi , I am new to Perl script.Can u please provide me perl scripts for the following: 1. Perl script on Cold backup in Oracle 10g 2.Perl script on Hot backup in Oracle 10g (0 Replies)
Discussion started by: Niharika Srivas
0 Replies

9. UNIX for Dummies Questions & Answers

Script that automatically generates HTML

hi I have a script with HTML code and am currently generating the html page everytime using genWebsite.sh > startPage.html Is it possible to have a loop at the begining of the script to run this command every minute so an updated HTML page is displayed or could someone suggest an alternative... (2 Replies)
Discussion started by: scriptnewbie
2 Replies
sqlsharp(1)						      General Commands Manual						       sqlsharp(1)

NAME
sqlsharp - Mono SQL Query command-line tool SYNOPSIS
sqlsharp [-f filename] [-o filename] [-s] DESCRIPTION
sqlsharp is a Mono SQL tool used for entering SQL queries to a database using Mono data providers. OPTIONS
The following options are supported: -f filename Output file to load SQL commands from. -o filename Output file to send results. -s Silent mode. HOW TO USE
The SQL tool accepts commands via its command line interface. Commands begin with a backslash followed by the command name. Example: open Basically, there are five commands a user should know: provider, connectionstring, open, quit, and help To connect to a database, you need to do the following: 1. set your data provider via provider Example: SQL# provider mysql 2. set your connection string via connectionstring Example: SQL# connectionstring Database=test 3. open a connection to the database via open Example: SQL# open CONNECTION AND PROVIDER COMMANDS
These commands are used to setup the provider, connection string, and open/close the database connnection ConnectionString Sets the Connection String Example: SQL# ConnectionString Database=testdb or SQL# cs Database=testdb For more examples, see section CONNECTION STRING EXAMPLES. Provider Sets the Provider of the Data Source. For list of Providers, see section PROVIDERS. Example: to set the provider for MySQL: SQL# provider mysql or SQL# p mysql Note: if you need to load an external provider in SQL#, see the SQL# command loadextprovider ListProviders List ADO.NET 2.0 Providers available Example: SQL# ListProviders or SQL# listp BCS Prompts you for building each connection parameter and builds the connection string and also allows you to enter a password wich does not echo. Example: SQL# cs ConnectionString Option: Data Source [] SQL# blazer ConnectionString Option: Persist Security Info [False] SQL# ConnectionString Option: Integrated Security [False] SQL# ConnectionString Option: User ID [] SQL# scott Password: ***** ConnectionString Option: Enlist [False] SQL# ConnectionString Option: Pooling [True] SQL# ConnectionString Option: Min Pool Size [0] SQL# ConnectionString Option: Max Pool Size [100] SQL# ConnectionString Option: Unicode [False] SQL# ConnectionString Option: Load Balance Timeout [0] SQL# ConnectionString Option: Omit Oracle Connection Name [False] SQL# ConnectionString is set. LoadExtProvider ASSEMBLY CLASS to load an external provider. Use the complete name of its assembly and its Connection class. Example: to load the MySQL provider Mono.Data.MySql SQL# loadextprovider Mono.Data.MySql Mono.Data.MySql.MySqlConnection Open Opens a connection to the database Example: SQL# open Close Closes the connection to the database Example: SQL# close Default show default variables, such as, Provider and ConnectionString. Example: SQL# defaults Q Quit Example: SQL# q SQL EXECUTION COMMANDS
Commands to execute SQL statements e execute SQL query (SELECT) Example: to execute a query SQL# SELECT * FROM EMPLOYEE SQL# e Note: to get e to automatically work after entering a query, put a semicolon ; at the end of the query. Example: to enter and exectue query at the same time SQL# SELECT * FROM EMPLOYEE; exenonquery execute a SQL non query (not a SELECT) Example: to insert a row into a table: SQL# INSERT INTO SOMETABLE (COL1, COL2) VALUES('ABC','DEF') SQL# exenonquery Note: this can be used for those providers that are new and do not have the ability to execute queries yet. exescalar execute SQL to get a single row and single column. Example: to execute a Maxium aggregate SQL# SELECT MAX(grade) FROM class SQL# exescalar exexml FILENAME to execute SQL and save output to XML file Example: SQL# SELECT fname, lname, hire_date FROM employee SQL# exexml employee.xml Note: this depends on DataAdapter, DataTable, and DataSet to be working properly FILE COMMANDS Commands for importing commands from file to SQL# and vice versa f FILENAME to read a batch of SQL# commands from file Example: SQL# f batch.sql# Note: the SQL# commands are interpreted as they are read. If there is any SQL statements, the are executed. o FILENAME to write result of commands executed to file. Example: SQL# o result.txt load FILENAME to load from file SQL commands into SQL buffer. Example: SQL# load commands.sql save FILENAME to save SQL commands from SQL buffer to file. Example: SQL# save commands.sql GENERAL PURPOSE COMMANDS
General commands to use. h show help (all commands). Example: SQL# h s TRUE, FALSE to silent messages. Example 1: SQL# s true Example 2: SQL# s false r reset or clear the query buffer. Example: SQL# print show what's in the SQL buffer now. Example: SQL# print SH VARIABLES WHICH CAN BE USED AS PARAMETERS Commands to set variables which can be used as Parameters in an SQL statement. If the SQL contains any parameters, the parameter does not have a variable set, the user will be prompted for the value for each missing parameter. set NAME VALUE to set an internal variable. Example: SQL# set sFirstName John unset NAME to remove an internal variable. Example: SQL# unset sFirstName variable NAME to display the value of an internal variable. Example: SQL# variable sFirstName PROVIDER SUPPORT OPTIONS
Enable or Disble support for a particular provider option UseParameters TRUE,FALSE to use parameters when executing SQL which use the variables that were set. If this option is true, the SQL contains parameters, and for each parameter which does not have a SQL# variable set, the user will be prompted to enter the value For that parameter. Example: SQL# useparameter true Default: false UseSimpleReader TRUE,FALSE to use simple reader when displaying results. Example: SQL# usesimplereader true Default: false. Mostly, this is dependent on the provider. If the provider does not have enough of IDataReader implemented to have the normal reader working, then the simple reader can be used. Providers like SqlClient, MySQL, and PostgreSQL have this ption defaulting to true. PROVIDERS
PROVIDER NAME NAMESPACE ASSEMBLY oracle Oracle 8i-11g System.Data.OracleClient System.Data.OracleClient postgresql NetPostgreSQL Npgsql Npgsql bytefx ByteFX MySQL ByteFX.Data.MySqlClient ByteFX.Data sqlclient MS SQL 7-2008 System.Data.SqlClient System.Data odbc ODBC System.Data.Odbc System.Data sqlite SQL Lite Mono.Data.SqliteClient Mono.Data.SqliteClient sybase Sybase Mono.Data.SybaseClient Mono.Data.SybaseClient firebird Firebird SQL FirebirdSql.Data.FirebirdSql FirebirdSql.Data.Firebird mysql MySQL AB MySql.Data.MySqlClient MySql.Data NOTES: Ngsql is the .Net Data Provider for PosgreSQL. The latest verison can be downloaded from http://npgsql.projects.postgresql.org/ MySql.Data is the MySQL Connector/Net for connecting to MySql databases. For MySQL, it is strongly recommend to use MySql.Data instead of the old ByteFX.Data provider. Unfortunately, MySql.Data is not included with Mono. You can download the latest MySQL Connector/Net from MySQL AB at http://dev.mysql.com/downloads/ FirebirdSql.Data.Firebird can be downloaded from here: http://www.firebirdsql.org/index.php?op=files&id=netprovider CONNECTION STRING SAMPLES
Example connection strings for various providers to be used via the command ConnectionString Example of usage: connectionstring Database=testdb Connection String examples: Microsoft SQL Server via System.Data.SqlClient Server=DANPC;Database=pubs;User ID=saPassword=; For Integrated Security, bear in mind that Mono is not integrated with Windows, SQL Server client nor server, nor Windows Server. Therefore, you must provide the Windows Domain name and domain user name and password for this user. Server=DANPC;Database=pubs;User ID=DOMAINser;Password=pass;Integrated Security=SSPI For a server locally, you can use localhost. ODBC via System.Data.Odbc provider using a DSN named "MSSQLDSN" I set up in the Windows control panel's ODBC Data Sources which connects to Microsoft SQL Server 2000: DSN=MSSQLDSN;UID=danmorg;PWD=freetds To use ODBC ON Unix, consider unixODBC from http://www.unixodbc.org/ or use iODBC from http://www.iodbc.org/ SQL Lite via Mono.Data.SqliteClient provider which connects to the database file SqliteTest.db; if not found, the file is created: URI=file:SqliteTest.db Oracle via System.Data.OracleClient Data Source=testdb;User ID=scott;Password=tiger If you prefer to not use a tnsnames.ora file, you can use a connection string which allows a TNS network description that is parentheses delimited like the following which has the host, port, and service name. For host, you can specify an IP address instead of a hostname. User ID=SCOTT; Password=TIGER; Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.101)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=TESTDB))) Npgsql (.NET PostgreSQL) from http://gborg.postgresql.org/project/npgsql/projdisplay.php Server=localhost;Database=test;User ID=postgres;Password=fun2db ByteFX (ByteFX MySQL) from Please use MySql.Data instead. Server=localhost;Database=test;User ID=mysql;Password= FirebirdSql via FirebirdSql.Data.Firebird (download latest form FirebirdSql.org) Database=C:FIREBIRDEXAMPLESEMPLOYEE.FDB;User=SYSDBA;Password=masterkey;Dialect=3;Server=localhost MySQL via (MySql.Data) MySQL Connector/Net from http://www.mysql.com/ Server=localhost;Database=test;User ID=mysql;Password=mypass;Pooling=false TRACING SUPPORT
No support for tracing right now. AUTHORS
The Mono SQL Query Tool was written by Daniel Morgan <monodanmorg@yahoo.com> LICENSE
The Mono SQL Query Tool is released under the terms of the GNU GPL. Please read the accompanying `COPYING' file for details. Alternative licenses are available from Novell or Daniel Morgan. BUGS
To report bugs in the compiler, you can use `bug-buddy', or you can file bug reports in our bug tracking system: http://bugzilla.ximian.com. MAILING LISTS
For details, visit: http://lists.ximian.com/mailman/listinfo/mono-devel-list WEB SITE
For details, visit: http://www.mono-project.com SEE ALSO
mono(1) 9 September 2008 sqlsharp(1)
All times are GMT -4. The time now is 01:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy