Questions tagged [unix]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
25 views

Independently checking if PostgreSQL server and client are installed

How can I independently determine whether the PostgreSQL server and client are installed in the Unix-based system? I believe running psql --version checks only for the PostgreSQL client. Is postgres --...
user avatar
  • 115
1 vote
1 answer
21 views

Mysql 8 which linux / Unix Distro would have better performance (2021 topic) [closed]

I want to setup a mysql 8 with MyRocks engine and BUILD from source with my custom parameters. Is there any recommendation on which linux / unix distro would have better performances ? CentOS stream ...
user avatar
  • 113
1 vote
0 answers
18 views

UNIX timestamp using for storing logs

Would it be feasible to use UNIX timestamp as a primary key to store log records/analytics data of users? Will there be inconsistencies if a RDBMS is used to store log data?
user avatar
1 vote
2 answers
55 views

count duplicate records and select first 2

I have troubling issue where I want to only select the first 2 chunks of every dbspace created. query used: SELECT a.dbsnum, b.chknum, a.name, b.fname FROM sysdbspaces a, syschunks b where a.dbsnum = ...
user avatar
0 votes
1 answer
35 views

How can I list all the tablespaces without getting into each instance?

I got around 98 instances in a single AIX server. I need to list all the tablespaces, their path and usage. Is there a way I can do that without getting into each instance, connecting into the ...
user avatar
  • 1
0 votes
0 answers
86 views

AIX Oracle 11g db hangs on startup

ENV: AIX 7.1 Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bitNo RAC, No PDB. (Pretty plain-vanilla) We recently had an outage of some of our Oracle AIX environments. After the servers ...
user avatar
  • 315
0 votes
0 answers
260 views

Import table data using multiple sql file in psql

Local Machine(l1): Windows 10 psql Remote Machine(R1): linux EDB(postgres) On my local I have 1000+ sql script containing insert statement . psql is also installed locally . I need to run this sql ...
user avatar
-2 votes
1 answer
387 views

How to resolve error "SQL0104N" when running "db2 prune logfile prior to" command?

I wrote an script to delete transaction log files in db2. I need to delete all the files prior to the active log file.I wrote this code as .sh file db2 connect to DWHDB db2 get db cfg | grep '/...
user avatar
2 votes
1 answer
587 views

How to insert multiple IP addresses in a pg_hba.conf file via unix shell script?

I need to write some IP addresses to the pg_hba.conf file of my Postgresql, in order to allow remote access from those IP to my machine. I have the following code in shell script to do that for a ...
user avatar
  • 47
0 votes
2 answers
26 views

Fetching wrong results on comparing a variable with 0 in unix

I have the following code in unix #!/bin/bash user=$1 username=$user'%' DB_name=$2 userpwd=$4 export PGPASSWORD=$3 psql -h localhost -U postgres -d $DB_name -At -c "SELECT COUNT(*) AS ...
user avatar
  • 47
1 vote
1 answer
57 views

Sybase query: How can I sort the extraction (by well formed columns)

community I built a Sybase query statement in a script (using the isql command/line ) below is the code: My script contains: isql -U databasename_dba -P password <<EOF! select ...
user avatar
0 votes
1 answer
45 views

how can I divide log files for specific DB queries?

Currently my db has a couple of triggers for some (not all) tables that get executed when a specific number of columns has been updated. I keep track if the triggers for those rows on a boolean column ...
user avatar
  • 103
2 votes
1 answer
81 views

Compute Leap Seconds

I use PostgreSQL 11 and have two columns. One is unix timestamp which is not aware of leap seconds and an utc timestamp which is aware of leap seconds. Is there a way either to find the number of ...
user avatar
  • 196
1 vote
1 answer
598 views

Unlock user shell script for Oracle

We have so many user ID locks from the front-end users. We need to provide a shell script to the user which they can run on OS level and unlock the ID themselves when the DBA is not present. The sys ...
user avatar
0 votes
3 answers
270 views

Error while exporting data to flat file from database using sqlplus in UNIX

