Solved

sql command not propery ended in the spool file output

Posted on 2008-10-11
2
484 Views
Last Modified: 2013-12-18
Hi
I am using spool to run the statement
select ' grant SELECT, INSERT, UPDATE, DELETE ' || ' on DBSEC.'|| table_name || ' to DBSEC_SUPERVISOR_ROLE ' || ';'    
from dba_tables where owner = 'DBSEC' ;

but the output spool file not generating the statements in one line (limiting to 80 characters along with spaces). I am getting the error since the statement is braking into two. give me the solution please
0
Comment
Question by:ravalireddy
2 Comments
 
LVL 42

Accepted Solution

by:
dqmq earned 250 total points
Comment Utility
set linesize 1000
0
 
LVL 31

Assisted Solution

by:awking00
awking00 earned 250 total points
Comment Utility
Rather than creating a spool file, then executing it, why not do as attached?
run-grants.txt
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Case Statement in SQL Delminted Query 9 55
levels for reporting 5 48
Oracle Subquery bad Join 11 41
File generation using utl_file 4 28
Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now