Commit Waits in the database
Dear Experts,
*RDBMS version - 11.1.0.7 on AIX*
I'm noticing a lot of "commit" waits in my 2 node RAC database. Most of them coming from Instance 1. I tried increasing redo log file size and it didn;t seem to fix the issue. Any comments?
I'm seeing this in the top waits in Enterptise Manager.
Thanks
I ran ADDM and below are the findings:
Waits on event "log file sync" while performing COMMIT and ROLLBACK operations, were consuming significant database time.
Action
Investigate the possibility of improving the performance of I/O to the online redo log files.
Rationale
The average size of writes to the online redo log files was 0 K and the average time per write was 2 milliseconds.
Similar Messages
-
I m using SQL Server 2012 Developer Edition. Even I tried 2012 express and enterprise edition but all
gave same error. I browsed msdn blog. But nothing help me out.
Below is the error log details--
Overall summary:
Final result: Failed: see details below
Exit code (Decimal): -2061893606
Start time: 2013-10-21 12:58:05
End time: 2013-10-21 13:52:30
Requested action: Install
Setup completed with required actions for features.
Troubleshooting information for those features:
Next step for RS: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Next step for SQLEngine: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Next step for DQ: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Next step for FullText: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Next step for Replication: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Machine Properties:
Machine name: CROY-TOSH
Machine processor count: 4
OS version: Windows 7
OS service pack: Service Pack 1
OS region: United States
OS language: English (United States)
OS architecture: x64
Process architecture: 64 Bit
OS clustered: No
Product features discovered:
Product Instance Instance ID Feature
Language Edition Version Clustered
Package properties:
Description: Microsoft SQL Server 2012 Service Pack 1
ProductName: SQL Server 2012
Type: RTM
Version: 11
SPLevel: 0
Installation location: C:\Users\CRoy\Downloads\SQL Server 2012 Developer Edition (x86 and x64) - DVD (English)\x64\setup\
Installation edition: Developer
Product Update Status:
None discovered.
User Input Settings:
ACTION: Install
ADDCURRENTUSERASSQLADMIN: false
AGTSVCACCOUNT: NT Service\SQLSERVERAGENT
AGTSVCPASSWORD: *****
AGTSVCSTARTUPTYPE: Manual
ASBACKUPDIR: C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Backup
ASCOLLATION: Latin1_General_CI_AI
ASCONFIGDIR: C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Config
ASDATADIR: C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Data
ASLOGDIR: C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Log
ASPROVIDERMSOLAP: 1
ASSERVERMODE: MULTIDIMENSIONAL
ASSVCACCOUNT: NT Service\MSSQLServerOLAPService
ASSVCPASSWORD: <empty>
ASSVCSTARTUPTYPE: Automatic
ASSYSADMINACCOUNTS: CRoy-TOSH\CRoy
ASTEMPDIR: C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Temp
BROWSERSVCSTARTUPTYPE: Disabled
CLTCTLRNAME: ROY
CLTRESULTDIR: C:\Program Files (x86)\Microsoft SQL Server\DReplayClient\ResultDir\
CLTSTARTUPTYPE: Manual
CLTSVCACCOUNT: NT Service\SQL Server Distributed Replay Client
CLTSVCPASSWORD: <empty>
CLTWORKINGDIR: C:\Program Files (x86)\Microsoft SQL Server\DReplayClient\WorkingDir\
COMMFABRICENCRYPTION: 0
COMMFABRICNETWORKLEVEL: 0
COMMFABRICPORT: 0
CONFIGURATIONFILE: C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20131021_125116\ConfigurationFile.ini
CTLRSTARTUPTYPE: Manual
CTLRSVCACCOUNT: NT Service\SQL Server Distributed Replay Controller
CTLRSVCPASSWORD: <empty>
CTLRUSERS: CRoy-TOSH\CRoy
ENABLERANU: false
ENU: true
ERRORREPORTING: true
FEATURES: SQLENGINE, REPLICATION, FULLTEXT, DQ, AS, RS, RS_SHP, RS_SHPWFE, DQC, BIDS, CONN, IS, BC, SDK, BOL, SSMS, ADV_SSMS, DREPLAY_CTLR, DREPLAY_CLT, SNAC_SDK, MDS
FILESTREAMLEVEL: 2
FILESTREAMSHARENAME: MSSQLSERVER
FTSVCACCOUNT: NT Service\MSSQLFDLauncher
FTSVCPASSWORD: <empty>
HELP: false
IACCEPTSQLSERVERLICENSETERMS: false
INDICATEPROGRESS: false
INSTALLSHAREDDIR: C:\Program Files\Microsoft SQL Server\
INSTALLSHAREDWOWDIR: C:\Program Files (x86)\Microsoft SQL Server\
INSTALLSQLDATADIR: <empty>
INSTANCEDIR: C:\Program Files\Microsoft SQL Server\
INSTANCEID: MSSQLSERVER
INSTANCENAME: MSSQLSERVER
ISSVCACCOUNT: NT Service\MsDtsServer110
ISSVCPASSWORD: <empty>
ISSVCSTARTUPTYPE: Automatic
MATRIXCMBRICKCOMMPORT: 0
MATRIXCMSERVERNAME: <empty>
MATRIXNAME: <empty>
NPENABLED: 0
PID: *****
QUIET: false
QUIETSIMPLE: false
ROLE: <empty>
RSINSTALLMODE: DefaultNativeMode
RSSHPINSTALLMODE: SharePointFilesOnlyMode
RSSVCACCOUNT: NT Service\ReportServer
RSSVCPASSWORD: <empty>
RSSVCSTARTUPTYPE: Automatic
SAPWD: *****
SECURITYMODE: SQL
SQLBACKUPDIR: <empty>
SQLCOLLATION: Latin1_General_CI_AI
SQLSVCACCOUNT: NT Service\MSSQLSERVER
SQLSVCPASSWORD: *****
SQLSVCSTARTUPTYPE: Automatic
SQLSYSADMINACCOUNTS: CRoy-TOSH\CRoy
SQLTEMPDBDIR: <empty>
SQLTEMPDBLOGDIR: <empty>
SQLUSERDBDIR: <empty>
SQLUSERDBLOGDIR: <empty>
SQMREPORTING: false
TCPENABLED: 0
UIMODE: Normal
UpdateEnabled: true
UpdateSource: MU
X86: false
Configuration file: C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20131021_125116\ConfigurationFile.ini
Detailed results:
Feature: Management Tools - Complete
Status: Passed
Feature: Client Tools Connectivity
Status: Passed
Feature: Client Tools SDK
Status: Passed
Feature: Client Tools Backwards Compatibility
Status: Passed
Feature: Management Tools - Basic
Status: Passed
Feature: SQL Server Data Tools
Status: Passed
Feature: Reporting Services - Native
Status: Failed: see logs for details
Reason for failure: An error occurred for a dependency of the feature causing the setup process for the feature to fail.
Next Step: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Component name: SQL Server Database Engine Services Instance Features
Component error code: 0x851A001A
Error description: Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
Error help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026
Feature: Database Engine Services
Status: Failed: see logs for details
Reason for failure: An error occurred during the setup process of the feature.
Next Step: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Component name: SQL Server Database Engine Services Instance Features
Component error code: 0x851A001A
Error description: Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
Error help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026
Feature: Data Quality Services
Status: Failed: see logs for details
Reason for failure: An error occurred for a dependency of the feature causing the setup process for the feature to fail.
Next Step: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Component name: SQL Server Database Engine Services Instance Features
Component error code: 0x851A001A
Error description: Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
Error help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026
Feature: Full-Text and Semantic Extractions for Search
Status: Failed: see logs for details
Reason for failure: An error occurred for a dependency of the feature causing the setup process for the feature to fail.
Next Step: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Component name: SQL Server Database Engine Services Instance Features
Component error code: 0x851A001A
Error description: Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
Error help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026
Feature: SQL Server Replication
Status: Failed: see logs for details
Reason for failure: An error occurred for a dependency of the feature causing the setup process for the feature to fail.
Next Step: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Component name: SQL Server Database Engine Services Instance Features
Component error code: 0x851A001A
Error description: Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
Error help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026
Feature: Master Data Services
Status: Passed
Feature: Distributed Replay Client
Status: Passed
Feature: Distributed Replay Controller
Status: Passed
Feature: Integration Services
Status: Passed
Feature: Data Quality Client
Status: Passed
Feature: Analysis Services
Status: Passed
Feature: Reporting Services - SharePoint
Status: Passed
Feature: Reporting Services Add-in for SharePoint Products
Status: Passed
Feature: SQL Browser
Status: Passed
Feature: Documentation Components
Status: Passed
Feature: SQL Writer
Status: Passed
Feature: SQL Client Connectivity
Status: Passed
Feature: SQL Client Connectivity SDK
Status: Passed
Rules with failures:
Global rules:
Scenario specific rules:
Rules report file: C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20131021_125116\SystemConfigurationCheck_Report.htmHi,
This 3rd time I followed this link. But nothing new, same error.
Can you please tell me how to do follow, I cannt do the 1st step, how to change the local system to windows level account, vice-versa. It is shown mine as
Server Configuration Manager(Local)
From here I folllowed the steps ---[I cannt insert link/image :-(]
SQL 2008/R2 setup fails with "Wait on the database engine recovery handle failed"
If I right clicked on SQL Server Service, there is no option to change the account.
Hello,
Thanks for your patience,did you tried stesp mentioned in below article
http://blogs.msdn.com/b/sqljourney/archive/2012/03/16/sql-2008-r2-setup-fails-with-quot-wait-on-the-database-engine-recovery-handle-failed-quot.aspx
To resolve it, follow these steps:-
When the installation throws this error, click on OK and allow it to proceed. It will fail for Database Engine, but the SQL Server service should have
been created. Check the Services console.
If the service is present, perform the following steps:-
1. Go to SQL Server Configuration manager, right click on the SQL Server service, and change the service account (if it is local system, give
it a windows level account, and vice-versa). It might throw a WMI error but you will see the account getting updated anyway. If not, then use the Services console. Change the account for SQL Agent as well.
Use this link to change sql server service account
http://technet.microsoft.com/en-us/library/ms345578.aspx
2. Next, try to start the service. It should come online.
3. However, you will not be able to log in to the SQL Server
4. Now stop the service and start it from the command prompt using -m -c -T3608 parameters.
5. Now try logging in to the server using admin connection from sqlcmd (sqlcmd admin:<server name>\<instance name> ...)
6. Once logged in, use the sp_addsrvrolemember '<domain\username>','sysadmin'.
Also add the builtin/administrators to the sysadmin role
7. Now stop the service from the command prompt and start it from SQL Server configuration manager
You should be able to log in to the server now.
Hope this helps someone.
Please revert if it helps or even if it does not
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers -
Microsoft SQL Server 2014 Setup error: Wait on the Database Engine recovery handle failed
Hi,
Having this annoying error trying to install SQL Server 2014 (RTM). I saw it's been asked several times... But each post seems a different cause and no definitive answer...
I'm not doing an upgrade, so no "sa account" issue.
Tried different media. Even three different distributions: trial, Standard and Enterprise.
Tried disabling Microsoft antivirus/firewall.
Of course tried restarting, updating, installing, uninstalling, repairing, etc., etc.
I noticed the users folders under C:\Users weren't created. (Maybe something related to permissions?) After playing around, I managed for the users to be created and the service started. Though I couldn't log in.Summary for last "repair" attempt:
Overall summary:
Final result: Failed: see details below
Exit code (Decimal): -2068578302
Start time: 2014-04-27 23:54:21
End time: 2014-04-27 23:59:48
Requested action: Repair
Setup completed with required actions for features.
Troubleshooting information for those features:
Next step for SQLEngine: Use the following information to resolve the error, and then try the setup process again.
Next step for DQ: Use the following information to resolve the error, and then try the setup process again.
Next step for FullText: Use the following information to resolve the error, and then try the setup process again.
Next step for LocalDB: Use the following information to resolve the error, and then try the setup process again.
Machine Properties:
Machine name: CHARLY13C
Machine processor count: 4
OS version: Windows 8
OS service pack:
OS region: United States
OS language: English (United States)
OS architecture: x64
Process architecture: 64 Bit
OS clustered: No
Product features discovered:
Product Instance Instance ID Feature Language Edition Version Clustered Configured
SQL Server 2012 DENALI MSSQL11.DENALI Database Engine Services 1033 Enterprise Edition 11.1.3128.0 No Yes
SQL Server 2012 LocalDB 1033 Express Edition 11.1.3128.0 No Yes
SQL Server 2014 HEKATON MSSQL12.HEKATON Database Engine Services 1033 Enterprise Edition 12.0.2000.8 No Yes
SQL Server 2014 HEKATON MSSQL12.HEKATON Full-Text and Semantic Extractions for Search 1033 Enterprise Edition 12.0.2000.8 No Yes
SQL Server 2014 HEKATON MSSQL12.HEKATON Data Quality Services 1033 Enterprise Edition 12.0.2000.8 No Yes
SQL Server 2014 Management Tools - Basic 1033 Enterprise Evaluation Edition 12.0.2000.8 No Yes
SQL Server 2014 Management Tools - Complete 1033 Enterprise Evaluation Edition 12.0.2000.8 No Yes
SQL Server 2014 Client Tools Connectivity 1033 Enterprise Evaluation Edition 12.0.2000.8 No Yes
SQL Server 2014 LocalDB 1033 Express Edition 12.0.2000.8 No Yes
Package properties:
Description: Microsoft SQL Server 2014
ProductName: SQL Server 2014
Type: RTM
Version: 12
SPLevel: 0
Installation location: F:\x64\setup\
Installation edition: Enterprise
User Input Settings:
ACTION: Repair
AGTDOMAINGROUP: <empty>
AGTSVCACCOUNT: <empty>
AGTSVCPASSWORD: <empty>
AGTSVCSTARTUPTYPE: Manual
ASCONFIGDIR: Config
ASSVCACCOUNT: <empty>
ASSVCPASSWORD: <empty>
CLTSTARTUPTYPE: 0
CLTSVCACCOUNT: <empty>
CLTSVCPASSWORD: <empty>
CONFIGURATIONFILE: C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20140427_235420\ConfigurationFile.ini
CTLRSTARTUPTYPE: 0
CTLRSVCACCOUNT: <empty>
CTLRSVCPASSWORD: <empty>
ENU: true
FAILOVERCLUSTERGROUP: <empty>
FAILOVERCLUSTERNETWORKNAME: <empty>
FTSVCACCOUNT: NT Service\MSSQLFDLauncher$HEKATON
FTSVCPASSWORD: <empty>
HELP: false
IACCEPTSQLSERVERLICENSETERMS: false
INDICATEPROGRESS: false
INSTANCENAME: HEKATON
ISSVCACCOUNT: NT AUTHORITY\Network Service
ISSVCPASSWORD: <empty>
ISSVCSTARTUPTYPE: Automatic
QUIET: false
QUIETSIMPLE: false
SQLSVCACCOUNT: NT Service\MSSQL$HEKATON
SQLSVCPASSWORD: <empty>
UIMODE: Normal
X86: false
Configuration file: C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20140427_235420\ConfigurationFile.ini
Detailed results:
Feature: Management Tools - Complete
Status: Passed
Feature: Client Tools Connectivity
Status: Passed
Feature: Management Tools - Basic
Status: Passed
Feature: Database Engine Services
Status: Failed: see logs for details
Reason for failure: An error occurred during the setup process of the feature.
Next Step: Use the following information to resolve the error, and then try the setup process again.
Component name: SQL Server Database Engine Services Instance Features
Component error code: 0x84B40002
Error description: The SQL Server feature 'SQL_Engine_Core_Inst' is not in a supported state for repair, as it was never successfully configured. Only features from successful installations can be repaired. To continue, remove the specified SQL Server feature.
Error help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=12.0.2000.8&EvtType=0x2841E06E%401204%402&EvtType=0x2841E06E%401204%402
Feature: Data Quality Services
Status: Failed: see logs for details
Reason for failure: An error occurred for a dependency of the feature causing the setup process for the feature to fail.
Next Step: Use the following information to resolve the error, and then try the setup process again.
Component name: SQL Server Database Engine Services Instance Features
Component error code: 0x84B40002
Error description: The SQL Server feature 'SQL_Engine_Core_Inst' is not in a supported state for repair, as it was never successfully configured. Only features from successful installations can be repaired. To continue, remove the specified SQL Server feature.
Error help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=12.0.2000.8&EvtType=0x2841E06E%401204%402&EvtType=0x2841E06E%401204%402
Feature: Full-Text and Semantic Extractions for Search
Status: Failed: see logs for details
Reason for failure: An error occurred for a dependency of the feature causing the setup process for the feature to fail.
Next Step: Use the following information to resolve the error, and then try the setup process again.
Component name: SQL Server Database Engine Services Instance Features
Component error code: 0x84B40002
Error description: The SQL Server feature 'SQL_Engine_Core_Inst' is not in a supported state for repair, as it was never successfully configured. Only features from successful installations can be repaired. To continue, remove the specified SQL Server feature.
Error help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=12.0.2000.8&EvtType=0x2841E06E%401204%402&EvtType=0x2841E06E%401204%402
Feature: SQL Browser
Status: Passed
Feature: SQL Writer
Status: Passed
Feature: LocalDB
Status: Failed: see logs for details
Reason for failure: An error occurred during the setup process of the feature.
Next Step: Use the following information to resolve the error, and then try the setup process again.
Feature: SQL Client Connectivity
Status: Passed
Feature: SQL Client Connectivity SDK
Status: Passed
Feature: Setup Support Files
Status: Passed
Rules with failures:
Global rules:
There are no scenario-specific rules.
Rules report file: C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20140427_235420\SystemConfigurationCheck_Report.htm -
Adding Data to the database for SAP Transactions
Hi
I'm new to the whole ABAP. I would like to enquire about adding transaction data in SAP through ABAP but it must be immediate.
I know that one can use a BAPI to add data and can rollback if any problems occur.
But if no BAPI exists how does one write code to add a document to the SAP database but with everything SAP transaction requires like the BAPI. What is the process and how???
So let say I wanted to do FB01 which is SAP FI document and must be immediate. There is a BAPI that exists for it but if there was not one how would I do this???
I know one can also use BDC but that creates a batch and then needs to be executed in SM35, I want a way to add data for two or three SAP transactions, if any problems occur with any of the steps rollback everything else commit everything to the database.
Any simple detail examples (code) that satisfy the above will be greatly appreciated and REWARDED.
Thanks in advanceLuis,
i have a code exactly same BDC for FB01.
refer:
REPORT z_etching_fb01
NO STANDARD PAGE HEADING LINE-SIZE 255.
*etching invoice load
INCLUDE bdcrecx1.
TYPE-POOLS: truxs , slis.
*PARAMETERS: dataset(132) LOWER CASE DEFAULT
* 'c:\temp\etchingload.txt'.
PARAMETER: pfile LIKE rlgrap-filename." OBLIGATORY.
SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-001.
PARAMETER: p_kunnr LIKE kna1-kunnr OBLIGATORY, "kna1-kunnr
p_bukrs LIKE bseg-bukrs,
p_mwskz LIKE t007a-mwskz OBLIGATORY,"t007a-mwskz
p_prctr LIKE cepc-prctr OBLIGATORY,"cepc-prctr
* p_newko LIKE ska1-saknr OBLIGATORY DEFAULT 41000000,"
p_budat LIKE bkpf-budat OBLIGATORY ,
p_hkont LIKE bseg-hkont OBLIGATORY DEFAULT 41000000 ,
p_waers TYPE waers OBLIGATORY DEFAULT 'GBP'."tcurr-waers
SELECTION-SCREEN END OF BLOCK a.
SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE text-002.
PARAMETER : report AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK b.
*** DO NOT CHANGE - the generated data section - DO NOT CHANGE ***
* If it is nessesary to change the data section use the rules:
* 1.) Each definition of a field exists of two lines
* 2.) The first line shows exactly the comment
* '* data element: ' followed with the data element
* which describes the field.
* If you don't have a data element use the
* comment without a data element name
* 3.) The second line shows the fieldname of the
* structure, the fieldname must consist of
* a fieldname and optional the character '_' and
* three numbers and the field length in brackets
* 4.) Each field must be type C.
*** Generated data section with specific formatting - DO NOT CHANGE ***
* ALV *
DATA: it_fieldcat TYPE slis_t_fieldcat_alv,
wa_fieldcat LIKE LINE OF it_fieldcat,
it_top_of_page TYPE slis_t_listheader,
ls_layout TYPE slis_layout_alv,
gt_events TYPE slis_t_event.
DATA: it_raw TYPE truxs_t_text_data.
DATA: BEGIN OF record,
* data element: BLDAT
bldat_001(010), "Invoice Date
* data element: BLART
blart_002(002), " Doc Type DR or DG if credit
* data element: BUKRS
bukrs_003(004), " Company Code
* data element: BUDAT
budat_004(010), "Posting Date
* data element: MONAT
monat_005(002), "period"
* data element: WAERS
waers_006(005), "Currency
* data element: XBLNR1
xblnr_007(016), "Invoice Number
* data element: BKTXT
bktxt_008(025), "PO number
* data element: SAEOBJART
docid_009(010),
* data element: NEWBS
newbs_010(002), "posting Key
* data element: NEWKO
newko_011(017), "Customer number or GL account
* data element: WRBTR
wrbtr_012(016), "Amount
* data element: DZTERM
zterm_013(004),
* data element: DZBD1T
zbd1t_014(003),
* data element: DZFBDT
zfbdt_015(010),
* data element: DZUONR
zuonr_016(018), "Invoice Number
* data element: SGTXT
sgtxt_017(050), " PO number
* data element: NEWBS
newbs_018(002),
* data element: NEWKO
newko_019(017), "GL Account
* data element: WRBTR
wrbtr_020(016), "Amount
* data element: MWSKZ
mwskz_021(002), "Tax
* data element: DZUONR
zuonr_022(018), "Invoice Number
* data element: SGTXT
sgtxt_023(050), "PO Number
* data element: PRCTR
prctr_024(010), "Profit Center
* data element: WRBTR
wrbtr_025(016), " Amount
* data element: MWSKZ
mwskz_026(002), "Tax
* data element: DZUONR
zuonr_027(018), "Invoice Number
* data element: SGTXT
sgtxt_028(050), "PO Number
* data element: FMORE
fmore_029(001),
* data element: PRCTR
prctr_030(010), "Pr Center
* data element: FWSTE
fwste_01_031(016),
END OF record.
DATA: BEGIN OF it_excel OCCURS 0,
* data element: XBLNR1
xblnr_007(016), "Invoice Number
* data element: BLDAT
bldat_001(010), "Invoice Date
* data element: WRBTR
wrbtr_012(016), "Amount
* data element: WRBTR
wrbtr_025(016), " Tax Amount
* data element: WRBTR
wrbtr_020(016), "Gross Amount
* data element: BLART
blart_002(002), " No of units
* data element: MONAT
monat_005(002), "No of units second test"
* data element: BKTXT
bktxt_008(025), "PO number
* data element: SGTXT
sgtxt_017(050), " PO number
* data element: BUKRS
bukrs_003(004), " Company Code
* data element: BUDAT
budat_004(010), "Posting Date
* budat_004 TYPE string, "Posting Date
* data element: WAERS
waers_006(005), "Currency*
* data element: NEWKO
newko_011(017), "Customer number or GL account
* data element : kunnr
kunnr_019(010), " customer
mwskz(002),
prctr(010),
date(002),
month(002),
** data element: BKTXT
* bktxt_008(025), "PO number
** data element: SAEOBJART
* docid_009(010),
** data element: NEWBS
* newbs_010(002), "posting Key
** data element: DZTERM
* zterm_013(004),
** data element: DZBD1T
* zbd1t_014(003),
** data element: DZFBDT
* zfbdt_015(010),
** data element: DZUONR
* zuonr_016(018), "Invoice Number
** data element: NEWBS
* newbs_018(002),
** data element: NEWKO
* newko_019(017), "GL Account
** data element: MWSKZ
* mwskz_021(002), "Tax
** data element: DZUONR
* zuonr_022(018), "Invoice Number
** data element: SGTXT
* sgtxt_023(050), "PO Number
** data element: PRCTR
* prctr_024(010), "Profit Center
** data element: MWSKZ
* mwskz_026(002), "Tax
** data element: DZUONR
* zuonr_027(018), "Invoice Number
** data element: SGTXT
* sgtxt_028(050), "PO Number
** data element: FMORE
* fmore_029(001),
** data element: PRCTR
* prctr_030(010), "Pr Center
** data element: FWSTE
* fwste_01_031(016),
END OF it_excel.
DATA : BEGIN OF it_bkpf OCCURS 0,
belnr LIKE bkpf-belnr,
budat LIKE bkpf-budat,
bldat LIKE bkpf-bldat,
xblnr LIKE bkpf-xblnr,
bktxt LIKE bkpf-bktxt,
total LIKE bseg-dmbtr,
numdocs TYPE p DECIMALS 0,
END OF it_bkpf,
BEGIN OF it_bseg OCCURS 0,
belnr LIKE bseg-belnr,
dmbtr LIKE bseg-dmbtr,
mwsts LIKE bseg-mwsts,
pswsl LIKE bseg-pswsl,
END OF it_bseg,
BEGIN OF it_final OCCURS 0,
belnr LIKE bkpf-belnr,
budat LIKE bkpf-budat,
bldat LIKE bkpf-bldat,
xblnr LIKE bkpf-xblnr,
bktxt LIKE bkpf-bktxt,
dmbtr LIKE bseg-dmbtr,
mwsts LIKE bseg-mwsts,
pswsl LIKE bseg-pswsl,
END OF it_final.
***** End generated data section ***
AT SELECTION-SCREEN ON VALUE-REQUEST FOR pfile.
PERFORM sub_browse_file. "Get file name
START-OF-SELECTION.
PERFORM sub_data_load. " Transfer excel into internal table.
PERFORM sub_calc_excel.
IF report = 'X'.
* PERFORM data_selection.
* PERFORM data_move.
*********************************GET ALV DATA
PERFORM alv_get_data.
*********************************ALV GRID DATA
PERFORM alv_grid.
ENDIF.
*if report = ''.
* PERFORM write.
* PERFORM open_dataset USING dataset.
PERFORM open_group.
* DO.
* READ DATASET dataset INTO record.
LOOP AT it_excel.
* IF sy-subrc <> 0. EXIT. ENDIF.
PERFORM bdc_dynpro USING 'SAPMF05A' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RF05A-NEWKO'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BKPF-BLDAT'
it_excel-bldat_001.
PERFORM bdc_field USING 'BKPF-BLART'
'DR'." record-blart_002.
PERFORM bdc_field USING 'BKPF-BUKRS'
it_excel-bukrs_003.
PERFORM bdc_field USING 'BKPF-BUDAT'
it_excel-budat_004.
PERFORM bdc_field USING 'BKPF-MONAT'
'3'. "record-monat_005.
PERFORM bdc_field USING 'BKPF-WAERS'
it_excel-waers_006.
PERFORM bdc_field USING 'BKPF-XBLNR'
it_excel-xblnr_007.
PERFORM bdc_field USING 'BKPF-BKTXT'
it_excel-bktxt_008.
PERFORM bdc_field USING 'FS006-DOCID'
'*' ."record-docid_009.
PERFORM bdc_field USING 'RF05A-NEWBS'
'01'." record-newbs_010.
PERFORM bdc_field USING 'RF05A-NEWKO'
it_excel-kunnr_019 .
PERFORM bdc_dynpro USING 'SAPMF05A' '0301'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RF05A-NEWKO'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BSEG-WRBTR'
it_excel-wrbtr_020." it_excel-wrbtr_012.
PERFORM bdc_field USING 'BSEG-ZTERM'
'NT30' ." record-zterm_013.
PERFORM bdc_field USING 'BSEG-ZBD1T'
'30'."record-zbd1t_014.
PERFORM bdc_field USING 'BSEG-ZFBDT'
it_excel-bldat_001."record-zfbdt_015.
PERFORM bdc_field USING 'BSEG-ZUONR'
it_excel-xblnr_007."record-zuonr_016.
PERFORM bdc_field USING 'BSEG-SGTXT'
it_excel-sgtxt_017.
PERFORM bdc_field USING 'RF05A-NEWBS'
'50'." record-newbs_018.
PERFORM bdc_field USING 'RF05A-NEWKO'
it_excel-newko_011." record-newko_019."Gl account
PERFORM bdc_dynpro USING 'SAPMF05A' '0300'.
PERFORM bdc_field USING 'BDC_CURSOR'
'BSEG-SGTXT'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BSEG-WRBTR'
it_excel-wrbtr_012."changes from 12 to 20
PERFORM bdc_field USING 'BSEG-MWSKZ'
it_excel-mwskz." record-mwskz_021.
PERFORM bdc_field USING 'BSEG-ZUONR'
it_excel-xblnr_007." record-zuonr_022.
PERFORM bdc_field USING 'BSEG-SGTXT'
it_excel-sgtxt_017." record-sgtxt_023.
PERFORM bdc_dynpro USING 'SAPLKACB' '0002'.
PERFORM bdc_field USING 'BDC_CURSOR'
'COBL-PRCTR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTE'.
PERFORM bdc_field USING 'COBL-PRCTR'
it_excel-prctr ." record-prctr_024.
PERFORM bdc_dynpro USING 'SAPMF05A' '0300'.
PERFORM bdc_field USING 'BDC_CURSOR'
'BSEG-WRBTR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=STER'.
PERFORM bdc_field USING 'BSEG-WRBTR'
it_excel-wrbtr_012." it_excel-wrbtr_025.
PERFORM bdc_field USING 'BSEG-MWSKZ'
it_excel-mwskz.
PERFORM bdc_field USING 'BSEG-ZUONR'
it_excel-xblnr_007." record-zuonr_027.
PERFORM bdc_field USING 'BSEG-SGTXT'
it_excel-sgtxt_017." record-sgtxt_028.
PERFORM bdc_field USING 'DKACB-FMORE'
'X' ."record-fmore_029.
PERFORM bdc_dynpro USING 'SAPLKACB' '0002'.
PERFORM bdc_field USING 'BDC_CURSOR'
'COBL-PARGB'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTE'.
PERFORM bdc_field USING 'COBL-PRCTR'
it_excel-prctr." record-prctr_030.
PERFORM bdc_dynpro USING 'SAPLTAX1' '0300'.
PERFORM bdc_field USING 'BDC_CURSOR'
'BSET-FWSTE(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=GOBU'.
PERFORM bdc_field USING 'BSET-FWSTE(01)'
it_excel-wrbtr_025." record-fwste_01_031.
PERFORM bdc_transaction USING 'FB01'.
REFRESH:bdcdata,messtab.
ENDLOOP.
REFRESH:bdcdata.
** PERFORM bdc_dynpro USING 'SAPMF05A' '0100'.
* PERFORM bdc_field USING 'BDC_CURSOR'
* 'RF05A-NEWKO'.
* PERFORM bdc_field USING 'BDC_OKCODE'
* '/00'.
* PERFORM bdc_field USING 'BKPF-BLDAT'
* record-bldat_001.
* PERFORM bdc_field USING 'BKPF-BLART'
* record-blart_002.
* PERFORM bdc_field USING 'BKPF-BUKRS'
* record-bukrs_003.
* PERFORM bdc_field USING 'BKPF-BUDAT'
* record-budat_004.
* PERFORM bdc_field USING 'BKPF-MONAT'
* record-monat_005.
* PERFORM bdc_field USING 'BKPF-WAERS'
* record-waers_006.
* PERFORM bdc_field USING 'BKPF-XBLNR'
* record-xblnr_007.
* PERFORM bdc_field USING 'BKPF-BKTXT'
* record-bktxt_008.
* PERFORM bdc_field USING 'FS006-DOCID'
* record-docid_009.
* PERFORM bdc_field USING 'RF05A-NEWBS'
* record-newbs_010.
* PERFORM bdc_field USING 'RF05A-NEWKO'
* record-newko_011.
* PERFORM bdc_dynpro USING 'SAPMF05A' '0301'.
* PERFORM bdc_field USING 'BDC_CURSOR'
* 'RF05A-NEWKO'.
* PERFORM bdc_field USING 'BDC_OKCODE'
* '/00'.
* PERFORM bdc_field USING 'BSEG-WRBTR'
* record-wrbtr_012.
* PERFORM bdc_field USING 'BSEG-ZTERM'
* record-zterm_013.
* PERFORM bdc_field USING 'BSEG-ZBD1T'
* record-zbd1t_014.
* PERFORM bdc_field USING 'BSEG-ZFBDT'
* record-zfbdt_015.
* PERFORM bdc_field USING 'BSEG-ZUONR'
* record-zuonr_016.
* PERFORM bdc_field USING 'BSEG-SGTXT'
* record-sgtxt_017.
* PERFORM bdc_field USING 'RF05A-NEWBS'
* record-newbs_018.
* PERFORM bdc_field USING 'RF05A-NEWKO'
* record-newko_019.
* PERFORM bdc_dynpro USING 'SAPMF05A' '0300'.
* PERFORM bdc_field USING 'BDC_CURSOR'
* 'BSEG-SGTXT'.
* PERFORM bdc_field USING 'BDC_OKCODE'
* '/00'.
* PERFORM bdc_field USING 'BSEG-WRBTR'
* record-wrbtr_020.
* PERFORM bdc_field USING 'BSEG-MWSKZ'
* record-mwskz_021.
* PERFORM bdc_field USING 'BSEG-ZUONR'
* record-zuonr_022.
* PERFORM bdc_field USING 'BSEG-SGTXT'
* record-sgtxt_023.
* PERFORM bdc_dynpro USING 'SAPLKACB' '0002'.
* PERFORM bdc_field USING 'BDC_CURSOR'
* 'COBL-PRCTR'.
* PERFORM bdc_field USING 'BDC_OKCODE'
* '=ENTE'.
* PERFORM bdc_field USING 'COBL-PRCTR'
* record-prctr_024.
* PERFORM bdc_dynpro USING 'SAPMF05A' '0300'.
* PERFORM bdc_field USING 'BDC_CURSOR'
* 'BSEG-WRBTR'.
* PERFORM bdc_field USING 'BDC_OKCODE'
* '=STER'.
* PERFORM bdc_field USING 'BSEG-WRBTR'
* record-wrbtr_025.
* PERFORM bdc_field USING 'BSEG-MWSKZ'
* record-mwskz_026.
* PERFORM bdc_field USING 'BSEG-ZUONR'
* record-zuonr_027.
* PERFORM bdc_field USING 'BSEG-SGTXT'
* record-sgtxt_028.
* PERFORM bdc_field USING 'DKACB-FMORE'
* record-fmore_029.
* PERFORM bdc_dynpro USING 'SAPLKACB' '0002'.
* PERFORM bdc_field USING 'BDC_CURSOR'
* 'COBL-PARGB'.
* PERFORM bdc_field USING 'BDC_OKCODE'
* '=ENTE'.
* PERFORM bdc_field USING 'COBL-PRCTR'
* record-prctr_030.
* PERFORM bdc_dynpro USING 'SAPLTAX1' '0300'.
* PERFORM bdc_field USING 'BDC_CURSOR'
* 'BSET-FWSTE(01)'.
* PERFORM bdc_field USING 'BDC_OKCODE'
* '=GOBU'.
* PERFORM bdc_field USING 'BSET-FWSTE(01)'
* record-fwste_01_031.
* PERFORM bdc_transaction USING 'FB01'.
* ENDDO.
PERFORM close_group.
* PERFORM close_dataset USING dataset.
*endif.
*& Form sub_browse_file
* text
* --> p1 text
* <-- p2 text
FORM sub_browse_file .
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
* FIELD_NAME = ' '
IMPORTING
file_name = pfile.
ENDFORM. " sub_browse_file
*& Form sub_data_load
* text
* --> p1 text
* <-- p2 text
FORM sub_data_load .
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
* I_FIELD_SEPERATOR =
i_line_header = 'X'
i_tab_raw_data = it_raw
i_filename = pfile
TABLES
i_tab_converted_data = it_excel[]
* EXCEPTIONS
* CONVERSION_FAILED = 1
* OTHERS = 2
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " sub_data_load
**& Form data_selection
** text
** --> p1 text
** <-- p2 text
*FORM data_selection .
* SELECT * FROM bkpf
* INTO CORRESPONDING FIELDS OF TABLE it_bkpf
* WHERE budat = p_budat AND
* bukrs = p_bukrs.
* IF NOT it_bkpf[] IS INITIAL.
* SELECT belnr dmbtr mwsts pswsl
* FROM bseg INTO TABLE it_bseg
* FOR ALL ENTRIES IN it_bkpf
* WHERE belnr = it_bkpf-belnr AND
* kunnr = p_kunnr AND
* hkont = p_hkont AND
* pswsl = p_waers.
* ENDIF.
*ENDFORM. " data_selection
**& Form data_move
** text
** --> p1 text
** <-- p2 text
*FORM data_move.
* SORT : it_bseg BY belnr,
* it_bkpf BY belnr.
* LOOP AT it_bseg.
* it_final-dmbtr = it_bseg-dmbtr.
* it_final-belnr = it_bseg-belnr.
* it_final-mwsts = it_bseg-mwsts.
* it_final-pswsl = it_bseg-pswsl.
* READ TABLE it_bkpf WITH KEY belnr = it_bseg-belnr BINARY SEARCH.
* IF sy-subrc = 0.
* it_final-budat = it_bkpf-budat.
* it_final-bldat = it_bkpf-bldat.
* it_final-xblnr = it_bkpf-xblnr.
* it_final-bktxt = it_bkpf-bktxt.
* ENDIF.
* APPEND it_final.
* CLEAR it_final.
* ENDLOOP.
*ENDFORM. " data_move
*& Form alv_get_data
* text
* --> p1 text
* <-- p2 text
FORM alv_get_data .
CLEAR it_fieldcat.
***************** Document number
* wa_fieldcat-col_pos = '1'. " ALV O/P COL-1
wa_fieldcat-fieldname = 'XBLNR_007'.
wa_fieldcat-seltext_m = 'Document number'.
wa_fieldcat-just = 'L'.
wa_fieldcat-no_zero(1) = 'X'.
wa_fieldcat-outputlen = 15.
wa_fieldcat-tabname = 'IT_EXCEL'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
***************** Posting Date
* wa_fieldcat-col_pos = '2'. " ALV O/P COL-1
wa_fieldcat-fieldname = 'BUDAT_004'.
wa_fieldcat-seltext_m = 'Posting Date'.
wa_fieldcat-just = 'L'.
wa_fieldcat-no_zero(1) = 'X'.
wa_fieldcat-outputlen = 20.
wa_fieldcat-tabname = 'IT_EXCEL'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
******************** Document Date
* wa_fieldcat-col_pos = '3'. " ALV O/P COL-2
wa_fieldcat-fieldname = 'BLDAT_001'.
wa_fieldcat-seltext_m = 'Document Date'.
wa_fieldcat-just = 'L'.
wa_fieldcat-tabname = 'IT_EXCEL'.
wa_fieldcat-outputlen = 15.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
********************* REFERENCE DOCUMENT
** wa_fieldcat-col_pos = '4'. " ALV O/P COL-2
* wa_fieldcat-fieldname = 'XBLNR'.
* wa_fieldcat-seltext_m = 'REFERENCE DOCUMENT'.
* wa_fieldcat-just = 'L'.
* wa_fieldcat-tabname = 'IT_EXCEL'.
** wa_fieldcat-outputlen = 15.
* APPEND wa_fieldcat TO it_fieldcat.
* CLEAR wa_fieldcat.
***************** DOCUMENT HEADER TEXT
* wa_fieldcat-col_pos = '5'. " ALV O/P COL-3
wa_fieldcat-fieldname = 'SGTXT_017'.
wa_fieldcat-seltext_m = 'DOCUMENT HEADER TEXT'.
wa_fieldcat-just = 'L'.
wa_fieldcat-tabname = 'IT_EXCEL'.
* wa_fieldcat-outputlen = 15.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
*******************Invoice Net amount
* wa_fieldcat-col_pos = '6'. " ALV O/P COL-4
wa_fieldcat-fieldname = 'WRBTR_012'.
wa_fieldcat-seltext_m = 'Invoice Net amount'.
wa_fieldcat-just = 'L'.
wa_fieldcat-tabname = 'IT_EXCEL'.
* wa_fieldcat-outputlen = 15.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
*********** Tax Amount
* wa_fieldcat-col_pos = '7'. " ALV O/P COL-5
wa_fieldcat-fieldname = 'WRBTR_025'.
wa_fieldcat-seltext_m = 'Tax Amount'.
wa_fieldcat-just = 'L'.
* wa_fieldcat-no_zero(1) = 'X'.
wa_fieldcat-tabname = 'IT_EXCEL'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
*********** NEt Amount
* wa_fieldcat-col_pos = '7'. " ALV O/P COL-5
wa_fieldcat-fieldname = 'WRBTR_020'.
wa_fieldcat-seltext_m = 'Net Amount'.
wa_fieldcat-just = 'L'.
* wa_fieldcat-no_zero(1) = 'X'.
wa_fieldcat-tabname = 'IT_EXCEL'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
*********** General ledger currency
* wa_fieldcat-col_pos = '7'. " ALV O/P COL-5
wa_fieldcat-fieldname = 'WAERS_006'.
wa_fieldcat-seltext_l = 'General ledger currency'.
wa_fieldcat-just = 'L'.
* wa_fieldcat-no_zero(1) = 'X'.
wa_fieldcat-outputlen = 25.
wa_fieldcat-tabname = 'IT_EXCEL'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
ENDFORM. " alv_get_data
*& Form alv_grid
* text
* --> p1 text
* <-- p2 text
FORM alv_grid .
* PERFORM fill_list_header USING it_top_of_page[].
* PERFORM event-build USING gt_events[].
PERFORM fill_layout USING ls_layout.
MESSAGE 'Please press F3 to generate a session or call transaction method after getting report!' TYPE 'I'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
is_layout = ls_layout
it_fieldcat = it_fieldcat
it_events = gt_events[]
i_save = 'A'
TABLES
t_outtab = it_excel
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " alv_grid
* FORM FILL_LAYOUT *
FORM fill_layout USING p_ls_layout TYPE slis_layout_alv.
p_ls_layout-zebra = 'X'.
p_ls_layout-cell_merge = 'X'.
ENDFORM. "fill_layout
*& Form sub_calc_excel
* text
* --> p1 text
* <-- p2 text
FORM sub_calc_excel .
data: idate TYPE sy-datum,
tdat8 type string.
LOOP AT it_excel.
CONCATENATE it_excel-blart_002 '/' it_excel-monat_005 '/' it_excel-bktxt_008 INTO
it_excel-sgtxt_017.
it_excel-bukrs_003 = p_bukrs.
* it_excel-budat_004 = p_budat.
it_excel-waers_006 = p_waers.
it_excel-newko_011 = p_hkont.
it_excel-kunnr_019 = p_kunnr.
it_excel-mwskz = p_mwskz.
it_excel-prctr = p_prctr.
idate = p_budat.
CALL FUNCTION 'DATUMSAUFBEREITUNG'
EXPORTING
* FLAGM = ' '
* FLAGW = ' '
IDATE = idate
* IMONT = ' '
* IWEEK = ' '
IMPORTING
* MDAT4 =
* MDAT6 =
* TDAT4 =
* TDAT6 =
TDAT8 = tdat8
* WDAT4 =
* WDAT6 =
* EXCEPTIONS
* DATFM_UNGUELTIG = 1
* DATUM_UNGUELTIG = 2
* OTHERS = 3
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
it_excel-budat_004 = tdat8.
* CONCATENATE it_excel-budat_004+4(2) '/' it_excel-budat_004+6(2) '/' it_excel-budat_004+0(4)
* INTO it_excel-budat_004.
* SPLIT it_excel-bldat_001 AT '/' INTO it_excel-month it_excel-date.
* CONCATENATE it_excel-date '.' it_excel-month '.' it_excel-bldat_001+6(4) INTO it_excel-bldat_001.
MODIFY it_excel.
CLEAR it_excel.
ENDLOOP.
ENDFORM. " sub_calc_excel
*& Form write
* text
* --> p1 text
* <-- p2 text
*form write .
*OPEN DATASET dataset FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
*data: wa_excel like line of it_excel.
*loop at it_excel into wa_excel.
*TRANSFER wa_excel to dataset.
*endloop.
*CLOSE DATASETdataset.
*endform. " write -
Does commit work (commiting the changess to database take same time for ..
Does commit work (commiting the changess to database )take same time for one record and 1000 records
Hi ,
There is some micro seconds differences in updating the recors . If you have huge records ,split the data into parts and insert it .
To avoid errors or warnings ,you can use 'WAIT UPTO 5 SECONDS ' .
Thanks
Jagadeesh.G -
Error preventing the commit to the database??!
hi ,
i have this form i use to modify a record on the database
i just want to add a date to a certain column but in the browser when i hit the commit
it says
JBO-26080 Error while selecting entity for <name of the table>
i am kind of confused i check the error report site the site that give (very small explanation on the JBO errors) and it says :
JBO-26080: DMLException
Cause: An unexpected exception occurred while executing the SQL to fetch data for an entity instance or lock it.
Action: Fix the cause for the SQLException in the details of this exception.
which is VERY general so if someone could please clear me on this
by the way i am using ADF BC and all the attributes have the updatable set to always
thx carlthx for the reply
yeah it turned out that the squeleton of the table posted on the DB was not the same as the one in jdev
one table has been removed and it was not in jdev
i tried the syncronise with database option but this option does not seem to check for this
why is that?
what exactly is this option syncronising with the DB? if it is not check for changes inside the table
thx carl -
Solving "COMMIT business rules" on the database server
Headstart Oracle Designer related white paper
"CDM RuleFrame Overview: 6 Reasons to get Framed"
(at //otn.oracle.com/products/headstart/content.html) says:
"For a number of business rules it is not possible to implement these in the server
using traditional check constraints and database triggers. Below you can find two examples:
Example rule 1: An Order must have at least one Order Line ..."
But, one method exists that allows solving "COMMIT rules" completely on the database level.
That method consists of the possibility of delaying the checking of the declarative constraints (NOT NULL, Primary Key, Unique Key, Foreign Key, Check Constraints) until the commit
(that method was introduced first in the version 8.0.).
E.g. we add the field "num_emps" to the DEPT table, which always has the value of the number
of the belonging EMP rows and add DEFERRED CK which uses the values from that field:
ALTER TABLE dept ADD num_emps NUMBER DEFAULT 0 NOT NULL
UPDATE dept
SET num_emps = (SELECT COUNT (*) FROM emp WHERE emp.deptno = dept.deptno)
DELETE dept WHERE num_emps = 0
ALTER TABLE dept ADD CONSTRAINT dept_num_emps_ck CHECK (num_emps > 0) INITIALLY DEFERRED
Triggers that insure the solving of the server side "COMMIT rules" are fairly simple.
We need a packed variable that is set and reset in the EMP triggers and those value
is read in the bur_dept trigger (of course, we could have place the variable in the package
specification and change/read it directly, thus not needing the package body,
but this is a "cleaner" way to do it):
CREATE OR REPLACE PACKAGE pack IS
PROCEDURE set_flag;
PROCEDURE reset_flag;
FUNCTION dml_from_emp RETURN BOOLEAN;
END;
CREATE OR REPLACE PACKAGE BODY pack IS
m_dml_from_emp BOOLEAN := FALSE;
PROCEDURE set_flag IS
BEGIN
m_dml_from_emp := TRUE;
END;
PROCEDURE reset_flag IS
BEGIN
m_dml_from_emp := FALSE;
END;
FUNCTION dml_from_emp RETURN BOOLEAN IS
BEGIN
RETURN m_dml_from_emp;
END;
END;
CREATE OR REPLACE TRIGGER bir_dept
BEFORE INSERT ON dept
FOR EACH ROW
BEGIN
:NEW.num_emps := 0;
END;
CREATE OR REPLACE TRIGGER bur_dept
BEFORE UPDATE ON dept
FOR EACH ROW
BEGIN
IF :OLD.deptno <> :NEW.deptno THEN
RAISE_APPLICATION_ERROR (-20001, 'Can''t change deptno in DEPT!');
END IF;
-- only EMP trigger can change "num_emps" column
IF NOT pack.dml_from_emp THEN
:NEW.num_emps := :OLD.num_emps;
END IF;
END;
CREATE OR REPLACE TRIGGER air_emp
AFTER INSERT ON emp
FOR EACH ROW
BEGIN
pack.set_flag;
UPDATE dept
SET num_emps = num_emps + 1
WHERE deptno = :NEW.deptno;
pack.reset_flag;
END;
CREATE OR REPLACE TRIGGER aur_emp
AFTER UPDATE ON emp
FOR EACH ROW
BEGIN
IF NVL (:OLD.deptno, 0) <> NVL (:NEW.deptno, 0) THEN
pack.set_flag;
UPDATE dept
SET num_emps = num_emps - 1
WHERE deptno = :OLD.deptno;
UPDATE dept
SET num_emps = num_emps + 1
WHERE deptno = :NEW.deptno;
pack.reset_flag;
END IF;
END;
CREATE OR REPLACE TRIGGER adr_emp
AFTER DELETE ON emp
FOR EACH ROW
BEGIN
pack.set_flag;
UPDATE dept
SET num_emps = num_emps - 1
WHERE deptno = :OLD.deptno;
pack.reset_flag;
END;
If we insert a new DEPT without the belonging EMP, or delete all EMPs belonging to a certain DEPT, or move all EMPs of a certain DEPT, when the COMMIT is issued we get the following error:
ORA-02091: transaction rolled back
ORA-02290: check constraint (SCOTT.DEPT_NUM_EMPS_CK) violated
Disvantage is that one "auxiliary" column is (mostly) needed for each "COMMIT rule".
If we'd like to add another "COMMIT rule" to the DEPT table, like:
"SUM (sal) FROM emp WHERE deptno = p_deptno must be <= p_max_dept_sal"
we would have to add another column, like "dept_sal".
CDM RuleFrame advantage is that it does not force us to add "auxiliary" columns.
We must emphasize that in real life we would not write PL/SQL code directly in the database triggers, but in packages, nor would we directly use RAISE_APPLICATION_ERROR.
It is written this way in this sample only for the code clarity purpose.
Regards
Zlatko SiroticZlatko,
You are right, your method is a way to implement "COMMIT rules" completely on the database level.
As you said yourself, disadvantage is that you need an extra column for each such rule,
while with CDM RuleFrame this is not necessary.
A few remarks:
- By adding an auxiliary column (like NUM_EMPS in the DEPT table) for each "COMMIT rule",
you effectively change the type of the rule from Dynamic (depending on the type of operation)
to a combination of Change Event (for updating NUM_EMPS) and Static (deferred check constraint on NUM_EMPS).
- Deferred database constraints have the following disadvantages:
When something goes wrong within the transaction, then the complete transaction is rolled back, not just the piece that went
wrong. Therefore, it becomes more important to use appropriate commit units.
There is no report of the exact row responsible for the violation nor are further violations either by other rows or of other
constraints reported.
If you use Oracle Forms as a front end application, the errors raised from deferred constraints are not handled very well.
- CDM discourages the use of check constraints. One of the reasons is, that when all tuple rules are placed in the CAPI,
any violations can be reported at the end of the transaction level together with all other rule violations.
A violated check constraint would abort the transaction right away, without the possibility of reporting back other rule violations.
So I think your tip is a good alternative if for some reason you cannot use CDM RuleFrame,
but you'd miss out on all the other advantages of RuleFrame that are mentioned in the paper!
kind regards, Sandra -
Call the database table on commit operation and fetch the rows
Hi
I am new to Bpel. I have a task to call the database table on commit operation and fetch the rows and call a webservice iteratively for fetching the data into a file?
Can anybody help me on this
Thanks and regards
RichaHI,
update ZYBKP set MATNR = <b>zcore_2-ZDUMMY</b> where matnr = <b>zcore_2-ZDUMMY</b>.
update ZY310 set MATNR = zcore_2-ZDUMMY where matnr = zcore_2-ZDUMMY.
update ZYBCS_LOT set MATNR = zcore_2-ZDUMMY where matnr = zcore_2-ZDUMMY.
<b>YOU ARE COMPARING SAME MATERIAL AND UPDATING WITH THE SAME..</b> AND ALSO ZCORE_2 IS A DATABASE TABLE AND MAY NOT CONTAIN ANY VALUE AT THAT POINT...
in these statments you say that
update table set matnr = 'MATNR' WHERE MATNR = 'MATNR'.
EVEN THOUGH THIS STATMENT IS EXECUTED THERE WILL NOT BE ANY CHANGE IN THE TABLE...
Thanks,
Mahesh -
User exit/BADI AFTER the database commit in va01 va02
Hi All
I need an user exit/BADI <b>AFTER the database tables are updated</b> when save button is pressed on VA01/VA02, both these user exits are fired before that.
Regards
BadariCheck out all these exits
SDTRM001 Reschedule schedule lines without a new ATP check
V45A0001 Determine alternative materials for product selection
V45A0002 Predefine sold-to party in sales document
V45A0003 Collector for customer function modulpool MV45A
V45A0004 Copy packing proposal
V45E0001 Update the purchase order from the sales order
V45E0002 Data transfer in procurement elements (PRreq., assembly)
V45L0001 SD component supplier processing (customer enhancements)
V45P0001 SD customer function for cross-company code sales
V45S0001 Update sales document from configuration
V45S0003 MRP-relevance for incomplete configuration
V45S0004 Effectivity type in sales order
V45W0001 SD Service Management: Forward Contract Data to Item
V46H0001 SD Customer functions for resource-related billing
V60F0001 SD Billing plan (customer enhancement) diff. to billing plan
SDAPO001 Activating Sourcing Subitem Quantity Propagation -
Log Wait In Shutting Down The database
Hi Exports,
We have a production server. It contain its some of its datafile a cluster disk on windows server 2008. Yesterday Suddenly one of the cluster disk offline due to some network issue. And i found the following error on my alert log.
Mon Mar 18 19:59:27 2013
KCF: write/open error block=0xd13a6 online=1
file=22 M:\LEGACY_ORADATA\LEGACY.DBF
error=27070 txt: 'OSD-04016: Error queuing an asynchronous I/O request.
O/S-Error: (OS 19) The media is write protected.'
Mon Mar 18 19:59:27 2013
Automatic datafile offline due to write error on
file 22: M:\LEGACY_ORADATA\LEGACY.DBF
Mon Mar 18 19:59:28 2013
KCF: write/open error block=0xd3c10 online=1
file=22 M:\LEGACY_ORADATA\LEGACY.DBF
error=27070 txt: 'OSD-04016: Error queuing an asynchronous I/O request.
O/S-Error: (OS 19) The media is write protected.'
Mon Mar 18 19:59:28 2013
Automatic datafile offline due to write error on
file 22: M:\LEGACY_ORADATA\LEGACY.DBF
Mon Mar 18 21:49:34 2013
MMNL absent for 1204 secs; Foregrounds taking over
Mon Mar 18 22:00:05 2013
Errors in file d:\oracle\product\10.2.0\admin\legacy\bdump\legacy_j000_13148.trc:
ORA-12012: error on auto execute of job 8950
ORA-01115: IO error reading block from file ORA-01115: IO error reading block from file 5 (block # 106)
ORA-01110: data file 5: 'M:\LEGACY_ORADATA\OLD_TRANSACTION.DBF'
ORA-27091: unable to queue I/O
ORA-27070: async read/write failed
OSD-04006: ReadFile() failure, unable to read from file
O/S-Error: (OS 21) The device is not ready.
ORA-06512: at "SYS.PRVT_ADVISOR", line 1624
ORA-06512: at "SYS.DBMS_ADVISOR", line 186
ORA-06512: at "SYS.DBMS_SPACE", line 1500
ORA-06512: at "SYS.DBMS_SPACE", line 1566
(block # )
After that cluster disk available i am getting the same error. when i am trying to recover the datafile then i got the the
ORA-00283: recovery session canceled due to errors
ORA-01124: cannot recover data file 22 - file is in use or recovery
ORA-01110: data file 22
So check the database open_mode and it shows READ WRITE.
so i fire shut Immediate command. Now it take very long time to to shut down. Please suggest some solution as it is a prodtction database.
Thanks in advance...
Asit K. MohantyHi,
What is the status of the files mentioned in the alert log? In the alert log, I see only 2 data files in the error messages you pasted, are all other data files safe and on some other disks which did not fail?
select name,status from v$datafile;During shutdown, what are the messages in alert log file?
Salman -
Capture Web Cam image in APEX and Upload into the Database
Overview
By using a flash object, you should be able to interface with a usb web cam connected to the client machine. Their are a couple of open source ones that I know about, but the one I chose to go with is by Taboca Labs and is called CamCanvas. This is released under the MIT license, and it is at version 0.2, so not very mature - but in saying that it seems to do the trick. The next part is to upload a snapshot into the database - in this particular implementation, it is achieved by taking a snapshot, and putting that data into the canvas object. This is a new HTML5 element, so I am not certain what the IE support would be like. Once you have the image into the canvas, you can then use the provided function convertToDataURL() to convert the image into a Base64 encoded string, which you can then use to convert into to a BLOB. There is however one problem with the Base64 string - APEX has a limitation of 32k for and item value, so can't be submitted by normal means, and a workaround (AJAX) has to be implemented.
Part 1. Capturing the Image from the Flash Object into the Canvas element
Set up the Page
Required Files
Download the tarball of the webcam library from: https://github.com/taboca/CamCanvas-API-/tarball/master
Upload the necessary components to your application. (The flash swf file can be got from one of the samples in the Samples folder. In the root of the tarball, there is actually a swf file, but this seems to be a different file than of what is in the samples - so I just stick with the one from the samples)
Page Body
Create a HTML region, and add the following:
<div class="container">
<object id="iembedflash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="320" height="240">
<param name="movie" value="#APP_IMAGES#camcanvas.swf" />
<param name="quality" value="high" />
<param name="allowScriptAccess" value="always" />
<embed allowScriptAccess="always" id="embedflash" src="#APP_IMAGES#camcanvas.swf" quality="high" width="320" height="240"
type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" mayscript="true" />
</object>
</div>
<p><a href="javascript:captureToCanvas()">Capture</a></p>
<canvas style="border:1px solid yellow" id="canvas" width="320" height="240"></canvas>That will create the webcam container, and an empty canvas element for the captured image to go into.
Also, have a hidden unprotected page item to store the Base64 code into - I called mine P2_IMAGE_BASE64
HTML Header and Body Attribute
Add the Page HTML Body Attribute as:
onload="init(320,240)"
JavaScript
Add the following in the Function and Global Variable Declarations for the page (mostly taken out of the samples provided)
//Camera relations functions
var gCtx = null;
var gCanvas = null;
var imageData = null;
var ii=0;
var jj=0;
var c=0;
function init(ww,hh){
gCanvas = document.getElementById("canvas");
var w = ww;
var h = hh;
gCanvas.style.width = w + "px";
gCanvas.style.height = h + "px";
gCanvas.width = w;
gCanvas.height = h;
gCtx = gCanvas.getContext("2d");
gCtx.clearRect(0, 0, w, h);
imageData = gCtx.getImageData( 0,0,320,240);
function passLine(stringPixels) {
//a = (intVal >> 24) & 0xff;
var coll = stringPixels.split("-");
for(var i=0;i<320;i++) {
var intVal = parseInt(coll);
r = (intVal >> 16) & 0xff;
g = (intVal >> 8) & 0xff;
b = (intVal ) & 0xff;
imageData.data[c+0]=r;
imageData.data[c+1]=g;
imageData.data[c+2]=b;
imageData.data[c+3]=255;
c+=4;
if(c>=320*240*4) {
c=0;
gCtx.putImageData(imageData, 0,0);
function captureToCanvas() {
flash = document.getElementById("embedflash");
flash.ccCapture();
var canvEle = document.getElementById('canvas');
$s('P2_IMAGE_BASE64', canvEle.toDataURL());//Assumes hidden item name is P2_IMAGE_BASE64
clob_Submit();//this is a part of part (AJAX submit value to a collection) two
}In the footer region of the page (which is just a loading image to show whilst the data is being submitted to the collection [hidden by default]) :<img src="#IMAGE_PREFIX#processing3.gif" id="AjaxLoading"
style="display:none;position:absolute;left:45%;top:45%;padding:10px;border:2px solid black;background:#FFF;" />If you give it a quick test, you should be able to see the webcam feed and capture it into the canvas element by clicking the capture link, in between the two elements - it might through a JS error since the clob_Submit() function does not exist yet.
*Part 2. Upload the image into the Database*
As mentioned in the overview, the main limitation is that APEX can't submit values larger than 32k, which I hope the APEX development team will be fixing this limitation in a future release, the workaround isn't really good from a maintainability perspective.
In the sample applications, there is one that demonstrates saving values to the database that are over 32k, which uses an AJAX technique: see http://www.oracle.com/technetwork/developer-tools/apex/application-express/packaged-apps-090453.html#LARGE.
*Required Files*
From the sample application, there is a script you need to upload, and reference in your page. So you can either install the sample application I linked to, or grab the script from the demonstration I have provided - its called apex_save_large.js.
*Create a New Page*
Create a page to Post the large value to (I created mine as 1000), and create the following process, with the condition that Request = SAVE. (All this is in the sample application for saving large values).declare
l_code clob := empty_clob;
begin
dbms_lob.createtemporary( l_code, false, dbms_lob.SESSION );
for i in 1..wwv_flow.g_f01.count loop
dbms_lob.writeappend(l_code,length(wwv_flow.g_f01(i)),wwv_flow.g_f01(i));
end loop;
apex_collection.create_or_truncate_collection(p_collection_name => wc_pkg_globals.g_base64_collection);
apex_collection.add_member(p_collection_name => wc_pkg_globals.g_base64_collection,p_clob001 => l_code);
htmldb_application.g_unrecoverable_error := TRUE;
end;I also created a package for storing the collection name, which is referred to in the process, for the collection name:create or replace
package
wc_pkg_globals
as
g_base64_collection constant varchar2(40) := 'BASE64_IMAGE';
end wc_pkg_globals;That is all that needs to be done for page 1000. You don't use this for anything else, *so go back to edit the camera page*.
*Modify the Function and Global Variable Declarations* (to be able to submit large values.)
The below again assumes the item that you want to submit has an item name of 'P2_IMAGE_BASE64', the condition of the process on the POST page is request = SAVE, and the post page is page 1000. This has been taken srtaight from the sample application for saving large values.//32K Limit workaround functions
function clob_Submit(){
$x_Show('AjaxLoading')
$a_PostClob('P2_IMAGE_BASE64','SAVE','1000',clob_SubmitReturn);
function clob_SubmitReturn(){
if(p.readyState == 4){
$x_Hide('AjaxLoading');
$x('P2_IMAGE_BASE64').value = '';
}else{return false;}
function doSubmit(r){
$x('P2_IMAGE_BASE64').value = ''
flowSelectAll();
document.wwv_flow.p_request.value = r;
document.wwv_flow.submit();
}Also, reference the script that the above code makes use of, in the page header<script type="text/javascript" src="#WORKSPACE_IMAGES#apex_save_large.js"></script>Assuming the script is located in workspace images, and not associated to a specific app. Other wise reference #APP_IMAGES#
*Set up the table to store the images*CREATE TABLE "WC_SNAPSHOT"
"WC_SNAPSHOT_ID" NUMBER NOT NULL ENABLE,
"BINARY" BLOB,
CONSTRAINT "WC_SNAPSHOT_PK" PRIMARY KEY ("WC_SNAPSHOT_ID")
create sequence seq_wc_snapshot start with 1 increment by 1;
CREATE OR REPLACE TRIGGER "BI_WC_SNAPSHOT" BEFORE
INSERT ON WC_SNAPSHOT FOR EACH ROW BEGIN
SELECT seq_wc_snapshot.nextval INTO :NEW.wc_snapshot_id FROM dual;
END;
Then finally, create a page process to save the image:declare
v_image_input CLOB;
v_image_output BLOB;
v_buffer NUMBER := 64;
v_start_index NUMBER := 1;
v_raw_temp raw(64);
begin
--discard the bit of the string we dont need
select substr(clob001, instr(clob001, ',')+1, length(clob001)) into v_image_input
from apex_collections
where collection_name = wc_pkg_globals.g_base64_collection;
dbms_lob.createtemporary(v_image_output, true);
for i in 1..ceil(dbms_lob.getlength(v_image_input)/v_buffer) loop
v_raw_temp := utl_encode.base64_decode(utl_raw.cast_to_raw(dbms_lob.substr(v_image_input, v_buffer, v_start_index)));
dbms_lob.writeappend(v_image_output, utl_raw.length(v_raw_temp),v_raw_temp);
v_start_index := v_start_index + v_buffer;
end loop;
insert into WC_SNAPSHOT (binary) values (v_image_output); commit;
end;Create a save button - add some sort of validation to make sure the hidden item has a value (i.e. image has been captured). Make the above conditional for request = button name so it only runs when you click Save (you probably want to disable this button until the data has been completely submitted to the collection - I haven't done this in the demonstration).
Voila, you should have now be able to capture the image from a webcam. Take a look at the samples from the CamCanvas API for extra effects if you wanted to do something special.
And of course, all the above assumed you want a resolution of 320 x 240 for the image.
Disclaimer: At time of writing, this worked with a logitech something or rather webcam, and is completely untested on IE.
Check out a demo: http://apex.oracle.com/pls/apex/f?p=trents_demos:webcam_i (my image is a bit blocky, but i think its just my webcam. I've seen others that are much more crisp using this) Also, just be sure to wait for the progress bar to dissappear before clicking Save.
Feedback welcomed.Hmm, maybe for some reason you aren't getting the base64 version of the saved image? Is the collection getting the full base64 string? Seems like its not getting any if its no data found.
The javascript console is your friend.
Also, in the example i used an extra page, from what one of the examples on apex packages apps had. But since then, I found this post by Carl: http://carlback.blogspot.com/2008/04/new-stuff-4-over-head-with-clob.html - I would use this technique for submitting the clob, over what I have done - as its less hacky. Just sayin. -
Networksetup script cannot commit changes to network database
I use a shell script to configure my machines ip address quickly. This script works perfectly on 10.8 and 10.7. when i upgraded to 10.9, I can't use this script anymore. the system promt :
networksetup -setmanual $2 $3 $4 $5
** Error: Unable to commit changes to network database.
however, if I type the command in the terminal it is OK. But not in a sh script.
I tried wait, sleep after the command in the script both doesn't work.
any suggestions?
#set IP addr
#networksetup -listallnetworkservices
if [ "$1" != "nochange" ]
then
systemsetup -setcomputername $1
wait
systemsetup -setlocalsubnetname $1
wait
#defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server.plist NetBIOSName $1
fi
if [ "$3" != "nochange" ]
then
networksetup -setmanual $2 $3 $4 $5
wait
fi
if [ "$6" != "nochange" ]
then
networksetup -setdnsservers $2 $7
wait
fi
networksetup -setsearchdomains $2 cn.oracle.com
wait
networksetup -setautoproxyurl $2 http://wpad/wpad.dat
waitif you want to disable service, you can write script and put it to /Library/Startupitems/yourscriptname/
this is a folder you must create ,and your script name must the same as folder name. and you also need a plist file in the same folder
you can search for keyword "Startupitems"
and i am using this to modify ip address when start. the script will run under root privilige
and if you want to run in terminal, you must use
sudo networksetup ....
or sudo -i
networksetup ...
in addition
add sleep several seconds after running this cmd seems solve this problem.
I think the system need time to make change -
SQLJ with EJB. Do not insert data in the database
Hi All!
I4m developing an application using SQLJ and EJB (session beans,
container managed transactions), and when I try to insert data
in the database it doesn't work. All goes well (apparently), but
the changes do not have effect in the DB.
I've tried to use bean managed transactions, but when I try to
insert data, I get the error: NOT IN A TRANSACTION. The code of
the client in the bean managed is the following:
public class MiEJBCLiente {
public static void main(String[] args) {
String namespaceURL
= "jdbc:oracle:thin:@rabinf56:1521:prinpal";
String ejbUrl
= "sess_iiop://rabinf56:2481:prinpal/test/Bean";
String username = "xxx";
String password = "xxx";
// Setup the environment
Hashtable environment = new Hashtable();
// Tell JNDI to speak sess_iiop
environment.put
(javax.naming.Context.URL_PKG_PREFIXES, "oracle.aurora.jndi");
// Tell sess_iiop who the user is
environment.put(Context.SECURITY_PRINCIPAL, username);
// Tell sess_iiop what the password is
environment.put(Context.SECURITY_CREDENTIALS, password);
// Tell sess_iiop to use credential authentication
environment.put(Context.SECURITY_AUTHENTICATION,
ServiceCtx.NON_SSL_LOGIN);
environment.put
(jdbc_accessURLContextFactory.CONNECTION_URL_PROP, namespaceURL);
UserTransaction ut = null;
// Lookup the URL
hello.MiBeanHome homeInterface = null;
try {
Context ic = new InitialContext(environment);
DriverManager.registerDriver (new
oracle.jdbc.driver.OracleDriver());
ut = (UserTransaction)ic.lookup
("jdbc_access://test/BeanTrans");
homeInterface = (hello.MiBeanHome) ic.lookup(ejbUrl);
catch (SQLException e) {
// That's it!
try {
System.out.println("Creating a new EJB instance");
hello.MiBean remoteInterface = homeInterface.create();
ut.begin ();
remoteInterface.inserta();
ut.commit();
catch (Exception e) {
System.out.println(e.getMessage());
e.printStackTrace();
I4m waiting for suggests.
Thanks in advance...Hi,
Are you sure it's a front-end bug? Try to double check your back-end code.
If you still believe the bug is in the front-end, try to debug the insertHandler function to see if you are attaching the UserVO properly into the UserEvent.
Best regards,
Pablo Souza -
The database structure has been modified - how to check if it happend?
Hello,
I have a question. How to check if the database structure has been modified? I know that there is shown a messagebox after creating table and adding some fields, but sometimes this message appear after some seconds. The problem is that I want to create table and UDO for this table, and until database structure is not modified I got an error message. If I wait and DB strucuture modifies then UDO is creating correctly.
My question is - does anyone know how to check if database structure has been modified?
Regards,
HmgHi Szymon,
I guess you are stuck up in a kinda scenario, where in, you will be populating a form with values, before the structure modifies, if this is going to be your problem, I can help you out with a work around.
In the beginning of the process, before the creation of the UDO or tables, set a boolean value to false, and once all UDO's and Tables are created, only then, should you make it true and only after the boolean becomes true, you should proceed with populating the values from the screen.
I really ament sure what your problem is, but one of my guys faced this problem, I then, thought even you might have a similar problem.
Satish. -
Enterprise Manager is not able to connect to the database instance....
Hi all,
Currently i'm facing a big issue here.
I have install the Oracle 10g on Window 2003 SE.
And currently the Enterprise manager is not be able to conenct to the database and my database is still running.With my listener is up.
But from the Enterprise manager's it show that everythg is down.
and when i try to restart it,i ask for os id and password and dbuser and dbpassword.
frm the SQL plus,i can easily startup and shutdown the database.
So i would like to know i can rectify this problem.
please kindly help me.I have post the setting of the databse as below
tnsnames.ora
==========
# Filename......: tnsnames.ora
# Created.......: created by SAP AG, R/3 Rel. >= 6.10
# Name..........:
# Date..........:
# @(#) $Id: //bc/700-1_REL/src/ins/SAPINST/impl/tpls/ora/ind/TNSNAMES.ORA#4 $
SDB.WORLD=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(COMMUNITY = SAP.WORLD)
(PROTOCOL = TCP)
(HOST = SAP_SOLMAN)
(PORT = 1527)
(CONNECT_DATA =
(SID = SDB)
(GLOBAL_NAME = SDB.WORLD)
sqlnet.ora
========
# sqlnet.ora Network Configuration File: E:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\sqlnet.ora
# Generated by Oracle configuration tools.
# 05.01.06 set to default
#TCP.NODELAY=YES
# 05.01.06 set to 32768
# 05.01.06 unsorported parameter now
#NAME.DEFAULT_ZONE = WORLD
# 05.01.06 set the default to 10
# Filename......: sqlnet.ora
# Created.......: created by SAP AG, R/3 Rel. >= 6.10
# Name..........:
# Date..........:
# @(#) $Id: //bc/700-1_REL/src/ins/SAPINST/impl/tpls/ora/ind/SQLNET.ORA#4 $
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT, HOSTNAME, LDAP)
NAMES.DEFAULT_DOMAIN = WORLD
DEFAULT_SDU_SIZE = 32768
SQLNET.EXPIRE_TIME = 10
Listener.ora
=========
# Filename......: listener.ora
# Created.......: created by SAP AG, R/3 Rel. >= 6.10
# Name..........:
# Date..........:
# @(#) $Id: //bc/700-1_REL/src/ins/SAPINST/impl/tpls/ora/ind/LISTENER.ORA#4 $
ADMIN_RESTRICTIONS_LISTENER = on
LISTENER =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = IPC)
(KEY = SDB.WORLD)
(ADDRESS=
(PROTOCOL = IPC)
(KEY = SDB)
(ADDRESS =
(COMMUNITY = SAP.WORLD)
(PROTOCOL = TCP)
(HOST = SAP_SOLMAN)
(PORT = 1527)
STARTUP_WAIT_TIME_LISTENER = 0
CONNECT_TIMEOUT_LISTENER = 10
TRACE_LEVEL_LISTENER = OFF
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = SDB)
(ORACLE_HOME = E:\oracle\product\10.2.0\db_1)
Listener status
===========
LSNRCTL> status
Connecting to (ADDRESS=(PROTOCOL=IPC)(KEY=SDB.WORLD))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Produ
ction
Start Date 15-AUG-2006 15:14:48
Uptime 0 days 2 hr. 43 min. 31 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File E:\oracle\product\10.2.0\db_1\network\admin\listener.o
ra
Listener Log File E:\oracle\product\10.2.0\db_1\network\log\listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\SDB.WORLDipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\SDBipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=SAP_solman)(PORT=1527)))
Services Summary...
Service "SDB" has 1 instance(s).
Instance "SDB", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
emoms.log
========
2006-08-15 18:03:20,562 [HttpRequestHandler-2254042] ERROR conn.ConnectionService verifyRepositoryEx.433 - Invalid Connection Pool. ERROR = Io exception: The Network Adapter could not establish the connection
2006-08-15 18:03:21,547 [HttpRequestHandler-2254042] WARN jdbc.ConnectionCache _getConnection.303 - Got a fatal exeption when getting a connection; Error code = 17002; Cleaning up cache and retrying
2006-08-15 18:03:21,547 [HttpRequestHandler-2254042] WARN jdbc.ConnectionCache _getConnection.306 - Io exception: The Network Adapter could not establish the connection
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:254)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:386)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:493)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:164)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:767)
at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:324)
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:114)
at oracle.jdbc.pool.OracleConnectionCacheImpl.getNewPoolOrXAConnection(OracleConnectionCacheImpl.java:694)
at oracle.jdbc.pool.OracleConnectionCacheImpl.getPooledConnection(OracleConnectionCacheImpl.java:540)
at oracle.jdbc.pool.OracleConnectionCacheImpl.getConnection(OracleConnectionCacheImpl.java:346)
at oracle.jdbc.pool.OracleConnectionCacheImpl.getConnection(OracleConnectionCacheImpl.java:324)
at oracle.sysman.util.jdbc.ConnectionCache._getConnection(ConnectionCache.java:296)
at oracle.sysman.util.jdbc.ConnectionCache.getUnwrappedConnection(ConnectionCache.java:423)
at oracle.sysman.emSDK.svc.conn.FGAConnectionCache.getFGAConnection(FGAConnectionCache.java:156)
at oracle.sysman.emSDK.svc.conn.ConnectionService.getPrivateConnection(ConnectionService.java:605)
at oracle.sysman.emdrep.receiver.OMSHandshake.getParameterFromDB(OMSHandshake.java:387)
at oracle.sysman.emdrep.receiver.OMSHandshake.getMaxAgentCompatVer(OMSHandshake.java:369)
at oracle.sysman.emdrep.receiver.OMSHandshake.handshake(OMSHandshake.java:794)
at oracle.sysman.emdrep.receiver.OMSHandshake.handshake(OMSHandshake.java:648)
at oracle.sysman.emdrep.receiver.FxferRecv.doGet(FxferRecv.java:658)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.sysman.eml.app.ContextInitFilter.doFilter(ContextInitFilter.java:239)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:604)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:793)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
at java.lang.Thread.run(Thread.java:534)
2006-08-15 18:03:22,531 [HttpRequestHandler-2254042] ERROR eml.OMSHandshake getParameterFromDB.402 - Io exception: The Network Adapter could not establish the connection
2006-08-15 18:03:22,531 [HttpRequestHandler-2254042] ERROR eml.OMSHandshake processFailure.619 - OMSHandshake failed.(AGENT URL = http://SAP_solman:3938/emd/main)(ERROR = INTERNAL_ERROR)
2006-08-15 18:03:35,547 [HttpRequestHandler-9249408] WARN jdbc.ConnectionCache _getConnection.303 - Got a fatal exeption when getting a connection; Error code = 17002; Cleaning up cache and retrying
2006-08-15 18:03:35,547 [HttpRequestHandler-9249408] WARN jdbc.ConnectionCache _getConnection.306 - Io exception: The Network Adapter could not establish the connection
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:254)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:386)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:493)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:164)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:767)
at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:324)
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:114)
at oracle.jdbc.pool.OracleConnectionCacheImpl.getNewPoolOrXAConnection(OracleConnectionCacheImpl.java:694)
at oracle.jdbc.pool.OracleConnectionCacheImpl.getPooledConnection(OracleConnectionCacheImpl.java:540)
at oracle.jdbc.pool.OracleConnectionCacheImpl.getConnection(OracleConnectionCacheImpl.java:346)
at oracle.jdbc.pool.OracleConnectionCacheImpl.getConnection(OracleConnectionCacheImpl.java:324)
at oracle.sysman.util.jdbc.ConnectionCache._getConnection(ConnectionCache.java:296)
at oracle.sysman.util.jdbc.ConnectionCache.getUnwrappedConnection(ConnectionCache.java:423)
at oracle.sysman.emSDK.svc.conn.FGAConnectionCache.getFGAConnection(FGAConnectionCache.java:156)
at oracle.sysman.emSDK.svc.conn.ConnectionService.getPrivateConnection(ConnectionService.java:605)
at oracle.sysman.emSDK.svc.conn.ConnectionService.getRepositoryVersionAndMode(ConnectionService.java:368)
at oracle.sysman.emSDK.svc.conn.ConnectionService.verifyRepositoryEx(ConnectionService.java:395)
at oracle.sysman.eml.app.ContextInitFilter.doFilter(ContextInitFilter.java:144)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:600)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:793)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
at java.lang.Thread.run(Thread.java:534)
2006-08-15 18:03:36,531 [HttpRequestHandler-9249408] ERROR conn.ConnectionService verifyRepositoryEx.433 - Invalid Connection Pool. ERROR = Io exception: The Network Adapter could not establish the connection
2006-08-15 18:03:36,531 [EMUI_18_03_36_/console/aboutApplication] ERROR em.console doGet.311 - java.lang.IllegalStateException: Response has already been committed
java.lang.IllegalStateException: Response has already been committed
at com.evermind.server.http.EvermindHttpServletResponse.resetBuffer(EvermindHttpServletResponse.java:1901)
at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:211)
at oracle.sysman.emSDK.svlt.PageHandler.render(PageHandler.java:773)
at oracle.sysman.emSDK.svlt.PageHandler.handleRequest(PageHandler.java:396)
at oracle.sysman.emSDK.svlt.EMServlet.myDoGet(EMServlet.java:688)
at oracle.sysman.emSDK.svlt.EMServlet.doGet(EMServlet.java:291)
at oracle.sysman.eml.app.Console.doGet(Console.java:135)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.sysman.emSDK.svlt.EMRedirectFilter.doFilter(EMRedirectFilter.java:101)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
at oracle.sysman.db.adm.inst.HandleRepDownFilter.doFilter(HandleRepDownFilter.java:123)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20)
at oracle.sysman.eml.app.ContextInitFilter.doFilter(ContextInitFilter.java:239)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:600)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:793)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
at java.lang.Thread.run(Thread.java:534)
OracleDBConsoleSDBsrvc.log
======================
-------------- [OracleDBConsoleSDB] ------------
EMDROOT=E:\oracle\product\10.2.0\db_1
ORACLE_HOME=E:\oracle\product\10.2.0\db_1
EMDSTATE=E:\oracle\product\10.2.0\db_1\SAP_solman_SDB
CONSOLE_CFG=dbconsole
TRACE_LEVEL=16
TIMEOUT=15
08/09/06 15:11:59 Start pending...
08/09/06 15:11:59 Verifying dbconsole is not started already. Command line "E:\oracle\product\10.2.0\db_1\bin\emctl.bat" istatus dbconsole
08/09/06 15:12:04 dbconsole launch commandline is "E:\oracle\product\10.2.0\db_1\bin\emctl.bat" istart dbconsole
08/09/06 15:12:04 Tracking process launch...
08/09/06 15:12:41 Received exitCode 3 from emctl istatus
08/09/06 15:12:41 dbconsole started
08/11/06 08:46:03 Recieved ServCtrlHdlr command, 5
08/11/06 08:46:03 Stopping dbconsole
08/11/06 08:46:03 Launching stop EMD process...
08/11/06 08:46:03 Waiting for stop EMD process to exit. numRetries=74
08/11/06 08:46:06 Stop process has exited with exitCode: 0
08/11/06 08:46:06 Waiting for emwd process to exit. numRetries=74
08/11/06 08:46:06 Watchdog process exited with exit code 15
08/11/06 08:46:06 Signal Shutdown event.
08/11/06 08:46:06 Shutdown thread exited.
08/11/06 08:46:06 ServiceMain wake up by ShutdownProc, emwd has exited. ServiceMain exits
-------------- [OracleDBConsoleSDB] ------------
EMDROOT=E:\oracle\product\10.2.0\db_1
ORACLE_HOME=E:\oracle\product\10.2.0\db_1
EMDSTATE=E:\oracle\product\10.2.0\db_1\SAP_solman_SDB
CONSOLE_CFG=dbconsole
TRACE_LEVEL=16
TIMEOUT=15
08/11/06 08:45:17 Start pending...
08/11/06 08:45:17 Verifying dbconsole is not started already. Command line "E:\oracle\product\10.2.0\db_1\bin\emctl.bat" istatus dbconsole
08/11/06 08:45:26 dbconsole launch commandline is "E:\oracle\product\10.2.0\db_1\bin\emctl.bat" istart dbconsole
08/11/06 08:45:26 Tracking process launch...
08/11/06 08:46:11 Received exitCode 3 from emctl istatus
08/11/06 08:46:11 dbconsole started
08/11/06 08:48:58 Recieved ServCtrlHdlr command, 5
08/11/06 08:48:58 Stopping dbconsole
08/11/06 08:48:58 Launching stop EMD process...
08/11/06 08:48:58 Waiting for stop EMD process to exit. numRetries=74
08/11/06 08:49:02 Stop process has exited with exitCode: 0
08/11/06 08:49:02 Waiting for emwd process to exit. numRetries=74
08/11/06 08:49:02 Watchdog process exited with exit code 15
08/11/06 08:49:02 Signal Shutdown event.
08/11/06 08:49:02 Shutdown thread exited.
08/11/06 08:49:02 ServiceMain wake up by ShutdownProc, emwd has exited. ServiceMain exits
-------------- [OracleDBConsoleSDB] ------------
EMDROOT=E:\oracle\product\10.2.0\db_1
ORACLE_HOME=E:\oracle\product\10.2.0\db_1
EMDSTATE=E:\oracle\product\10.2.0\db_1\SAP_solman_SDB
CONSOLE_CFG=dbconsole
TRACE_LEVEL=16
TIMEOUT=15
08/11/06 08:53:20 Start pending...
08/11/06 08:53:20 Verifying dbconsole is not started already. Command line "E:\oracle\product\10.2.0\db_1\bin\emctl.bat" istatus dbconsole
08/11/06 08:53:29 dbconsole launch commandline is "E:\oracle\product\10.2.0\db_1\bin\emctl.bat" istart dbconsole
08/11/06 08:53:29 Tracking process launch...
08/11/06 08:54:14 Received exitCode 3 from emctl istatus
08/11/06 08:54:14 dbconsole started
08/11/06 11:37:30 Recieved ServCtrlHdlr command, 5
08/11/06 11:37:30 Stopping dbconsole
08/11/06 11:37:30 Launching stop EMD process...
08/11/06 11:37:30 Waiting for stop EMD process to exit. numRetries=74
08/11/06 11:37:34 Stop process has exited with exitCode: 0
08/11/06 11:37:34 Waiting for emwd process to exit. numRetries=74
08/11/06 11:37:34 Watchdog process exited with exit code 15
08/11/06 11:37:34 Signal Shutdown event.
08/11/06 11:37:34 Shutdown thread exited.
08/11/06 11:37:34 ServiceMain wake up by ShutdownProc, emwd has exited. ServiceMain exits
-------------- [OracleDBConsoleSDB] ------------
EMDROOT=E:\oracle\product\10.2.0\db_1
ORACLE_HOME=E:\oracle\product\10.2.0\db_1
EMDSTATE=E:\oracle\product\10.2.0\db_1\SAP_solman_SDB
CONSOLE_CFG=dbconsole
TRACE_LEVEL=16
TIMEOUT=15
08/11/06 11:36:48 Start pending...
08/11/06 11:36:48 Verifying dbconsole is not started already. Command line "E:\oracle\product\10.2.0\db_1\bin\emctl.bat" istatus dbconsole
08/11/06 11:36:56 dbconsole launch commandline is "E:\oracle\product\10.2.0\db_1\bin\emctl.bat" istart dbconsole
08/11/06 11:36:56 Tracking process launch...
08/11/06 11:37:41 Received exitCode 3 from emctl istatus
08/11/06 11:37:41 dbconsole started
08/15/06 09:31:52 Recieved ServCtrlHdlr command, 5
08/15/06 09:31:52 Stopping dbconsole
08/15/06 09:31:52 Launching stop EMD process...
08/15/06 09:31:52 Waiting for stop EMD process to exit. numRetries=74
08/15/06 09:31:56 Stop process has exited with exitCode: 0
08/15/06 09:31:56 Waiting for emwd process to exit. numRetries=74
08/15/06 09:31:56 Watchdog process exited with exit code 15
08/15/06 09:31:56 Signal Shutdown event.
08/15/06 09:31:56 Shutdown thread exited.
08/15/06 09:31:56 ServiceMain wake up by ShutdownProc, emwd has exited. ServiceMain exits
-------------- [OracleDBConsoleSDB] ------------
EMDROOT=E:\oracle\product\10.2.0\db_1
ORACLE_HOME=E:\oracle\product\10.2.0\db_1
EMDSTATE=E:\oracle\product\10.2.0\db_1\SAP_solman_SDB
CONSOLE_CFG=dbconsole
TRACE_LEVEL=16
TIMEOUT=15
08/15/06 09:31:06 Start pending...
08/15/06 09:31:06 Verifying dbconsole is not started already. Command line "E:\oracle\product\10.2.0\db_1\bin\emctl.bat" istatus dbconsole
08/15/06 09:31:14 dbconsole launch commandline is "E:\oracle\product\10.2.0\db_1\bin\emctl.bat" istart dbconsole
08/15/06 09:31:14 Tracking process launch...
08/15/06 09:31:49 Did not hear back from emctl istatus.
08/15/06 09:31:49 Waiting a further 5 secs...
08/15/06 09:31:51 Received exitCode 3 from emctl istatus
08/15/06 09:31:51 dbconsole started
08/15/06 15:15:31 Recieved ServCtrlHdlr command, 5
08/15/06 15:15:31 Stopping dbconsole
08/15/06 15:15:31 Launching stop EMD process...
08/15/06 15:15:31 Waiting for stop EMD process to exit. numRetries=74
08/15/06 15:15:34 Stop process has exited with exitCode: 0
08/15/06 15:15:34 Waiting for emwd process to exit. numRetries=74
08/15/06 15:15:34 Watchdog process exited with exit code 15
08/15/06 15:15:34 Signal Shutdown event.
08/15/06 15:15:34 Shutdown thread exited.
08/15/06 15:15:34 ServiceMain wake up by ShutdownProc, emwd has exited. ServiceMain exits
-------------- [OracleDBConsoleSDB] ------------
EMDROOT=E:\oracle\product\10.2.0\db_1
ORACLE_HOME=E:\oracle\product\10.2.0\db_1
EMDSTATE=E:\oracle\product\10.2.0\db_1\SAP_solman_SDB
CONSOLE_CFG=dbconsole
TRACE_LEVEL=16
TIMEOUT=15
08/15/06 15:14:46 Start pending...
08/15/06 15:14:46 Verifying dbconsole is not started already. Command line "E:\oracle\product\10.2.0\db_1\bin\emctl.bat" istatus dbconsole
08/15/06 15:14:54 dbconsole launch commandline is "E:\oracle\product\10.2.0\db_1\bin\emctl.bat" istart dbconsole
08/15/06 15:14:54 Tracking process launch...
08/15/06 15:15:29 Did not hear back from emctl istatus.
08/15/06 15:15:29 Waiting a further 5 secs...
08/15/06 15:15:32 Received exitCode 3 from emctl istatus
08/15/06 15:15:32 dbconsole started
Command prompt for emctls status
=========================
E:\oracle\product\10.2.0\db_1\BIN>emctl status
Environment variable ORACLE_SID not defined. Please define it.
emd.properties
===========
# perl executable directory
perlBin=E:\oracle\product\10.2.0\db_1\perl\5.8.3\bin\MSWin32-x86-multi-thread
# script directory
scriptsDir=E:\oracle\product\10.2.0\db_1/sysman/admin/scripts
# emd Root directory(read-only location). Metrics should not create files
# under this directory
emdRoot=E:\oracle\product\10.2.0\db_1
# agent Root directory(writeable).
# Use this property to base any temporary file creation.
agentStateDir=E:/oracle/product/10.2.0/db_1/SAP_solman_SDB
# Chronos root directory
chronosRoot=E:/oracle/product/10.2.0/db_1/SAP_solman_SDB/sysman/emd/chronos
# OMS Upload URL
# if there is no receiving OMS or if you wish to disable the UploadManager
# please set this value to empty or comment out below line
REPOSITORY_URL=http://SAP_solman:5500/em/upload/
# Proxy settings used for fetchlets. not applicable for uploader.
#proxyHost=www-proxy.us.oracle.com
#proxyPort=80
#dontProxyFor=.us.oracle.com
# If it is necessary to go through an http proxy server to get to the
# repository, uncomment the following two lines
#REPOSITORY_PROXYHOST=
#REPOSITORY_PROXYPORT=
#REPOSITORY_PROXYREALM=%EM_REPOS_PROXYREALM%
#REPOSITORY_PROXYUSER=%EM_REPOS_PROXYUSER%
#REPOSITORY_PROXYPWD=%EM_REPOS_PROXYPWD%
# This string is used by the agent to connect to remote targets
# ***IMPORTANT*** Do not change the contents of this setting. Only the
# install should modify this value.
agentSeed=1329576760
# This string is used by the agent to determine which algorithm to use for encrypted data
# The string value will be same as the release version
agentVersion=10.1.0.4.0
# How long, in minutes, collector will wait until next load.
UploadInterval=5
# If an upload fails, we want to backoff by UploadFailBackoff
# percentage more each time for each successive upload failure
# e.g. if we start the retry at 1 minute. If we fail in our next
# upload attempt, we try again 1minute 12 seconds later etc.
UploadFailBackoffPct= 20
# Maximum amount of time, in seconds, upload will wait for response from
# repository before timing out.
# 0 means infinite.
UploadTimeout=1800
# Timeout for upload a file, HealthMonitor will abort the EMD process if
# UploadManager does not finish uploading one file within this time
# Unit is minite, the default value is 1 hour ( 15 Min)
#UploadMaxTime=15
# How big the file the collector will upload (in KB)
# the actual file size could be slightly bigger.
# This is only a guidance.
UploadFileSize=2048
# The maximum number of megabytes(MB) the upload manager will support in the
# upload directory before temporarily being disabled
UploadMaxBytesXML=50
# The maximum number of files the upload manager will support in the
# upload directory before temporarily being disabled
UploadMaxNumberXML=5000
# The maximum amount (%) of disk space that can be used on the EMD filesystem
# before the following is disabled:
# - Collection of data (upload manager)
# - Logging and tracing
UploadMaxDiskUsedPct=98
# The amount (%) of disk space that can be used on the EMD filesystem
# before the following is re-enabled after being disabled previously:
# - Collection of data (upload manager)
# - Logging and tracing
UploadMaxDiskUsedPctFloor=95
# Time out for the Agent to think that the access to the database could be
# hung. The Agent would not allow more threads to go and hang with a database
# if any one access to the database does not return within DbHangTimeout
# seconds.
# The more the timeout more the possibility of allowing more threads
# to be hung in the EMD with a bad database.it is specified in seconds.
#DbHangTimeout=200
# The script to run if disk space usage exceeds parameters or if certain other
# error conditions occur.
#emdFailureScript=emdfail.command
# The location of the file that contains the root certificate.
emdRootCertLoc=E:/oracle/product/10.2.0/db_1/SAP_solman_SDB/sysman/config/b64LocalCertificate.txt
internetCertLoc=E:/oracle/product/10.2.0/db_1/SAP_solman_SDB/sysman/config/b64InternetCertificate.txt
# The download URL for the EMD Oracle Wallet and its local file location.
# Note: Ensure that this URL references a valid port number at which the
# console is available on http
emdWalletSrcUrl=http://SAP_solman:5500/em/wallets/emd
emdWalletDest=E:/oracle/product/10.2.0/db_1/SAP_solman_SDB/sysman/config/server
# The email address for out-of-band notifications
emd_email_address=
emd_email_gateway=
# The return email address for out-of-band notifications
emd_from_email_address=
# EMD main servlet URL
EMD_URL=http://SAP_solman:3938/emd/main
# Whether the EMD should listen on all NICs on the current host (the default)
# or just the NIC associated with the hostname in EMD_URL
AgentListenOnAllNICs=TRUE
# This parameter indicates the thread model to use. uncomment one of the
# following ThreadPoolModel line to indicate the model, agent need to use.
# SMALL if number of targets is less than 11.
# MEDIUM if number of targets is from 11 to 50.
# LARGE if number of targets is greater than 50.
# This parameter can be overriden by 'MaxThreads' which indicates the maximum
# number of threads that CEMD can have running at any point of time. User can
# mostly use the other parameter ThreadPoolModel to indicate what model for the
# agent to use.
# ThreadPoolModel = SMALL
# ThreadPoolModel = MEDIUM
# ThreadPoolModel = LARGE
# This parameter indicates the stack size, threads have to be created with.
# we can set it to 0 to use the OS default value.
# In some version of solaris(such as 2.9 ) specify a stack size may cause Java Hotspot warning
# when JVM is used.
NormalThreadStackSize=0
#Signals that users want to ignore.
#It can be one or combination of SIGTERM, SIGINT
# The signals can listed with ',' as delimiter.
#IgnoreSignals=
# This property is NO LONGER USED for host config collection (instead, hostConfigClasspath is used).
# If noone else uses it, it can be removed.
ouiLoc=E:\oracle\product\10.2.0\db_1/oui
# Classpath for host config collection
# VERY IMPORTANT NOTE: If you change the host config classpath entries in this section, you HAVE
# to change the HOST_CONFIG_TEST_CLASSPATH entry in the utl/emdwqaenv file too.
# NOTE: if the location of emd_java.jar and/or log4j-core.jar is changed
# make sure that appropriate changes are also made
# to the CLASSPATH variable in this file if necessary
# PORTING NOTE: Check OUI-required jar files for OUI APIs to work. They could be different on your platform.
# Also, our version of xmlparserv2.jar must be compatible with the one OUI expects (both OUI and ECM use XML parser).
hostConfigClasspath=E:\oracle\product\10.2.0\db_1/oui/jlib/xmlparserv2.jar;E:\oracle\product\10.2.0\db_1/oui/jlib/OraInstaller.jar;E:\oracle\product\10.2.0\db_1/oui/jlib/srvm.jar;E:\oracle\product\10.2.0\db_1/oui/jlib/share.jar;E:\oracle\product\10.2.0\db_1/sysman/jlib/emd_java.jar;E:\oracle\product\10.2.0\db_1/sysman/jlib/log4j-core.jar
# JAVA HOME required for JavaExt metric calls
JAVA_HOME=E:\oracle\product\10.2.0\db_1/jdk/jre
# CLASSPATH required for JavaExt metric calls
CLASSPATH=E:\oracle\product\10.2.0\db_1/sysman/jlib/emd_java.jar;E:\oracle\product\10.2.0\db_1/opmn/lib/ons.jar;E:\oracle\product\10.2.0\db_1/lib/xmlparserv2.jar;E:\oracle\product\10.2.0\db_1/sysman/jlib/log4j-core.jar;E:\oracle\product\10.2.0\db_1/oc4j/j2ee/home/lib/http_client.jar;E:\oracle\product\10.2.0\db_1/lib/dms.jar;E:\oracle\product\10.2.0\db_1/lib/dmsEmd.jar;E:\oracle\product\10.2.0\db_1/jlib/share.jar;E:\oracle\product\10.2.0\db_1/jdbc/lib/ojdbc14dms.jar;E:\oracle\product\10.2.0\db_1/jlib/jssl-1_1.jar;E:\oracle\product\10.2.0\db_1/jlib/javax-ssl-1_1.jar;E:\oracle\product\10.2.0\db_1/jlib/ojmisc.jar;E:\oracle\product\10.2.0\db_1/lib/em_test.jar;E:\oracle\product\10.2.0\db_1/jlib/ojmisc.jar;E:\oracle\product\10.2.0\db_1/jlib/repository.jar;E:\oracle\product\10.2.0\db_1/opmn/lib/optic.jar
# this is the java option
#JAVA_OPTIONS=-Xmx128m
# These are the optional Java flags for the in-process Java
# Native Interface (JNI)
agentJavaDefines=-Doracle.dms.refresh.wait.time=1000 -DUrlTiming.UseJSSE=true
# When set to true, the emd.log and emd.trc file will be appended by a pid
# For example:
# emd_15789.log
# emd_15789.trc
# By default, it is not set for regression test purpose.
# After installed, please uncomment this line because when EMD is restarted,
# previous log information will be lost if not set to true.
#LogFileWithPID=true
# Default log file maximum size before rolling in Kilobytes
LogFileMaxSize=4096
# Maximum number of log file roll files to maintain before deletion
LogFileMaxRolls=4
# Default trace file maximum size before rolling in Kilobytes
TrcFileMaxSize=4096
# Maximum number of trace file roll files to maintain before deletion
TrcFileMaxRolls=4
# To enable the metric browser, uncomment the following line
# This is a reloadable parameter
#enableMetricBrowser=true
# To disable Remote operations (non-reachable agent) uncomment the following
# line:
#disableRemoteOperations=true
# add an additional admin path from which the agent will read additional
# target metadata. The specified path should have the mandatory 4 directories
# under it. 1. metadata 2. scripts 3. default_collection 4. discover
#altAdminPath=<additional admin path>
# The health monitor executes callbacks in a separate thread. if for some
# reason the threads spawned from health monitor to execute callbacks are
# hung, the agent could run out of resource and freeze.
# so when the current thread count spawned from the Health monitor reaches
# this limit, the agent is bounced. the default is set to 5.
#MaxHealthMonitorThreads=5
# dynamicPropsComputeTimeout default to 30s
dynamicPropsComputeTimeout=60
# emagent perl tracing levels
# supported levels: DEBUG, INFO, WARN, ERROR
# default level is ERROR
EMAGENT_PERL_TRACE_LEVEL=ERROR
# other optional parameters for perl tracing
# EMAGENT_PERL_TRACE_DIR default to $ORACLE_HOME/sysman/log
#EMAGENT_PERL_TRACE_DIR=
# EMAGENT_PERL_TRACE_FILESIZE default to 5M
#EMAGENT_PERL_TRACE_FILESIZE=5
# this section define the logging level for each component,
# it is "reloadable", you can change the level at runtime to reset
# the logging level, but if you remove the line, it will not be
# changed.
tracelevel.main=WARN
tracelevel.emSDK.xml=WARN
tracelevel.emSDK.utl=WARN
tracelevel.ResMonitor=WARN
tracelevel.Dispatcher=WARN
tracelevel.ThreadPool=WARN
tracelevel.pingManager=WARN
tracelevel.collector=WARN
tracelevel.http=WARN
tracelevel.ssl=WARN
tracelevel.ssl.io=WARN
tracelevel.blackouts=WARN
tracelevel.upload=WARN
tracelevel.command=WARN
tracelevel.reload=WARN
tracelevel.scheduler=WARN
tracelevel.Authentication=WARN
tracelevel.metadata=WARN
tracelevel.targets=WARN
tracelevel.TargetManager=WARN
tracelevel.engine=WARN
tracelevel.javaproc=WARN
tracelevel.vpxoci=WARN
tracelevel.javavm=WARN
tracelevel.fetchlets=WARN
tracelevel.fetchlets.os=WARN
tracelevel.fetchlets.osline=WARN
tracelevel.fetchlets.oslinetok=WARN
tracelevel.fetchlets.UDM=WARN
tracelevel.fetchlets.sql=WARN
tracelevel.fetchlets.url=WARN
tracelevel.fetchlets.urllines=WARN
tracelevel.fetchlets.urllinetoken=WARN
tracelevel.fetchlets.URLTiming=WARN
tracelevel.fetchlets.propEcho=WARN
tracelevel.fetchlets.readFromFile=WARN
tracelevel.fetchlets.readMultFromFile=WARN
tracelevel.fetchlets.throwable=WARN
tracelevel.fetchlets.resourceGrab=WARN
tracelevel.fetchlets.emSDK=WARN
# The following three properties are for HTTP timeout
# Timeout value for reading Http primary header, default is 30 seconds.
httpTimeoutPrimaryHeader=30
# Timeout value for reading http secondary headers, default is 30 seconds
httpTimeoutSecondaryHeaders=30
# Timeout value for reading http body, default is 60 seconds.
httpTimeoutBody=60
omsRecvDir=E:\oracle\product\10.2.0\db_1\SAP_solman_SDB\sysman\recv
agentTZRegion=+08:00
And i would like to know how to set up the environment variable for Oracle_HOME and ORACLE_SID.
Please kindly assist me on this.Looking at the error message "The Network Adapter could not establish the connection" , It appears hostname and port may be incorrect. Review the targets.xml under E:\oracle\product\10.2.0\db_1\SAP_solman_SDB\emd and
emoms.properties under E:\oracle\product\10.2.0\db_1\SAP_solman_SDB\config folder to make sure host ( sap_solman) and port (1527) are correct.
As far as setting the environment variables goes, you can go to control panel -> system -> advanced -> environment variables and set the ORACLE_HOME and ORACLE_SID
-Ramesh
Maybe you are looking for
-
GOS - Generic Object Services - Change dynamically the title of attachments
Dear Experts, how can I change dynamically the title of the single attachment in the attachment-list of cl_gos_manager? I hope you can help me. Thanks in advance.
-
Creating or importing a table into Mail
I have searched and found a few threads with this same question. The problem is, there is no answer in any of the threads! Can someone help me figure out how to either create or import a table into a Mail message? Thanks for any advice provided.
-
How do I see the position of an Object or Frame in Indesign?
I can see the size of it (dimensions) in the info panel, and the position of the mouse, but not the positon of the current selected object or frame.
-
Share Button not show Permission Level
Hi, We are facing a weird problem in our farm, we have until CU July 2014 versión with an authentication with ADFS2.0. In all Site Collections we have breaked the inherited permissions and we gave permissions directly to the SC or by AD Groups, until
-
Use of the Standard settings tab under 'User administration'
Hi all In cFolders 3.1 , user administration --> Standard Settings tab page: One can define the default settings for users that will be created The default settings defined by the user administrator here are the default settings for each user when th