Trying to export data from a table to .dat file in a unix script using the SPOOL command. However on execution only ~17k data is exported to file out of 91K data with an error in end of the file : ...
user avatar
  • 1
0 votes
0 answers
505 views

How to know if SQLite3 is still running or it is crash?

I have an SQL command that insert data into a table by joining data from several tables. The command started working at 13:25:05 on 2018-01-14. And now, 15:56 on 2018-01-15, it's still not yet ...
user avatar
1 vote
1 answer
255 views

Automation approach to executing Shell scripts and performing checks on an Oracle DB

I am in the process of producing an automation framework that will: Check Oracle tables for entries, such as IDs and status numbers Log onto a UNIX box via Putty and switch to a directory where the ...
user avatar
1 vote
1 answer
1k views

sqlplus works specifying the parameters but fails when using tnsnames.ora

I've been turning google upside down and couldn't find an answer. I can connect to my oracle instance like this: sqlplus 'myuser@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=msoracle.cnujcn8mkxea.us-...
user avatar
1 vote
2 answers
4k views

Mongodb not listening on all interface

Infrastructure : I have 3 virtual machines ip in a DMZ on a same lan. one of them is running mongodb . OS : RHEL Mongod.conf : I have commented out the bindIP option But still mongodb is not ...
user avatar
1 vote
1 answer
917 views

how to execute unix commands within nzsql?

I'm converting a script from Teradata to Netezza, and I'm stuck at the portion where BTEQ uses the functionality of the OS to check if a file contains any data. If it does, it is deleted. I want to ...
user avatar
0 votes
2 answers
6k views

Connecting to SQL Server from R which is Running on Remote UNIX Machine

We have a UNIX machine which includes R engine on it and installed SQL Server ODBC Driver 11. We need to connect R to SQL Server. SQL Server currently works on another machine, so we tried to connect ...
user avatar
11 votes
3 answers
29k views

Execute system commands in postgresql

My requirement is to execute a system command like (ls) or C program when a trigger executes. Is there any way to create a trigger function to solve this problem.
user avatar
  • 273
1 vote
2 answers
482 views

How to get readonly access to mysql files via g+w permission 750 or 640?

The data-dir itself has permissions 700 thereby limiting access to the mysql user. I want other folks who I add to the mysql group to be able to read binlogs and download the *.frm, *.MYI, *.MYD ...
user avatar
2 votes
2 answers
206 views

I want to change oracle "homedir" how to do?

A good link as answer is ok. I want to change "homedir" or "basedir" of oracle db from /oracle to /var/oracle. How to do? I have set the oracle unix variables($ORACLE_HOME,$ORACLE_BASE) with the new ...
user avatar
  • 183
2 votes
1 answer
948 views

How to use a variable date when running a db2 command in a shell script?

I need to use a date variable in a select, like bellow, but I'm getting this error: Expected tokens may include: "". SQLSTATE=42601 How can use these variables in a shell script? day0_T1=`TZ=CST+...
user avatar
  • 21
0 votes
1 answer
1k views

Determine Which Hard Drive the Database-Files/Transaction-Files are Stored

I have posted the following question in another forum. I was told that this problem is related to Sybase (something to do with our likely use of raw partitions). That's why I re-post this question ...
user avatar
  • 83
0 votes
1 answer
195 views

Unix timestamp conversion

How can I output my Unix timestamps to human readable GMT? SELECT category ,fullname ,shortname ,idnumber ,startdate ,visible ,timecreated ,...
user avatar
  • 3
4 votes
1 answer
1k views

Can't get Dell PE T420 (Perc H710) perform better than a MacMini with PostgreSQL

It's months that I'm trying to solve a performance issue with PostgreSQL. SYSTEM CONFIGURATION Our deployment machine is a Dell PowerEdge T420 with a Perc H710 RAID controller configured in this way:...
user avatar
  • 656
22 votes
1 answer
36k views

What limits the number of connections?

