All Questions
Tagged with sql oracle-database
8 questions
0
votes
1
answer
63
views
Pass Linux variable in Oracle script
How to pass Linux variable in Oracle code?
I need to pass it in below format and it should not ask for "enter a value for 1:"
Please advise.
mount='/u08/dbname/'
sqlplus -s "/ as sysdba&...
0
votes
1
answer
445
views
How do I write SQL to fetch strings that begin with % in Oracle?
Could someone please assist on how to fetch the data in SQL for all the strings starting with %%string?
I tried below to escape %% but it didn't work
SELECT * FROM Tablename WHERE host LIKE ‘[%][%]%’...
1
vote
1
answer
1k
views
Convert 2 HTML file output from SQL query into 1 main HTML output file in shell script
In shell script, I used 2 different SQL query & output of these 2 files in HTML format like (eg- ab.html, cd.html). Shell script as ->
#/bin/ksh
ab=$(SQLPLUS -s <username>/<password>@...
0
votes
1
answer
8k
views
How to get result of SQL query in shell script with same format that when we run on Oracle SQL developer/Toad/PLSQL developer
In shell script I am using SQL query.
#/bin/ksh
var=$(sqlplus -s <user>/<password>@DB <<EOF
set heading on
set trimspool off
set linesize 200
set feedback ...
2
votes
3
answers
231
views
Prevent Script from Inserting Space in File Name
I have an Oracle database table that is storing the full path and name of a file in a table column. In a SQL client I can run:
select file_name from table where request_id=12345
and I will get this ...
-2
votes
1
answer
264
views
Delete remotely oracle schema using shell script [closed]
I have a remote instance like database-ora12 with existing user tester / password and SID=orac
How I can delete remotely database or schema from this system for this user using shell script without ...
-1
votes
1
answer
64
views
Pick Values From A Oracle Select Query
I have executed the below command (Part of a 2 step procedure required for password reset when we face the error ORA-28007).
SQL> select USER#,NAME,PASSWORD FROM user$ where name='TESTUSER';
...
4
votes
2
answers
16k
views
Insert to Oracle table in a loop
Requirement: In one server in a directory multiple files are present. I need to read the file names and populate into a Oracle table.
I have written the script like this, but its not working:
#!/bin/...