I have created Below fast load scripts which is loading data from flat file to teradata table.
fastload << EOF >> ${BASE_DIR}/Test_Load_Fastload_log
SESSIONS 4;
.logon ${TDPID}/${TD_LOGON}
SET RECORD VARTEXT " ";
Define
WSID (VARCHAR(10)),
Server_Name (VARCHAR(30)),
Technology (VARCHAR(50)),
Env (VARCHAR(10))
File=$BASE_DIR/workstation_source.dat;
BEGIN LOADING WORK_DB.WS_test
ERRORFILES WORK_DB.WS_test_Err1,WORK_DB.WS_test_Err2
;
INSERT INTO WORK_DB.WS_test VALUES
(:WSID,
:Server_Name,
:Technology,
:Env );
END LOADING;
This is loading data successfully in table but giving return code as 0.
But after that fast load is being teminated with FDL4818 FastLoad Terminated Error.
Below is the log.
06:37:08 Logging off all sessions
* 06:37:09 Total processor time used = '0.1 Seconds'
. Start : Thu Jun 6 06:37:04 2013
. End : Thu Jun 6 06:37:09 2013
. Highest return code encountered = '0'.
*** 06:37:09 FDL4818 FastLoad Terminated
Try including a .QUIT; or a .LOGOFF; command at the end of your script.
EDIT
The FDL4818 FastLoad Terminated message is a normal part of the completion message for a FastLoad job that has completed outside the Loading Phase. FastLoad jobs completing within the Loading Phase will display FDL4818 FastLoad Paused instead.
This completion message will not affect the return code that is returned to the operating system or parent process.
This a message not an error.
You should check the following part of the message to check if there was an error or not:
* Highest return code encountered = *
If the value is 0, as in your case, the job is completed successfully without any ERROR.
If value is other than 0, e.g 8 or 12, there is some error.
Related
I have a HANDLER command which works in MariaDB 10.5.15 but fails on 10.5.16.
HANDLER INDEX_NAME READ INDEX_NAME = (....,'......') LIMIT 1;
The failure happens in'mysql_store_result'.
is there any change in 10.5.16 causing the failure?
from 10.6.x, works again.
I've some weird situation. My autosys job status shows that it ran successfully but when I checked the logs it showed it was failed.
Is that possible ? Has anyone encountered this kind of issue ?
Use the -b option in the SQLCMD. This post gives a good explanation, and the solution worked for me... https://dba.stackexchange.com/questions/77298/how-to-make-sqlcmd-return-an-errorlevel-other-than-0-when-the-sql-script-fails
Taken from the above link...
You should use the option -b in sqlcmd.
-b Specifies that sqlcmd exits and returns a DOS ERRORLEVEL value when an error occurs. The value that is returned to the DOS ERRORLEVEL variable is 1 when the SQL Server error message has a severity level greater than 10; otherwise, the value returned is 0.
http://msdn.microsoft.com/en-us/library/ms162773.aspx
I'm trying to run a simple R code in SQL Server 2016:
EXEC sp_execute_external_script
#language =N'R',
#script=N'OutputDataSet<-InputDataSet',
#input_data_1 =N'SELECT 1 AS hello'
WITH RESULT SETS (([hello] int not null));
GO
I have followed this link to configure: https://tomaztsql.wordpress.com/2016/07/26/enabling-sp_execute_external_script-to-run-r-scripts-in-sql-server-2016/
I'm getting error:
Msg 39023, Level 16, State 1, Procedure sp_execute_external_script,
Line 1 [Batch Start Line 0]
'sp_execute_external_script' is disabled on this instance of SQL
Server. Use sp_configure 'external scripts enabled' to enable it.
Msg 11536, Level 16, State 1, Line 1
EXECUTE statement failed because its WITH RESULT SETS clause specified 1
result set(s), but the statement only sent 0 result set(s) at run time.
when I checked with :
EXECUTE sp_configure;
GO
The result shows like this:
name minimum maximum config_value run_value
external scripts enabled 0 1 1 0
Why the run value is still 0 (note-I have SQL Server Launchpad restarted)? What is the resolution for this?
Issue resolved. need to restart SQL Server services. Which will restart everything. And its working fine.
proenv>proserve dbname -S 2098 -H hostname -B 10000
OpenEdge Release 11.6 as of Fri Oct 16 19:02:26 EDT 2015
11:00:35 BROKER This broker will terminate when session ends. (5405)
11:00:35 BROKER The startup of this database requires 46Mb of shared memory. Maximum segment size is 1024Mb.
11:00:35☻ BROKER 0: dbname is a void multi-volume database. (613)
11:00:35 BROKER : Removed shared memory with segment_id: 39714816 (16869)
11:00:35 BROKER ** This process terminated with exit code 1. (8619)
I am getting the above error when I tried to start the progress database...
This is the problem:
11:00:35☻ BROKER 0: dbname is a void multi-volume database. (613)
My guess is, you have just created the DB using prostrct create. You need to procopy an empty db into your db so that if has the schema tables.
procopy empty yourdbname
See: http://knowledgebase.progress.com/articles/Article/P7713
The database is void it means, it does not have any metaschema.
First create your database using .st file (use prostrct create) than
copy meta schema table using emptyn.
Ex : procopy emptyn urdbname.
Then try to start your database.
I have a simple script that I'm trying to get Monit to monitor. After some digging around I found this little nugget: start program = "su - myuser -c '/home/user/myscript.rb start' " which I believe should work but looking at the log files it says:
[PDT Oct 30 02:47:17] info : 'simple_script' start: su
[PDT Oct 30 02:47:17] error : Error: Could not execute su
Likewise earlier attempts only seem to read the part preceding a space so:
start program = "/home/user/.rvm/rubies/ruby-1.9.2-p290/bin/ruby /home/user/simple_script_daemon.rb stop"
results in…
[PDT Oct 30 03:09:49] info : 'simple_script' start: /home/user/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
Which doesn't fail like the first example but still seems to only execute the part preceding the space.
This is my full statement:
check process simple_script
with pidfile /home/user/simple_script.rb.pid
start program = "su - user -c '/home/user/simple_script_daemon.rb start' "
stop program = "su - user -c '/home/user/simple_script_daemon.rb stop' "
group simple_script
If you've got an idea what might be going on I'd love to hear from you!
I guess you could try something like:
check process simple_script
with pidfile /home/user/simple_script.rb.pid
start program = "/home/user/simple_script_daemon.rb start" as uid user and gid user
stop program = "/home/user/simple_script_daemon.rb stop" as uid user and gid user
group simple_script
as stated in monit doc.
You may need to provide full path to su, i.e. /bin/su