Questions tagged [environment-variables]

29 questions
13
votes
2 answers

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 use a trusted one? I am on PG 9.2
Neil McGuigan
  • 8,653
  • 5
  • 42
  • 57
4
votes
1 answer

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 words. My table: CREATE TABLE IF NOT EXISTS…
4
votes
1 answer

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 configure these variables. Would I therefore…
PeterX
  • 177
  • 1
  • 3
  • 10
4
votes
1 answer

psql \set an environment variable from the existing shell environment

I want to set up a psql variable from an existing shell environment variable that I can use in later psql commands. I found the \set meta-command, but I'm not able to make it use an existing environment variable in Linux: user@localhost#…
s.k
  • 414
  • 1
  • 9
  • 26
2
votes
1 answer

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 following bombs: :set mypath %systemroot% :out…
Relaxed1
  • 123
  • 1
  • 6
2
votes
2 answers

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 can I do it? UPDATE 1: SQL> alter session set…
jcho360
  • 2,009
  • 8
  • 24
  • 31
2
votes
1 answer

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…
2
votes
1 answer

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 click, no left click. I can hover the mouse over…
2
votes
1 answer

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 database you are not currently connected to. The…
1
vote
1 answer

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 this kind of case? I have input the correct…
1
vote
2 answers

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 have been using the @@version. However, it is said…
1
vote
2 answers

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 underwhelming. There's not really good information…
0xCAFEBABE
  • 217
  • 1
  • 10
1
vote
1 answer

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. Which cnf file I should be adding my settings? When…
adam78
  • 155
  • 1
  • 8
1
vote
1 answer

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 SET a=1 WHERE id IN (1, 2, 3); In mysql 5.7.21:…
1
vote
0 answers

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 transition between char sets: ISO Latin-1 (819) and UTF8. I…
1
2