Home » Infrastructure » Unix » View creation script is copying data to log file (merged) (oracle DB 19c)
View creation script is copying data to log file (merged) [message #684301] Tue, 04 May 2021 08:30 Go to next message
adfnewbie
Messages: 54
Registered: January 2016
Member
Hi Experts,

I am trying to compile a view in UNIX using sqlplus and generating the log for it. Issue is that instead of giving "view created" message in log, entire data that is returned by view query is getting copied to log file which is making the log file huge.

Steps that I am doing are as follows:

1. Place the view creation script on UNIX folder (xx_order_history.vw)
2. Created an sql file (compile.sql) which has this command - @/path/xx_order_history.vw
3. Create shell script (compile_views.sh) with below contents

#!/bin/sh
sqlplus -s apps/<pwd> << EOF
@$XX_TOP/install/compile/compile.sql
Quit
EOF

4. Execute the below command on UNIX after connecting to sqlplus

sh compile_views.sh>compilation_log.txt

My requirement is that only the status/result of compilation should be printed in log and not the data for the view select statement.
Kindly advise.

View creation script is copying data to log file [message #684302 is a reply to message #684301] Tue, 04 May 2021 08:30 Go to previous messageGo to next message
adfnewbie
Messages: 54
Registered: January 2016
Member
Hi Experts,

I am trying to compile a view in UNIX using sqlplus and generating the log for it. Issue is that instead of giving "view created" message in log, entire data that is returned by view query is getting copied to log file which is making the log file huge.

Steps that I am doing are as follows:

1. Place the view creation script on UNIX folder (xx_order_history.vw)
2. Created an sql file (compile.sql) which has this command - @/path/xx_order_history.vw
3. Create shell script (compile_views.sh) with below contents

#!/bin/sh
sqlplus -s apps/<pwd> << EOF
@$XX_TOP/install/compile/compile.sql
Quit
EOF

4. Execute the below command on UNIX after connecting to sqlplus

sh compile_views.sh>compilation_log.txt

My requirement is that only the status/result of compilation should be printed in log and not the data for the view select statement.
Kindly advise.

Re: View creation script is copying data to log file (merged) [message #684303 is a reply to message #684301] Tue, 04 May 2021 10:46 Go to previous message
Michel Cadot
Messages: 67997
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Michel Cadot wrote on Tue, 07 July 2020 16:51
...

Once more:


Michel Cadot wrote on Tue, 07 July 2020 14:38

...In another topic you have been asked to format your post:

Michel Cadot wrote on Mon, 29 August 2016 18:14

From your previous topic:

Michel Cadot wrote on Tue, 07 June 2016 18:25

...
please read How to use [code] tags and make your code easier to read.
Your answer:

adfnewbie wrote on Tue, 07 June 2016 18:46
Thanks! It was a simple one so didn't bother to do the formatting! Will do all the time from now on!

Thanks again!
...
You still do not bother to format, this is having no regard for us.

Your answer:


adfnewbie wrote on Tue, 07 July 2020 16:58
I apologize for the format.
...

You still do not bother to format.
Previous Topic: How to start if sqlloader fails inside shell script
Goto Forum:
  


Current Time: Tue Oct 19 11:04:29 CDT 2021