EnterpriseOne – General

How To Change The Schema Of All Tables In A SQL Server Database

button print grnw20 How To Change The Schema Of All Tables In A SQL Server Database

Below is the SQL that can be used to change the database schema of all tables in an SQL Server Database.  We use it when restoring databases from Production to CRP or Development.

USE JDE_CRP_NEW  --TODO: Change this to DB Name

SET NOCOUNT ON
DECLARE @NewSchema nvarchar(256)
DECLARE @OldSchema nvarchar(256)

Set @NewSchema = 'CRPDTA';  --TODO: Change to New Schema 
Set @OldSchema = 'PRODDTA'; --TODO: Change to Old Schema 

--Don’t need to change anything below this
DECLARE @TableName nvarchar(256)
DECLARE TableName CURSOR FOR
SELECT  DISTINCT QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME)
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = @OldSchema

OPEN TableName

FETCH TableName INTO @TableName

WHILE @@Fetch_Status = 0

   BEGIN

   Print 'Modifying ' + @TableName 
   EXEC('ALTER SCHEMA ' + @NewSchema + ' TRANSFER ' + @TableName)

   FETCH TableName INTO @TableName
   END

CLOSE TableName

DEALLOCATE TableName


Oracle JDEdwards EnterpriseOne in FireFox 20

button print grnw20 Oracle JDEdwards EnterpriseOne in FireFox 20

As some may have noticed, the latest version of FireFox breaks Oracle JDEdwards EnterpriseOne. 

Well, we found a fix on JDEList posted by cpb (Charles Baker):

Add the following to JAS server browscap.ini:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; MOZILLA FIREFOX 20.0

[MOZILLA FIREFOX 20.0]
parent=MOZILLA FIREFOX 10.0
version=20.0
majorver=20
minorver=0

