All Questions
21 questions
0
votes
2
answers
128
views
Load files in sequential order
I need to load multiple files in my shell script with the same filename but appended in the front of each file name is YYMMDDPERSONNEL
Examples: 231102PERSONNEL and 230103PERSONNEL
There are many ...
-1
votes
1
answer
78
views
Why no one thought of the concept of joins before the 70s? [closed]
So, let me see if I have my history right:
In 1976, the first system sold as an RDBMS was Multics Relational Data Store. I don't know if it had JOIN, but let's assume it did.
The UNIX command join ...
0
votes
2
answers
9k
views
How to write a shell script to run a sql query and send the query results in table format in email?
I need to run a SQL query using SHELL script in PUTTY and send the results in email body in table format with headers along with a message line on top.
I have written this so far but I am not able to ...
0
votes
0
answers
131
views
filewatcher script in ksh script
I wanted to edit a already created filewatcher script with the given logic
the source file path is stage path (stage/filewatcherwrap.ksh)
there are 4 files in the below given format in stage path
...
1
vote
3
answers
177
views
Regular expression - SQL manipulation
[pol@fedora data]$ lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: Fedora
Description: Fedora release 34 (Thirty Four)
Release: 34
Codename: ThirtyFour
I'm ...
0
votes
0
answers
270
views
making sqlcmd self-contained so it would be possible to run without installation, for CentOs
I am trying to make a bash script to connect to remote SQL server with sqlcmd
in the devp machine, as I have admin privileges, runs smoothly
but I NEED (and capitals because it is imperative) to build ...
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&...
1
vote
1
answer
3k
views
SQL Server Connection Failed with Linux Mint + SQL Server 2008 R2 using any client
I am trying to connect to my SQL Server 2008 R2 with SP4 database, however, I got this error and I have tried some solutions that I found here, but none works for me.
PS. I do not know exactly how to ...
0
votes
1
answer
1k
views
How to fetch Data of Previous date in shell script?
Kindly refer the script below.
#!/usr/bin/bash
#scirpt to connect with db
master_db_user=''
master_db_passwd=''
master_db_port='3306'
master_db_host=''
master_db_name='uppcldashboard'
Now=$(date +"...
0
votes
2
answers
3k
views
sqlplus doesn't work in Crontab
/oracle/GR1/121/bin/sqlplus / as sysdba <<EOF >> $LOGFILE
whenever sqlerror exit sql.sqlcode;
set echo on;
set serveroutput on;
STARTUP;
EXIT
EOF
Already tried it with the path, but it ...
0
votes
1
answer
715
views
To print log file with out put of cron job scheduled for a sql block - with Date and time (all the executions of cron)
I have a shell script which executes a pl/sql block, I'm printing output to output file but it's not keeping old information and not displaying time and date when the script was executed.
My script ...
0
votes
1
answer
305
views
How to extract Oracle DML (insert,update) queries from a dump file?
Example:
$cat data.txt
SCN THREAD OPERATION ID OBJECT ID OBJECT NAME REPLICATE OPERATION SQL
------------- ------- ------...
0
votes
1
answer
327
views
REGEX search & replace with sed or other command
I have a big SQL file with content like
[code language="bash"]
git checkout master
git pull origin master
...
[/code]
Lorem ipsum dolor sit amet, consectetur adipiscing elitUt enim ad minim
[code]...
1
vote
2
answers
60
views
Finding and extracting immediate characters
I have a file with some SQLs and I want to find out the fields that have cast by using shell scripting.
For example, I have a file abc.txt with the below sql
SELECT field1,field2,field3,field4,cast(...
0
votes
1
answer
559
views
Running a Python that calls a SQL in BASH W10
Trying to run this Python file python pid_info.py 12345 which looks like
#!/usr/bin/env python
import subprocess
import sys, getopt
# add if -b or -e then look for username/email like etc...
# ...
3
votes
0
answers
4k
views
How to Install and run python and database over busybox
I purchased a a WiFi server terminal which runs Busybox and only comes with a http web implementation which pops up once you connect to the WiFi. I'd like to support for SQL (or some variation) and ...
-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';
...
8
votes
1
answer
6k
views
KrbException: Fail to create credential. (63) - No service creds
I am working on setting up Tomcat 8.0.35 on Ubuntu 16.04 with Oracle Java 1.8.0_91-b14 (not openjdk) to use Kerberos authentication when authenticating to our Microsoft SQL database. The issue I am ...
2
votes
1
answer
12k
views
Cannot run test program while cross compiling - cross compiling Firebird
I've tried to compile firebird server for arm linux, with cross-compiler (it's choosen - it's working properly).
When using:
./autogen.sh --host=arm-linux-gnu
I get this error:
checking for ...
0
votes
1
answer
992
views
FreeTDS missing encryption support to connect to MS SQL
I'm running a Gentoo Linux and I'm trying to connect to MS SQL via pyodbc using freetds.
I enabled the debug log in freetds. Now when I try to connect I'm seeing this:
18:13:00.841828 13523 (net.c:...
0
votes
2
answers
1k
views
Awk one-liner to print column of SQL table?
Suppose I have table like:
This is first line
name minimum maximum config_value
----------------------------------- ----------- ----------- ------------
some ...