Tag Info

New answers tagged

2

It rather depends on what the scripts are intended to do... If you can cope with the occasional dirty read or unrepeatable read issue (or they are truly simple enough that these are unlikely/impossible), also set your transaction handling to the most lenient mode possible with SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED. This is actually equivalent to ...


11

Just to get these out of the way: Technically speaking, both of these options are "dynamic" / ad hoc queries that are not parsed / validated until they are submitted. And both are susceptible to SQL Injection since they are not parameterized (though with the SQLCMD scripts, if you are passing in a variable from a CMD script then you do have an opportunity ...


4

Add -e option: · --execute=statement, -e statement Execute the statement and quit. The default output format is like that produced with --batch. See Section 4.2.4, “Using Options on the Command Line”, for some examples. With this option, mysql does not use the history file. mysql -uroot -pPassword1 -e "select column_name from ...


2

Converting comment to an answer. This is not my area of expertise, but you might look at Dennes Torres Simple Talk post from January 2015 for any takeaways that help you. https://www.simple-talk.com/sql/database-administration/centralize-your-database-monitoring-process/ Two subheadings of particular interest may be: Configure Data Collector through ...


0

Too long for a comment now: I don't speak PGSQL so try adapting the following for your date extraction functions: SELECT MAX(CurrentWeekCount) As CurrentWeekCount ,MAX(CurrentMonthCount) As CurrentMonthCount ,MAX(AllCount) As AllCount FROM ( count all the records by the current week SELECT COUNT(CustomerID) As CurrentWeekCount ...


0

You can set the default SID and your Oracle home in your .bash_profile file. ORACLE_SID=ORCL; export ORACLE_SID ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME Save the change, then you can source the file without logging out. source .bash_profile If you have more than one database on the ...


3

This is really a Unix/Linux question, but it does relate to Oracle, so I'll give an answer. In Unix, the system makes great use of what it calls "spawning" (or "giving birth"). When you run a command, a new process is created which takes all of its information from the parent. Essentially, it's a copy of the parent - it's a new bash shell, which then sets ...



Top 50 recent answers are included