[*(X11*) Gecko/* Firefox/2?.*]
parent=MOZILLA FIREFOX 20.0
platform=Linux

[*(Mac*) Gecko/* Firefox/2?.*]
parent=MOZILLA FIREFOX 20.0
platform=Mac

[*(Win*) Gecko/* Firefox/2?.*]
parent=MOZILLA FIREFOX 20.0
platform=Win 

You will want to make this change in the browscap.ini file located in your Server Manager Agent target directory, which may be something like this:

E:\jde_home\SCFHA\targets\pd83-1\owl_deployment\webclient.ear\app\webclient.war\WEB-INF\classes


How To Send Email Attachments Using Native Oracle JDEdwards EnterpriseOne

button print grnw20 How To Send Email Attachments Using Native Oracle JDEdwards EnterpriseOne

On his blog, Shannon Moir has a great post, ”Simple JDE BSFN to send an email with an attachment”, about how to send email attachments using a custom Business Function (BSFN).

From the post:

It’s a BSFN that takes a few parameters:

  • to
  • From
  • file to attach
  • name of attachment
  • subject
  • Body
  • CC
  • BCC

The source code can be found here.

Great post, Shannon!  Thanks!


Finding The Row Count For All Files In An iSeries Library And All Tables In An SQL Server Database

button print grnw20 Finding The Row Count For All Files In An iSeries Library And All Tables In An SQL Server Database

I’ve been moving several EnterpriseOne databases to SQL Server lately.  In order to do a quick check to make sure that all the data was transferred, I like to compare the number of rows on all the tables.  Below are the SQL queries that I use to get a row count on all tables in a database and all files in a library:

iSeries – SQL query to get a row count on all files in an iSeries library:

 SELECT TABLE_SCHEMA, TABLE_NAME,NUMBER_ROWS 
FROM QSYS2.SYSTABLESTAT 
WHERE TABLE_SCHEMA = 'PRODDTA' 
AND NUMBER_ROWS > 0 

SQL Server – SQL query to get a row count on all tables in an SQL Server database:

  
SELECT '[' + SCHEMA_NAME(t.schema_id) + '].[' + t.name + ']' AS fulltable_name,
SCHEMA_NAME(t.schema_id) AS schema_name, t.name AS table_name,i.rows 
FROM sys.tables AS t 
INNER JOIN sys.sysindexes AS i ON t.object_id = i.id 
AND i.indid < 2 
WHERE i.rows > 0 

NOTE: the iSeries SQL query is easiest to do from System i Navigator because you can easily copy the records into Excel.

Are there any methods that you use to do a quick data integrity check?


EnterpriseOne SubSystem Jobs Not Starting

button print grnw20 EnterpriseOne SubSystem Jobs Not Starting

For a while now we have had an issue where our subsystem Purchase Order Print job (R43500) will not run in JPD900 but it will in PD900. After going through the debug log I found a something:

--UBE--[0]-- SS0000009:Subsystem Limit is reached. 
--UBE--[0]-- SS:Cannot start new subsystem.

Above this notification I found an SQL was ran looking for subsystem jobs in the F986113:

SELECT COUNT(*) 
FROM SVM900/F986113 
WHERE ( SSPID = R43500 AND SSVERS = MOD0009 AND SSENHV = JPD900 
AND SSEXEHOST = MODENT AND SSJOBSTS = S )

The results of this SQL was 3. Which is the UBE Subsystem Limit specified in the Enterprise Servers JDE.INI [UBE] section (Configurations – Batch Processing from Oracle Server Manager). 3 is also the default value.
However, there is a problem with this SQL querie. It only finds the number of subsystem jobs that have been submitted. It doesnt check to see if they are running. If all subsystem jobs have been stopped properly, there would be zero records returned from this SQL. However, if you have had any issues with subsystem jobs or even if things dont get cleaned up correctly when bouncing services, you can end up with subsystem jobs in an error state.
The only way to clean up these records is to go into the database and remove them:

DELETE FROM SVM900/F986113 
WHERE (SSPID = R43500 AND SSVERS = MOD0009 AND SSENHV = JPD900 
AND SSEXEHOST = MODENT AND SSJOBSTS = S AND SSOPCR=E)

Do you have any tips for SubSystem jobs? If so, please leave them in the comments.


Error in JDE.LOG During Package Build: Could not determine database type for data source

button print grnw20 Error in JDE.LOG During Package Build: Could not determine database type for data source

When building a package for a new 9.1 installation, I noticed the following errors in the jde.log:

7032/7768 WRK:Starting jdeCallObject Wed Feb 27 06:26:15.517000 SpecPkgBld.c4280 
SPC0000502 - Could not determine database type for data source. Data source is probably invalid. (Datasource: Local - PLANNER Specs) 

7032/7768 WRK:Starting jdeCallObject Wed Feb 27 06:26:15.517001 SpecOpen.c2633 
jdeSpecOpenLocalOpt completed in error - JDESPECRESULT_FAILED.

That doesn’t really seem right. How could the “Local – PLANNER Specs” datasource be “invalid”? Well, not to worry. Here is what I found on Oracle Support:

E1: PKG: JDE.LOG Error Messages When Building Packages – SPC0000502 – Could Not Determine Database Type For Data Source [ID 651676.1]

These messages do NOT affect the package build process. 
Development is aware and some SARs as Bug  8293709 has been entered to clean up the messages in the jde.log. This seems to be caused due to a timing issue during datasource cache load and refresh. This is always reported during package build. Package Build creates and drops internal datasources during the build process. When a new datasource(DS) is created, it calls JDB to refresh DS cache. At around the same time,  Busbuild process is loading the DS cache – and it fails to get the DS type.
However, the jde.log messages are harmless and can be ignored.

Just more scary error messages that can be ignored :-/


How To Delete Journal Receivers (*JRN & *JRNRCV)

button print grnw20 How To Delete Journal Receivers (*JRN & *JRNRCV)

The other day, we were trying to refresh a data library on the iSeries and were unable to remove several journal files (*JRN and *JRNRCV).  I knew that I written about how to start journaling but wasn’t sure how to stop/delete them.

So, I found the following iSeries command that ends the journal receiver:

ENDJRNPF FILE(*ALL) JRN(LIBRARY/FILE)

After running this command, we were able to then delete the objects.

I found this command at mrc’s Tech Blog: Removing AS400 Journals and Journal Receivers


FastPath UDC

button print grnw20 FastPath UDC

Product Code: H90 – EnterpriseOne TOOLS
User Defined Codes: FP – ActivEra FastPath

 FastPath UDC


Add A JDE EnterpriseOne Environment To Every Role/Group

button print grnw20 Add A JDE EnterpriseOne Environment To Every Role/Group

You can use the below SQL to add an EnterpriseOne environment to every role or group in your installation:

INSERT INTO SY910/F0093 (LLUSER,LLLL,LLSEQ,LLMNI)
SELECT ULUSER, 'PD910','1.00','' FROM SY910/F0092


ESU Management Best Practice

button print grnw20 ESU Management Best Practice

I am looking for the best practices for managing ESUs so that they don’t get abandoned in DV or PY.

I’ve heard many discussions on the subject with no real “Best Practice” determined just a bunch of different ways to do things.

So, how do you manage ESUs and/or how do you think they should be managed?

Update with a better explanation…

One of our biggest concerns is what to do with ESUs that do not fix our issue.  Say we have an issue.  We call Oracle.  They suggest applying an ESU.

The first question is “to what environment do we apply the ESU so that it can be tested?”

1. Apply the ESU to Pristine
+ if the ESU fixes the problem, YAY!  Apply the ESU to the rest of the environments and do any retro-fits necessary
- testing is difficult because of not using our real business data
- if the ESU does not fix the issue, you can no longer compare those objects with the ones in the other environments for subsequent modifications or troubleshooting

2. Apply the ESU to Pristine & DV
+ Pristine is more “fix current”
+ testing is easier because of using our real data
+ if the ESU fixes the issue, we do the retro-fits and go
- if the ESU does not fix the issue:
a. try to back out the ESU and hope for the best
b. wait for Oracle to issue a superseding ESU.  Then after applying the new ESU we could delete the original one

Those are my choices as I see them.  Any thoughts?


  • E1Tips Job List

  • Directory Membership

  • Copyright © 1996-2010 E1 Tips. All rights reserved.
    iDream theme by Templates Next | Powered by WordPress