As per https://devcenter.heroku.com/articles/heroku-postgres-legacy-plans the connection limit is 500 As per https://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server "Generally, PostgreSQL on ...
user avatar
0 votes
1 answer
718 views

How to call the unix Sendmail from oracle

I know that is possible to send mails using the oracle-db by UTL_SMTP, and there are several examples of such usage everywhere. My question is: Can I call the GNU/Unix/Linux Sendmail to perform a ...
user avatar
  • 103
2 votes
1 answer
8k views

Amazon RDS - Can't connect to MySQL database server?

So I've been working on this issue for a while now, and I'll explain what I'm trying to do. I'm trying to connect to a MySQL database server, hosted by Amazon Web Services in the Amazon RDS service. ...
user avatar
2 votes
2 answers
4k views

Oracle's UTL_FILE when connected locally or through listener has different behaviour

We have a procedure which creates a CSV file with UTL_FILE. (env is Oracle 11.2.0.1 and RHEL 6.4) Until now, we were storing that CSV file into system oracle (the oracle owner) user home (/home/oracle/...
user avatar
  • 659
5 votes
1 answer
1k views

Does the mysql parameter "max_connections" apply for unix socket connections?

The documentation does not specify if max_connections apply only to TCP connections. The way it is said, it looks like it does apply for any kind of connection, but I'd like to be sure because ...
user avatar
  • 183
0 votes
0 answers
896 views

mysql died with stack trace

My mysql server died while running select queries. Status of every table is good. When I went to the error log I found this: Thread pointer: 0x2ab63e0f49e0 Attempting backtrace. You can use the ...
user avatar
1 vote
1 answer
262 views

MySQL on Unix, should administrator accounts join the operating system "mysql" group?

When I install MySQL via Yum, it automatically creates the mysql operating system user and group. Then mysqld executes as mysql (instead of as root), and all the files in the data directory are owned ...
user avatar
5 votes
2 answers
4k views

How do you find home information for Oracle RAC on Unix?

Need help finding Oracle home path corresponding to a database instance in RAC environment. I am aware of few of the ways to achieve the same. Listing them below to avoid the same answers. /etc/...
user avatar
2 votes
4 answers
2k views

Shell: How to time a script running in SQLPlus and kill it after x amount of minutes?

I have a little tool which automatically runs a series of SQL scripts when and outputs to .XLS when an appropriate request is made. However, some SQL scripts need to be ran on a live database, and I ...
user avatar
  • 123
1 vote
1 answer
5k views

Delete shared memory segments left over by an Oracle instance

We're using Oracle Enterprise 11rR2 running on Solaris. How can I delete/remove allocated shared memory segments using ipcrm? I'm getting this error: ORA-01041: internal error. hostdef extension ...
user avatar
  • 1,048
4 votes
2 answers
56k views

How to check if Oracle DB process is running in Unix and where Oracle DB is installed

I am new to Unix and trying to find out a command that checks if Oracle DB is installed in my Unix box. I came across commands ps -ef|grep smon and ps -ef|grep pmon in net. But which is the correct ...
user avatar
1 vote
1 answer
2k views

DBA group in Linux

When we need to install Oracle database in Linux then the user should be in dba group. What is this group and why the user should be in this group for installing Oracle database. What happens if the ...
user avatar
0 votes
2 answers
321 views

which process has created a load spike on my server last week?

O.S.:Linux MYSQL server we got a load spike last week. how can I find the process that has created the load spike on my server last week.
user avatar
2 votes
1 answer
2k views

Question about Oracle's interpretation of "host cpu utilization" in v$sysmetric view

I am studying the v$sysmetric view from Oracle and trying to understand what is Oracle's interpretation of "Host CPU Utilization" It says in the metric_unit as % busy/(idle + busy), but what is busy? ...
user avatar
5 votes
2 answers
1k views

Perl vs Ksh for Unix Database Administration

I realize this is a somewhat more subjective question, but I am looking to the community for guidance. Our company is fairly new to having DBAs. We used to use DB2 for i on the IBM's iSeries servers, ...
user avatar