"Task successful" - but it´s not
Hello.
On my target-device, I got a batch-file which does a few things.
When run via cmd.exe it works like a charm, everything is fine.
Now SCOM has the "Task" Feature, I want to run that batchfile out of SCOM, so this is my config:
Task Target: MyTargetDevice
MP: MyMP
Full path to file: c:\windows\system32\cmd.exe
Parameters: /c c:\myDir\myBat\batchfile.bat param1 param2
Working dir: Nothing or c:\windows\system32
Timeout: 60 Seconds
When run, SCOM says "successful", but I am 100% sure this is a lie, because I don´t see ANYTHING getting on on the target and my logfile does not get updated.
I repeat: THE BATCH FILE WORKS 100%
But started over SCOM, it does not
Why is that?
Thanks for your help
Thats really a let-down...
My Batchfile(s) is/are really complex, in short: The first batchfile starts two additional batch-files, and each starts a Software from Siemens (Teamcenter and NX) with Parameters and so on.
A fourth file (VB,macro) measures the time it takes to load an assembly in the program and writes it to my logfile.
THIS logfile gets read by SCOM (works perfectly, no question).
But the Point is: I have to Trigger my batchfile from SCOM, as if I am double-clicking it (or starting via command line) on the actual machine.
So if I choose remote-Desktop in SCOM, go on that machine, and start my batchfile manually - no Problem.
But I want to have a TASK that does this for me.
@That console-task Thing:
It seems you missed the Point, maybe I was not clear enough:
A console-Task tries to run the cmdline on THIS (the Management) machine.
I have to run it on a REMOTE (Agent-managed) machine.
But thanks for your help anyways, maybe you got another idea, it´s driving me really mad...
Similar Messages
-
I updated my Iphone which is successful but it is not activating.
I updated my Iphone which is successful but it is not activating.
Okay.. I guess you can't tell us the complete message.
This is normally part of a message that indicates the Iphone was jailbroken or unlocked by someone other than the carrier.
If so, we cannot help you here and you need to work with your carrier.
We are just users, not Apple support. -
I cannot watch utube or any other video on my macbook all of a sudden. It says "blocked plug ins". I tried upgrading and was successful but that did not help. I still cannot watch videos. Help! Anyone had this problem and found a sollution?
After installing, reboot your Mac and relaunch Safari, then in Safari Preferences/Security enable ‘Allow Plugins’. Then relaunch Safari and test.
If you're getting a "blocked plug-in" error, then in System Preferences… ▹ Flash Player ▹ Advanced
click Check Now. Quit and relaunch your browser. -
FF shows on the task bar shows running on task manager but I can not maximize it
FF shows on the task bar shows running on task manager but I can not maximize it.
Can you try starting Firefox in Safe Mode. To do that, hold down SHIFT while you click the desktop shortcut or quick launch icon. Then click the '''Continue without making changes''' button.
If it works in that configuration, then one of your add-ons is the culprit. -
Current download of Firefox 4 successful, but it did not include info from the previous version such as bookmarks, history, tabs and the like.
I am currently using version 3.6.3 because it has all the information that I need to use the internet. version 4.0 did NOT incorporate all history and so forth (including tabs, bookmarks) when I downloaded it, as previous downloads had. I will continue to use the older version until someone can help me figure out how to merge the information from the older version with the newer one. The posted answer was greek to me and did not help.
-
Hi,
A backup job has been setup on Windows Server 2012 (Platform: Win32NT; ServicePack: ; Version: 6.2.9200.0; VersionString : Microsoft Windows NT 6.2.9200.0) via Windows Backup Software UI (Local Backup 1.0).
It is appearing as a scheduled task "\Microsoft\Windows\Backup\Microsoft-Windows-WindowsBackup" belonging to user 'nt authority\system' in task scheduler.
The problem is that the Backup job never start despite the scheduled task running and completing successfully (when run automatically or manually)!
Would you be able to explain why and assist in resolving that issue?
Here is what we know:
When the backup is run manually via the Windows Backup Software UI, it works fine.
When the backup is run via command line (as set in schedule task) in a cmd command prompt (as local/domain 'administrator' or as 'nt authority\system' which is possible by running command prompt via 'PsExec.exe -i -s cmd'), something like "%windir%\System32\wbadmin.exe
start backup -templateId:{f11eb3aa-74e7-4ff4-a57b-d8d567ee3f77} -quiet", it works fine.
If you manually run the preset scheduled task while logged in as administrator, the task run and complete successfully but the backup job does not start.
Idem if you schedule task is run automatically at scheduled time.
The schedule task run and complete successfully but the backup job does not start.
It is confirmed by running the following in a command prompt as 'nt authority\system':
schtasks /run /tn "\Microsoft\Windows\Backup\Microsoft-Windows-WindowsBackup"
SUCCESS: Attempted to run the scheduled task "\Microsoft\Windows\Backup\Microsoft-Windows-WindowsBackup".
Despite success result, the Backup job does not start running...
No errors or warning appears anywhere in Event Logs (Microsoft > Windows > Backup or Task Scheduler) nor in the scheduled task History tab. The schedule task complete successfully but no Backup job is run...
If scheduled task automatically set by Windows Backup software is duplicated (copied) and set manually it runs fine as 'administrator' and as 'nt authority\system' (subject that 'nt authority\system' is added to the 'Backup Operators' AD group).
Here is an export of the current pre-set schedule task, is there any settings that need to be changed to make it works?
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Author>MYDOMAIN\SERVER1</Author>
<SecurityDescriptor>D:AR(A;OICI;GA;;;BA)(A;OICI;GR;;;BO)</SecurityDescriptor>
</RegistrationInfo>
<Triggers>
<CalendarTrigger id="Trigger 1">
<StartBoundary>2014-07-14T21:00:00</StartBoundary>
<Enabled>true</Enabled>
<ScheduleByDay>
<DaysInterval>1</DaysInterval>
</ScheduleByDay>
</CalendarTrigger>
</Triggers>
<Principals>
<Principal id="Author">
<UserId>S-1-5-18</UserId>
<RunLevel>HighestAvailable</RunLevel>
</Principal>
</Principals>
<Settings>
<MultipleInstancesPolicy>Parallel</MultipleInstancesPolicy>
<DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
<StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
<AllowHardTerminate>true</AllowHardTerminate>
<StartWhenAvailable>true</StartWhenAvailable>
<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
<IdleSettings>
<StopOnIdleEnd>false</StopOnIdleEnd>
<RestartOnIdle>false</RestartOnIdle>
</IdleSettings>
<AllowStartOnDemand>true</AllowStartOnDemand>
<Enabled>true</Enabled>
<Hidden>false</Hidden>
<RunOnlyIfIdle>false</RunOnlyIfIdle>
<DisallowStartOnRemoteAppSession>false</DisallowStartOnRemoteAppSession>
<UseUnifiedSchedulingEngine>false</UseUnifiedSchedulingEngine>
<WakeToRun>false</WakeToRun>
<ExecutionTimeLimit>P3D</ExecutionTimeLimit>
<Priority>7</Priority>
</Settings>
<Actions Context="Author">
<Exec>
<Command>%windir%\System32\wbadmin.exe</Command>
<Arguments>start backup -templateId:{f11eb3aa-74e7-4ff4-a57b-d8d567ee3f77} -quiet</Arguments>
</Exec>
</Actions>
</Task>
Thank you in advance for your feedback.Once again, the issue is not to run the backup manually from the command line but to have it run via the scheduled task setup by the Windows Backup software.
By default, the schedule task is to be run as NT Authority\System, and when run under this account, the backup does not start (even though account is member of Backup Operators) and job can manually be run via elevated command prompt. This is not a normal
behavior and constitute a major bug in Windows Server 2012.
From my understanding the NT Authority\System account is a built-in account from Windows that should by default be part of the Administrators group (built-in) even though it does not explicitly appears like it in AD by default.
This account shall have by default Administrators rights and Backup Operators rights (via the Administrators group) without being explicitly added to those groups (http://msdn.microsoft.com/en-gb/library/windows/desktop/ms684190%28v=vs.85%29.aspx). By design
it is supposed to be the most powerful account which has unrestricted access to all local system resources. If that is not the case (as it seems) then this would constitute a major bug in Windows Server 2012 edition.
As said previously and as you confirmed, currently by default NT Authority\System on Windows 2012 server cannot start backup manually via an elevated command prompt unless it is manually added to Backup Operators (or Administrators) group. But wouldn't that
constitute a bug of Windows Server 2012?
Our server has not yet been restarted since I added NT Authority\System account to the Administrators group explicitly manually so I cannot yet confirmed it would sort the issue. Indeed it is heavily in use so cannot easily be restarted. Will confirm when
done.
We also have an additional problem where after a while of last reboot, part of the Exchange ECP can no longer be properly loaded in the web browser due to compilation error (compilation is done via NT Authority\System account which seems to no longer have
sufficient right to compile .NET code). What is strange is that it works at first and then stop working at some point... I am hopeful that adding NT Authority\System to the Administrators group would sort this issue as well but once again, that shall not be
needed!!!
Could a Windows Server 2012 update introduced some security policy changes or else that prevent NT Authority\System to have full power? -
Hello,
After a Mac update, flash player (along with silverlight) asked to be installed when I tried to watch video content or play games. I installed flash player and it reports being successful and appears in my applications. However, I cannot watch videos or play games, every time I am asked to install flash player again and again and again. I suspect this has something to do with plugins but I am not sure. I have un-installed the program and reinstalled but it still will not work. I check my security settings and it does allow plugins. I erased my temporary internet files. I don't know what else to do. Any help would be appreciated! This is incredibly frustrating. Thank youThank you for responding! I am using a macbook pro 2011, 2.2ghz, intel
core i7, 16gb - version 10.9.5. I have not intentionally installed any ad
blocking software; intact I am inundated with it most times. My online
school work required that I disable pop up blockers and all was well until
an update a few weeks ago for both security and operating system. To the
best of my knowledge I am allowing pop ups and plugins but this may be
where the trouble is. I am unsure, honestly of what security is running
besides what I find in the system preference/security tab. Thank you again
for responding and any help is most appreciated.
Holly Norman
On Wed, Apr 1, 2015 at 5:47 PM, Jeromie Clark <[email protected]> -
Advertisment Report says successful but program did not install...help?
I created the package and package works outside of sccm. Here is the execmgr.log info which says the program installs successfully but the progam is not on the machine. It is in the cache but does not seem to install... what's happening?
Policy is updated for Program: Lego Mindstorms, Package: NP1003A8, Advert: NP120365 execmgr 1/28/2010 3:51:35 PM 2820 (0x0B04)
Policy is updated for Program: Lego Mindstorms, Package: NP1003A8, Advert: NP120365 execmgr 1/28/2010 4:01:18 PM 3900 (0x0F3C)
Mandatory execution requested for program Lego Mindstorms and advertisement NP120365 execmgr 1/28/2010 4:04:34 PM 3848 (0x0F08)
Creating mandatory request for advert NP120365, program Lego Mindstorms, package NP1003A8 execmgr 1/28/2010 4:04:34 PM 3848 (0x0F08)
Requesting content from CAS for package NP1003A8 version 2 execmgr 1/28/2010 4:04:34 PM 3848 (0x0F08)
Successfully created a content request handle {68625778-FDE1-4EEF-BA7A-4276FCDFFB7D} for the package NP1003A8 version 2 execmgr 1/28/2010 4:04:34 PM 3848 (0x0F08)
Raising event:
[SMS_CodePage(437), SMS_LocaleID(1033)]
instance of SoftDistWaitingContentEvent
AdvertisementId = "NP120365";
ClientID = "GUID:1340803F-10E6-4EF4-8CDA-5CB17EB24979";
DateTime = "20100128210435.308000+000";
MachineName = "PD-224-10";
PackageName = "NP1003A8";
PackageVersion = "2";
ProcessID = 1996;
ProgramName = "Lego Mindstorms";
SiteCode = "NP1";
ThreadID = 3848;
execmgr 1/28/2010 4:04:35 PM 3848 (0x0F08)
Successfully raised SoftDistWaitingContentEvent event for program Lego Mindstorms execmgr 1/28/2010 4:04:35 PM 3848 (0x0F08)
Execution Request for package NP1003A8 program Lego Mindstorms state change from NotExist to WaitingContent execmgr 1/28/2010 4:04:35 PM 3848 (0x0F08)
Content is available for program Lego Mindstorms. execmgr 1/28/2010 5:06:49 PM 3212 (0x0C8C)
CExecutionRequest::Overriding Service Windows as per policy. execmgr 1/28/2010 5:06:49 PM 3212 (0x0C8C)
Execution Manager timer has been fired. execmgr 1/28/2010 5:06:49 PM 820 (0x0334)
Executing program LegoMindstorms.exe in Admin context execmgr 1/28/2010 5:06:49 PM 3212 (0x0C8C)
Execution Request for package NP1003A8 program Lego Mindstorms state change from WaitingContent to NotifyExecution execmgr 1/28/2010 5:06:49 PM 3212 (0x0C8C)
Checking content location C:\WINDOWS\system32\CCM\Cache\NP1003A8.2.System for use execmgr 1/28/2010 5:06:49 PM 3212 (0x0C8C)
Successfully selected content location C:\WINDOWS\system32\CCM\Cache\NP1003A8.2.System execmgr 1/28/2010 5:06:49 PM 3212 (0x0C8C)
GetFileVersionInfoSize failed for file C:\WINDOWS\system32\CCM\Cache\NP1003A8.2.System\LegoMindstorms.exe, error 1812 execmgr 1/28/2010 5:06:49 PM 3212 (0x0C8C)
Executing program as a script execmgr 1/28/2010 5:06:49 PM 3212 (0x0C8C)
Successfully prepared command line "C:\WINDOWS\system32\CCM\Cache\NP1003A8.2.System\LegoMindstorms.exe" execmgr 1/28/2010 5:06:49 PM 3212 (0x0C8C)
Command line = "C:\WINDOWS\system32\CCM\Cache\NP1003A8.2.System\LegoMindstorms.exe", Working Directory = C:\WINDOWS\system32\CCM\Cache\NP1003A8.2.System\ execmgr 1/28/2010 5:06:49 PM 3212 (0x0C8C)
Created Process for the passed command line execmgr 1/28/2010 5:06:49 PM 3212 (0x0C8C)
Raising event:
[SMS_CodePage(437), SMS_LocaleID(1033)]
instance of SoftDistProgramStartedEvent
AdvertisementId = "NP120365";
ClientID = "GUID:1340803F-10E6-4EF4-8CDA-5CB17EB24979";
CommandLine = "\"C:\\WINDOWS\\system32\\CCM\\Cache\\NP1003A8.2.System\\LegoMindstorms.exe\"";
DateTime = "20100128220649.886000+000";
MachineName = "PD-224-10";
PackageName = "NP1003A8";
ProcessID = 1996;
ProgramName = "Lego Mindstorms";
SiteCode = "NP1";
ThreadID = 3212;
UserContext = "NT AUTHORITY\\SYSTEM";
WorkingDirectory = "C:\\WINDOWS\\system32\\CCM\\Cache\\NP1003A8.2.System\\";
execmgr 1/28/2010 5:06:49 PM 3212 (0x0C8C)
Raised Program Started Event for Ad:NP120365, Package:NP1003A8, Program: Lego Mindstorms execmgr 1/28/2010 5:06:49 PM 3212 (0x0C8C)
Program exit code 0 execmgr 1/28/2010 5:07:10 PM 3212 (0x0C8C)
Looking for MIF file to get program status execmgr 1/28/2010 5:07:10 PM 3212 (0x0C8C)
Script for Package:NP1003A8, Program: Lego Mindstorms succeeded with exit code 0 execmgr 1/28/2010 5:07:10 PM 3212 (0x0C8C)
I am having exact same issues on Lego Mindstorm 2.0 - usig sccm 2012R2
Fatal Error. Required MSI directory property PersonalFolder is in an invalid location. "C:\doucments and
setting\local service]My doucments" which does not exist the target machines
what was the resolution for this?
I would really appreciate any help regarding this.
Have you looked at creating an MST yet? that would be my first step. My second step is to call Lego and get their support to tell you how to deploy their application to an enterprise environment.
Garth Jones | My blogs: Enhansoft and
Old Blog site | Twitter:
@GarthMJ -
I'm getting message that amount withdrawn successfully but it's not showing in my bank account
I'm from India and due to some restrictions paypal amount automatically withdraw to the bank account. I'm getting message that amount is successfully withdrawn but it's not showing in my bank account how many days it will take to appear in bank account?
How do I now put it on another computer? I only have the license/reg number that is on the software. I'd appreciate whatever help anyone has to give!
You can still download the Aperture 3.1 Trial installer to reinstall Aperture from this webpage - there is a link to the trial and instructions on how to reinstall - don't let the title of this page distract you :
Aperture 3.4: May quit unexpectedly on launch after updating
The Aperture 3 serial number will be available in the about panel, when you are running Aperture on your old mac (from the main menu bar: Aperture > About Aperture).
Regards
Léonie -
Podcast Created Successfully but I did not receive the link
Hi
i am submit Podcast
and received a message from the system that successfully
Dear podcast owner,
Your podcast feed, [ http://mohamedtv.info/rss/kamal/ramadan2012/ramadan.xml ] was successfully added and is now under review.
Sincerely, The iTunes Store Team
but I did not receive the link Podcast ?It's here:
http://itunes.apple.com/podcast/id546990813 -
Hi,
I have just installed Windows 7 Home Premium on my Mac book Pro 13inch, it installed successfully but there is no network connection. Yet when I go on my Mac I can get online no problem. Please help or what other way I can do to connect windows online?Did you download Windows Support Software when you started installing windows via Bootcamp. If yes you need to then install the Support Software after installing windows which contains Windows drivers for Mac hardware.
-
Purchased and downloaded a movie. To watch the movie you must "authorize" the pc. I enter apple id /passwd. I receive a message stating "this pc is alreay authorized", but it will not play the movie. black screen. I hit play nothing happens. Help ?
I'm having the same stupid problem!
-
Updating N93 (dutch):success, but with some notes
It was not a totally straightforward process. Firstly i had to change the USB-connection on my phone to "PC-suite" instead of "data connection" or whatever it might be called in english. I had PC-suite not running at the time. After changing that and restarting the updater, the update started. Before the actual updating process had ended, my w2k machine detected new USB-hardware (the "new" phone), so i hit OK on the "found new hardware"-dialogue. A little while after that, the update finished. The computer said i could now start using the phone again, but the phone said something like "APE_TEST_SERVER" and then something, which got me slightly worried. The phone rebooted however after a minute or two or so. It then started reinstalling the apps and games, but that did not work for most apps. After that, i could restore the backup made on my SD. It also forgot the setting that i don't use the 3G-network. After rebooting, it reinstalled some programs, like Doom. It did not reinstall vNes, DivX-player, Ogg-player, WLIRC2 and Skyforce. It did however leave traces of my apps in the software management-menu, but they would not let me reinstall them from there: "could not install".
It also did not put all the icons back in the right place. I made a custom map "games" that did not return.
All other stuff got back-upped correctly, like my bookmarks, the settings for my custom icons on the today screen. It forgot my gmail-login tho. It also forgot which connection (always ask) to use.
The phone got much faster, and now i can finally zoom to 100%. It also crashes less on WLIRC2, a JAVA IRC app.
But, what did not get fixed in this firmware, is that you can't use more then one button at the same time. So i still can't use vNes and Doom, altho i payed for that software, Also, the demo for Who's Next rendered on the N93 looks incredibly nice, but if it is unplayable, it is of no use.
So please Nokia, update the firmware so that we can play games!! Please notify me personally about what you're going to do about it, if you would.
Cheers,
JulianJust did mine, better reception and programs running faster. Overall working A ok. Will try camera and so on to see if there's any marked improvment. Just use the software updater and it will work.
-
I installed win7 ultimate and then ff. ff worked fine until I installed win7 service pack 1 and all the other updates it recommended. I click to open ff and nothing happens. I look in task manager and it shows it is running. It is not visible on the screen or in the task bar. I have reinstalled a fresh download of it 5 times. I even tried the beta version but still the same problem. I can use explorer and chrome ok but not ff.
The "System Tray" is located at the very bottom right of your screen and is a list of most/all running applications that will show in this list.
For your SysFader issue, this "may" be the problem:
1 Find the "My Computer" desktop icon and right-click it. A pull-down menu will appear. Select "Properties."
2 Click on the "Advanced" tab. This will load a new page of options.
3 Select the "Visual Effects" tab at the top of the window and deselect "Animate Windows when minimizing and maximizing," "Fade or slide menus into view," "Fade or slide Tool Tips into view" and "Fade out Menu items after checking."
4 Click "OK." This will remove most if not all of the Sysfader effects, at the same time correcting related errors that used to come up during opening a new file or program. -
Data in CSV uploads successfully, but it is not visible after upload.
Hi,
I am using Apex 3.2 on Oracle 11g.
This is an imported application for which I am making changes as per my requirements. As I am new to Apex and even SQL, I request forum members to help me with this.
Please find below the old code for uploading data from CSV. It displays only 6 columns - Database Name, Server Name, Application Name, Application Provider, Critical, Remarks. This was successfully uploading all the data from CSV and that data was visible after upload.
OLD CODE:_
--PLSQL code for uploading application details
DECLARE
v_blob_data BLOB;
v_blob_len NUMBER;
v_position NUMBER;
v_raw_chunk RAW(10000);
v_char CHAR(1);
c_chunk_len NUMBER:= 1;
v_line VARCHAR2 (32767):= NULL;
v_data_array wwv_flow_global.vc_arr2;
v_rows NUMBER;
v_count NUMBER;
v_dbid NUMBER;
v_serverid NUMBER;
v_sr_no NUMBER:=1;
v_last_char varchar2(2);
BEGIN
-- Read data from wwv_flow_files
SELECT blob_content INTO v_blob_data FROM wwv_flow_files
WHERE last_updated = (SELECT MAX(last_updated) FROM wwv_flow_files WHERE UPDATED_BY = :APP_USER)
AND id = (SELECT MAX(id) FROM wwv_flow_files WHERE updated_by = :APP_USER);
v_blob_len := dbms_lob.getlength(v_blob_data);
v_position := 1;
-- For removing the first line
WHILE ( v_position <= v_blob_len )
LOOP
v_raw_chunk := dbms_lob.substr(v_blob_data,c_chunk_len,v_position);
v_char := chr(hex_to_decimal(rawtohex(v_raw_chunk)));
v_position := v_position + c_chunk_len;
-- When a whole line is retrieved
IF v_char = CHR(10) THEN
EXIT;
END IF;
END LOOP;
-- Read and convert binary to char
WHILE ( v_position <= v_blob_len )
LOOP
v_raw_chunk := dbms_lob.substr(v_blob_data,c_chunk_len,v_position);
v_char := chr(hex_to_decimal(rawtohex(v_raw_chunk)));
v_line := v_line || v_char;
v_position := v_position + c_chunk_len;
-- When a whole line is retrieved
IF v_char = CHR(10) THEN
--removing the new line character added in the end
v_line := substr(v_line, 1, length(v_line)-2);
--removing the double quotes
v_line := REPLACE (v_line, '"', '');
--checking the absense of data in the end
v_last_char:= substr(v_line,length(v_line),1);
IF v_last_char = CHR(44) THEN
v_line :=v_line||'-';
END IF;
-- Convert each column separated by , into array of data
v_data_array := wwv_flow_utilities.string_to_table (v_line, ',');
-- Insert data into target tables
SELECT SERVERID into v_serverid FROM REPOS_SERVERS WHERE SERVERNAME=v_data_array(2);
SELECT DBID into v_dbid FROM REPOS_DATABASES WHERE DBNAME=v_data_array(1) AND SERVERID=v_serverid;
--Checking whether the data already exist
SELECT COUNT(APPID) INTO v_count FROM REPOS_APPLICATIONS WHERE DBID=v_dbid AND APPNAME=v_data_array(1);
IF v_count = 0 THEN
EXECUTE IMMEDIATE 'INSERT INTO
REPOS_APPLICATIONS (APPID,APPNAME,APP_PROVIDER,DBID,SERVERID,CRITICAL,LAST_UPDATE_BY,LAST_UPDATE_DATE,REMARKS) VALUES(:1,:2,:3,:4,:5,:6,:7,:8,:9)'
USING
APP_ID_SEQ.NEXTVAL,
v_data_array(3),
v_data_array(4),
v_dbid,
v_serverid,
v_data_array(5),
v_data_array(6),
v_data_array(7),
v_data_array(8);
END IF;
-- Clearing out the previous line
v_line := NULL;
END IF;
END LOOP;
END;
==============================================================================================================================
Please find below the new code (which I modified as per my requirements) for uploading data from CSV. It displays 17 columns - Hostname, IP Address, Env Type, Env Num, Env Name, Application, Application Component, Notes, Cluster , Load Balanced, Business User Access Mechanism for Application, Env Owner, Controlled Environment, SSO Enabled, ADSI / LDAP / External Directory Authentication, Disaster Recovery Solution in Place, Interfaces with other application.
This is successfully uploading all the data from CSV, But this uploaded data is not visible in its respective tab.
_*NEW CODE:*_
--PLSQL code for uploading application details
DECLARE
v_blob_data BLOB;
v_blob_len NUMBER;
v_position NUMBER;
v_raw_chunk RAW(10000);
v_char CHAR(1);
c_chunk_len NUMBER:= 1;
v_line VARCHAR2 (32767):= NULL;
v_data_array wwv_flow_global.vc_arr2;
v_rows NUMBER;
v_count NUMBER;
v_dbid NUMBER;
v_serverid NUMBER;
v_sr_no NUMBER:=1;
v_last_char varchar2(2);
BEGIN
-- Read data from wwv_flow_files
SELECT blob_content INTO v_blob_data FROM wwv_flow_files
WHERE last_updated = (SELECT MAX(last_updated) FROM wwv_flow_files WHERE UPDATED_BY = :APP_USER)
AND id = (SELECT MAX(id) FROM wwv_flow_files WHERE updated_by = :APP_USER);
v_blob_len := dbms_lob.getlength(v_blob_data);
v_position := 1;
-- For removing the first line
WHILE ( v_position <= v_blob_len )
LOOP
v_raw_chunk := dbms_lob.substr(v_blob_data,c_chunk_len,v_position);
v_char := chr(hex_to_decimal(rawtohex(v_raw_chunk)));
v_position := v_position + c_chunk_len;
-- When a whole line is retrieved
IF v_char = CHR(10) THEN
EXIT;
END IF;
END LOOP;
-- Read and convert binary to char
WHILE ( v_position <= v_blob_len )
LOOP
v_raw_chunk := dbms_lob.substr(v_blob_data,c_chunk_len,v_position);
v_char := chr(hex_to_decimal(rawtohex(v_raw_chunk)));
v_line := v_line || v_char;
v_position := v_position + c_chunk_len;
-- When a whole line is retrieved
IF v_char = CHR(10) THEN
--removing the new line character added in the end
v_line := substr(v_line, 1, length(v_line)-2);
--removing the double quotes
v_line := REPLACE (v_line, '"', '');
--checking the absense of data in the end
v_last_char:= substr(v_line,length(v_line),1);
IF v_last_char = CHR(44) THEN
v_line :=v_line||'-';
END IF;
-- Convert each column separated by , into array of data
v_data_array := wwv_flow_utilities.string_to_table (v_line, ',');
-- Insert data into target tables
--SELECT SERVERID into v_serverid FROM REPOS_SERVERS WHERE SERVERNAME=v_data_array(2);
--SELECT DBID into v_dbid FROM REPOS_DATABASES WHERE DBNAME=v_data_array(1) AND SERVERID=v_serverid;
--Checking whether the data already exist
--SELECT COUNT(APPID) INTO v_count FROM REPOS_APPLICATIONS WHERE DBID=v_dbid AND APPNAME=v_data_array(1);
IF v_count = 0 THEN
EXECUTE IMMEDIATE 'INSERT INTO
REPOS_APPLICATIONS (APPID,HOSTNAME,IPADDRESS,ENV_TYPE,ENV_NUM,ENV_NAME,APPLICATION,APPLICATION_COMPONENT,NOTES,CLSTR,LOAD_BALANCED,BUSINESS,ENV_OWNER,CONTROLLED,SSO_ENABLED,ADSI,DISASTER,INTERFACES) VALUES(:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14,:15,:16,:17,:18)'
USING
APP_ID_SEQ.NEXTVAL,
v_data_array(1),
v_data_array(2),
v_data_array(3),
v_data_array(4),
v_data_array(5),
v_data_array(6),
v_data_array(7),
v_data_array(8),
v_data_array(9),
v_data_array(10),
v_data_array(11),
v_data_array(12),
v_data_array(13),
v_data_array(14),
v_data_array(15),
v_data_array(16),
v_data_array(17);
END IF;
-- Clearing out the previous line
v_line := NULL;
END IF;
END LOOP;
END;
============================================================================================================================
FYI, CREATE TABLE_ is as below:
CREATE TABLE "REPOS_APPLICATIONS"
( "APPID" NUMBER,
"APPNAME" VARCHAR2(50),
"APP_PROVIDER" VARCHAR2(50),
"DBID" NUMBER,
"CRITICAL" VARCHAR2(3),
"REMARKS" VARCHAR2(255),
"LAST_UPDATE_DATE" TIMESTAMP (6) DEFAULT SYSDATE NOT NULL ENABLE,
"LAST_UPDATE_BY" VARCHAR2(10),
"SERVERID" NUMBER,
"HOSTNAME" VARCHAR2(20),
"IPADDRESS" VARCHAR2(16),
"ENV_TYPE" VARCHAR2(20),
"ENV_NUM" VARCHAR2(20),
"ENV_NAME" VARCHAR2(50),
"APPLICATION" VARCHAR2(50),
"APPLICATION_COMPONENT" VARCHAR2(50),
"NOTES" VARCHAR2(255),
"CLSTR" VARCHAR2(20),
"LOAD_BALANCED" VARCHAR2(20),
"BUSINESS" VARCHAR2(255),
"ENV_OWNER" VARCHAR2(20),
"CONTROLLED" VARCHAR2(20),
"SSO_ENABLED" VARCHAR2(20),
"ADSI" VARCHAR2(20),
"DISASTER" VARCHAR2(50),
"INTERFACES" VARCHAR2(50),
CONSTRAINT "REPOS_APPLICATIONS_PK" PRIMARY KEY ("APPID") ENABLE
ALTER TABLE "REPOS_APPLICATIONS" ADD CONSTRAINT "REPOS_APPLICATIONS_R01" FOREIGN KEY ("DBID")
REFERENCES "REPOS_DATABASES" ("DBID") ENABLE
ALTER TABLE "REPOS_APPLICATIONS" ADD CONSTRAINT "REPOS_APPLICATIONS_R02" FOREIGN KEY ("SERVERID")
REFERENCES "REPOS_SERVERS" ("SERVERID") ENABLE
==============================================================================================================================
It would be of great help if someone can help me to resolve this issue with uploading data from CSV.
Thanks & Regards
SharathHi,
You can see the installed dictionaries and change between them by right-clicking and choosing '''Languages''' inside a live text box eg. the box you are in when replying or right-clicking on the '''Search''' box on the top right corner of this page and choosing '''Check Spelling'''.
Maybe you are looking for
-
Maintenance view does not bring the default language in the Text table
Hi Experts, I am creating a maintenance view with the join of two tables TAB1 has following fields MANDT CATEGORY TAB2 (is the text table for TAB1) has the following fields MANDT LANGU CATEGORY DESCRIPTION I have created the maintenance view with MAN
-
Forms Error When Connect To Remote Machine
I install the Oracle8 on a machine and then install Developer2.1 on it. I install The oracle8 on another machine. I install Server installation on both machine on NT platefom. I connect the sql of one machine to other Database it was connected and th
-
Error when extending Active Directory schema
Hi there, I am trying to extend my active directory schema in order to store my managed preferences in AD. I am following this white paper : http://images.apple.com/business/solutions/it/docs/Modifyingthe_Active_DirectorySchema.pdf When I try to appl
-
Use BAPI_OUTB_DELIVERY_CHANGE in 4.6c
I all. We need a BAPI to modify outbound delivery. I Know that in version 4.7 there is BAPI_OUTB_DELIVERY_CHANGE. But we have 4.6c installed. Is it possible to install a patch with this FM? Thanks
-
Cant load previously saved documents
I'm currently trying to load a a dvd cover in photoshop CS6 and i keep the following error on all my editing systms ...(could not complete your request because it is not a valid photoshop document.)