Questions tagged [environment-variables]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
42 views

My subdirectories under $ORACLE_HOME are missing

Im using oracle 11g. I cannot access the software products since they are missing. When I cd to $ORACLE_HOME, there are no files under it. They are missing. I cannot access the sqlplus. What to do in ...
0 votes
2 answers
83 views

how to find out if I am in azure or not?

I am talking about sql server here. I can connect to azure. I can also manage permissions. But while doing some automation, I need to know if I am in azure or normal sql. how can I achieve that? I ...
1 vote
2 answers
284 views

PostgreSQL-Patroni-Cluster: Installing oracle_fdw, dependency problem

For Oracle to PostgreSQL migrations we're currently looking into ora2pg. However, the performance using either writes to file or direct read from Oracle and write to PostgreSQL have both been very ...
0 votes
2 answers
458 views

Store LDAP bind credentials in environment variables for pg_hba.conf

I am working on setting up LDAP authentication for a PostgreSQL database and have added the following in my pg_hba.conf file: # TYPE DATABASE USER ADDRESS METHOD host all all ...
2 votes
1 answer
297 views

Environment variables in Postgres C extension

I cannot get environment variable in my PostgreSQL C extension code. For example, this function always returns 111: #include "postgres.h" #include "fmgr.h" #include <stdlib.h>...
  • 35
2 votes
1 answer
60 views

Identifying elements in SSIS package built in MS Visual Studio 2008

I recognize that these are variables, but I am not sure how to add these elements to the package (or how they are added to begin with), what effect that have or even how to manipulate them. No right ...
  • 75
0 votes
2 answers
1k views

Scripts for setting the environment for Oracle Database Multitenant

When working on shared database servers with several Oracle Container Databases installed in different homes and different versions it can be hard to find the pdb you are looking for quickly. We used ...
  • 928
0 votes
0 answers
914 views

Bash Script Can't Connect to Azure Postgres using ENV Vars - "The Username should be in <username@hostname> format"

I have a bash script that exports ENV vars to use in connecting to an Azure Postgres DB (mydb.postgres.database.azure.com). For the user portion of that specifically it looks like this: export PGUSER=&...
  • 137
1 vote
1 answer
776 views

Mysql - which cnf file to update

I have mysql 8 running on a ubuntu 20.4 server. I want to apply some setting to optimize the database so that it uses less ram for a web application. typically switching of the performance_schema. ...
  • 145
2 votes
1 answer
3k views

Variable to select database in SQL query

If I want use a variable in the FROM clause of a SQL query I need to use dynamic SQL. Which might be a pain if the query is long and complex. There are few different ways of running a query from a ...
1 vote
1 answer
395 views

Mysql row-based binary logging behaving different in some versions of mysql (rows grouping)

Mysql row-based binary logging seems to have a different behaviour when grouping rows changes in some versions of mysql. Let's assume the following statement update three rows: UPDATE table_name ...
0 votes
1 answer
216 views

Skip_log_bin and innodb_flush_log_at_trx_commit

If I have skip_log_bin =1 is there any reason for not having innodb_flush_log_at_trx_commit = 0? If I have understand correctly, innodb_flush_log_at_trx_commit, reads data from log file and stores ...
0 votes
1 answer
373 views

Percona-server-5.6.41 and sql_mode [duplicate]

When setting sql_mode="" in /etc/mysql/my.cnf server leaves this variable in it default value: mysql> show variables like 'sql_mode'; +-------------------+--------------------------------------...
  • 113
1 vote
0 answers
635 views

Converting and/or enforcing an Ascii Character Set in Informix database from 819 or ISO Latin 1

Overview: In Informix is it possible to enforce ASCII for a database or instance. Details: I am trying to enforce ASCII in an instance of informix for a while. This is to help have a smooth ...
0 votes
1 answer
132 views

MySQL time_zone = SYSTEM not getting correct date on CURRENT_TIME

Via SSH I print the current date of my server, which is correct based on my location: When I run SHOW GLOBAL VARIABLES on MySQL, I have time_zone = SYSTEM - which makes me think MySQL will be using ...
1 vote
2 answers
149 views

Best Practice to Store an Admin Configured Variable [closed]

Some background: Users submit a form that has a category. If (category has manager) { send manager email } else { send 'default' manager an email } For the sake of argument, manager_category ...
  • 21
0 votes
1 answer
89 views

Another question about *_buffer_size

Mysql-5.6.30 running on Debian, uses InnoDB, DB size about 100Gb. Dual Xeon 5645 with 48Gb RAM, 4 HDD 15K in RAID 10 (/var) and system on RAID1 There're many "heavy" ORDER BY/GROUP BY, JOIN/sort ...
  • 113
1 vote
0 answers
302 views

Partition of tables with constraint exclusion doesn´t optimize queries

Over an existing table in PostgreSQL (version 9.0.2) I created nine others which inherited the former with check constraints. I turned on the constratint_exclusion variable and runned some queries, ...
0 votes
1 answer
10k views

NLS_LANG AL32UTF8/UTF8 for Oracle database

I recently installed a new Oracle database on Ubuntu using this tutorial. I got an error oracle@ubuntu:/home/bruno$ echo $NLS_LANG /u01/app/oracle/product/11.2.0/xe/bin/nls_lang.sh oracle@ubuntu:/...
1 vote
1 answer
8k views

sql_safe_updates set to ON by default

This is fresh mysql install from Debian apt. mysql> \s -------------- mysql Ver 14.14 Distrib 5.5.47, for debian-linux-gnu (x86_64) using readline 6.3 .. Server version: 5.5.47-0+deb8u1-...
3 votes
1 answer
4k views

MATCH AGAINST one character words returns empty rows with ft_min_word_len = 1

I've set ft_min_word_len = 1 to my.cnf file, also SHOW VARIABLES LIKE 'ft_min_word%' displays ft_min_word_len as 1. Then I've reloaded all database tables and it still doesn't search for one character ...
2 votes
1 answer
3k views

SQLCMD mode: environment variable syntax?

I assume the best way to set my SSMS (SQL Server 2005) output file path during runtime of T-SQL, is to use SQLCMD mode. How do I use environment variables (e.g. %systemroot%) in the code? The ...
  • 123
4 votes
1 answer
15k views

How do I map SSIS 2012 Package Variables to Parameters?

I have created multiple packages that use variables to assign Connection Manager Expressions such as Connection String. However in the new SQL 2012 Project Deployment Model I don't seem to be able to ...
  • 167
2 votes
2 answers
35k views

How to change SESSION_CACHED_CURSORS for all sessions

how Can I do to change SESSION_CACHED_CURSORS for all sessions? I found on google and oracle website: Alter Session... but I need to changed it for all the session and not only for one of them. How ...
  • 1,979
12 votes
2 answers
10k views

How can I use an environment variable in a Postgres function?

Let's say I have a windows user environment variable SOME_STRING. Is it possible to use its value in a PL/pgSQL function? If not, do I need to use an untrusted language (like PL/pythonu) or can I ...