Questions tagged [environment-variables]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
6
votes
1answer
3k 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 ...
4
votes
1answer
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 ...
3
votes
1answer
3k 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
1answer
30k 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 ...
2
votes
1answer
691 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 ...
2
votes
1answer
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 ...
1
vote
2answers
137 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 ...
1
vote
1answer
7k 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-...
1
vote
1answer
192 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 ...
1
vote
0answers
352 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 ...
1
vote
0answers
216 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
2answers
103 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 ...
0
votes
1answer
104 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
1answer
8k 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:/...
0
votes
0answers
222 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=&...
0
votes
1answer
46 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. ...
0
votes
1answer
219 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'; +-------------------+--------------------------------------...
0
votes
1answer
90 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 ...
0
votes
1answer
76 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 ...