OK
Thanks karluk - what you say makes sense. It's just for testing so I'll live with applying just 1 log file. (once I work out how to script it)
Cheers, Chris
This is probably a very basic question so apologies for asking.
I'm cloning my live database. I have files from a hot backup (we don't use RMAN). I create a text copy of the control file, edit it accordingly & run it. I then get the reply "Control file created" which looks good.
I can...
Thanks for the responses chaps. ... ruby ... perl ... it's all a bit much for me. I'll stick with good old sed :-)
Star for feherke as I used his suggestion but thanks again to both.
I'm curious to hear what people think about tbe best way to edit files automatically in a script.
I'm making edits to a number of lines in a file (10+ lines need changing). It's straightforward editing which never varies so it's easy to do but what method would you use?
The way I'm doing it...
Thanks for the reply feherke
Unfortunately I'm getting
sed: command garbled: /^STARTUP NOMOUNT/,/^;/{p;/q}
I'm on Solaris 10. What exactly should
{p;/^;/q}
do? I'm guessing it's:
p - print
/^;/q - don't print after the semi-colon
That's what I'm aiming for anyway.
Cheers, Chris
I want to automatically edit the file produced from an Oracle database by running this:
alter database backup controlfile to trace;
so that I only get the first definition of the control file - i.e. the first part that begins
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "OUT_DATABASE"...
I want to copy a certain picture (photo) from one sheet to another depending on the value of a variable. So if the variable = 1 then I copy Picture 1 if it's 2 I copy Picture 2 etc.
I have this to copy a hardcoded picture:
Sub CopyOnePicture()
Dim wsSource As Worksheet
Dim wsDest As...
It works! Thank you annihilannic. I had tried $1 but had not previously surrounded it by single quotes. When the script looks like this:
#!/bin/ksh
##
##
## set oracle variables up
ORACLE_SID=cflive
ORA_NLS10=/cfldbap/oracle/product/10.2.0/nls/data...
Sorry - I should have added that I'd already tried that:
$ ./test_sql param1
++++++
param1
++++++
SQL*Plus: Release 10.2.0.4.0 - Production on Thu Sep 10 09:08:35 2009
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release...
I want to run a script with a parameter & then pass the parameter to some sql code in the script. I've spent a long time looking on the web & none of the suggestions I can find works:
Here's a simplified version of the script called test_sql:
#!/bin/ksh
##
##
## set oracle variables up...
Sorry - should have said - it's Solaris 9.
There's a stat function but no OS command (I don't want to try writing a program to do this) & PHV - I assume these are flags to the ls command? My version of ls doesn't offer the -T option.
Looks like I can't get it directly from the OS - thanks anyway
If a file is older than 6 months ls -l doesn't show the time it was accessed. I assume this information is still held against the file - is there any way I can get it?
Thanks, Chris
Have tried again and yes they (the sqlplus & the child process) are running at a lower priority. But I still suspect it's affecting the users more than I would have hoped.
I'm curious to find out so I'm running it now (during the day) anyway & I'll see if anyone complains (probably not what a...
Thanks for the reply hoinz. I wasn't aware of the -l flag to ps (or the PRI & NI values) - I'll give it another go & confirm that it's trying to run it at a lower priority anyway.
Any more comments welcome.
Does anyone have any comments about using nice to decrease the priority of running sqlplus?
I need to run a PL/SQL program which is quite processor intensive – I can run it at night when I won’t affect users but I’d like to run it during the day. I’ve tried using nice but my (very cursory)...
I have a file which consists of repeated field values on separate lines. I want to convert it so that the values are on the same line separated by a pipe char (& then a new line for each new record). e.g. my original file is
4
The Beatles
Liverpool
5
The Rolling Stones
London
3
The Who...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.