Thursday, January 08, 2009

Problem in restoring share point ? Error SQLException access to module is blocked

If you encounter this error, while restoring your sharepoint to another share point server,

Object Project Server Application failed in event OnPostRestore. For more information, see the error log located in the backup directory. SqlException: Access to module dbo.proc_MIP_GetObjectVersion is blocked because the signature is not valid.

This is could be due to that the shared services cannot be install in SQL server 2005 embedded version. The error when creating a new shared services "SSP Databases cannot be created in the Windows Internal Database; they must be created in SQLExpress or a full SQL Server installation"

or these error

Access to the table dbo.sites is blocked because the signature is not valid.
Access to module dbo.proc_GetCurrent is blocked because the signature is not valid.

Please follow the below guide,

This will provision the SPWebService service has not been fully provision after we restored.http://kbalertz.com/944154/receive-error-message-browse-SharePoint-collections-after-hotfix-package-public-update-Windows-SharePoint-Services-applied.aspx

If you still has error, then follow this guide to Restore a shared service provider administration site.

http://blog.tylerholmes.com/2008/03/restoring-shared-service-provider-admin.html

To check the shared services db is the problem , login to ms sql and query the shared_services1_db tables and you will see error.

Tuesday, January 06, 2009

Working with Oracle Forms and NLS Language/Globalization issues - others

Other information regarding troubleshooting the forms issues and so on.


Using PDF in Oracle Reports
http://download.oracle.com/docs/cd/B25521_01/doc/frs/reports/B14048_01/pbr_pdf.htm

which included Comparison of PDF Font Features ( which is interesting to note)


and also
Resolving Cross-Platform Porting Issues
http://download-uk.oracle.com/docs/cd/B14099_19/bi.1012/b14048/pbr_xplat.htm

Managing oracle fonts in Oracle Reports
http://download.oracle.com/docs/html/B10314_01/pbr_font.htm#1010309

Monday, December 15, 2008

Running dbms_jobs within a timing interval

If you are using the dbms_job and you want to scheduled the jobs to run at a certain time example from 6 am until 11 pm you can use the following example,

This will run the statspack between 6 am until 11 pm.

SQL>
begin

dbms_job.submit(:jobid,'if to_char(sysdate,''HH24'') > 5 and to_char(sysdate,''HH24'') <>
end;

/


To purge the statspack, you can use the following example, statspack.purge(I_PURGE_BEFORE_DATE => sysdate-60);

In prior releases, Statspack identifier tables which contained SQL Text, SQL Execution plans, and Segment identifiers were not purged. It is now possible to purge the unreferenced data in these tables. This is done by requesting the 'extended purge' simply by setting the input parameter i_extended_purge to TRUE when calling the regular purge.

statspack.purge(I_PURGE_BEFORE_DATE => sysdate-60, i_extended_purge=>TRUE);

Tuesday, December 02, 2008

Oracle - Setting up ODBC / Heterogeneous Database connection to SQL server/Other DB

Basically to setup the connection to the ODBC / Heterogenenous connection, you need to
1) Setup the ODBC system DSN data sources. Remember to put the default database name in the setup. Test the connections after the setup.

2) Goto the $ORACLE_HOME/hs/admin/ folder. Copy the file initodbc.ora and rename it to other name e.g. initHS1.ora. Changed the trace level to OFF and the connect info to your ODBC system DSN name.

e.g.

#
# HS init parameters
#
HS_FDS_CONNECT_INFO = HS1
HS_FDS_TRACE_LEVEL = off


3) Then we configure the listener.ora. Create a new SID entry and put the SID_NAME into the ODBC system DSN name.
e.g.


SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME=HS1) -- Enter the DSN on this line
(ORACLE_HOME = c:\ora10g) -- Enter your Oracle home on this line
(PROGRAM = hsodbc)
)
)

4) Add the hs entry into the tnsnames.ora. e.g.

HS1.world = -- This name can be customized
(DESCRIPTION=
(ADDRESS_LIST=
(Address=(PROTOCOL=TCP)
(HOST=
-- (Server x)
(PORT=1521))) -- Enter the port on which the server x Oracle installation
-- is listening
(CONNECT_DATA=(SID=HS1)) - Enter the DSN name
(HS=OK) -- Enter this value. It tells Oracle to use hetergeneous services
)

5) Stop and then start the Listener. Check to make sure the services is inside the listener.

6) create a database link, to link to the HS services. Remember in SQL server, the " is needed for the username , password and also to specify column name.

e.g.
create [public] database link link_name connect to "user_name" identified by "password" using 'HS1';

7) If you need to setup additional ODBC / HS setup, just follow the same steps with different DSN name.

For detail setup, follow the guide here.
http://www.dba-oracle.com/t_heterogeneous_database_connections_sql_server.htm

Tuesday, November 11, 2008

Oracle Forms - REP-56048: ENGINE RWENG-0 CRASHED

If your Oracle forms crash due to error REP-56048: ENGINE RWENG-0 CRASHED. The problem is due to a large records retrieved. Then there are several solution:-

1) Restrict the number of records return by the reports. To less than 20000 for 4M java memory options.(solution 2)

2)Changed your report.conf at 10.1.2.0/reports/conf by adding the java memory as below. Example , i increase the jvmoptions to 4096k

class="oracle.reports.engine.EngineImpl" id="rwEng" maxengine="1" initengine="1" jvmoptions="-Xoss4096k" callbacktimeout="90000" maxidle="30" englife="1" nengine="0"

3) Remove the "Remove & from Report" in the reports at the report builder. The causes is due to the the report need to process the number of page and this requires a lot of resources.

Working with Oracle Forms and NLS Language/Globalization issues

Recently, we have problem in displaying thai language fonts in the Report builder (windows) and the Oracle Forms servers (unix).

To solved the problem at the Report Builder, first we need to set the language support at the registry .

In the HKLM/Software/OracleDeveloper then at NLS_LANG, we set from the western code "AMERICAN_AMERICA.WE8MSWIN1252" to the unicode ENGLISH_UNITED_KINGDOM.UTF8.

Then we need to change the NLS_LANG at the file default.env , C:\oracle\product\developer\forms\server. Ame thing add the NLS_LANG at this file.


In the Oracle Forms server,
1) First , you need to determine which PPD file you are using. by using the following to test it,
http://:/reports/rwservlet?report=test.rdf&destype=file&desname=/tmp
/test_rep.ps

The content of this file should contain the output:
% NOTE: This file was generated with the PPD file .ppd

2) Then you need to add your fonts into the PPD file, in my case is the screenprinter.ppd at the guicommon/tk/admin/PPD
at the "*DefaultFont: Courier" add the font name.
*Font ArialUnicodeMS: Standard "(001.004)" Standard ROM

add the below, to use the Arial style (bold, italic) fonts
*Font ArialMT: Standard "(001.004)" Standard ROM
*Font Arial-ItalicMT: Standard "(001.004)" Standard ROM
*Font Arial-BoldMT: Standard "(001.004)" Standard ROM
*Font Arial-BoldItalicMT: Standard "(001.004)" Standard ROM


3) Convert the fonts from windows truetypefont, ttf to the AFM type by using ttf2pt1 gnuwin32 tool. Do this for Arial if you want to use this font. Rename the AFM, to just the font name. e.g. the file will be ArialUnicodeMS and ArialUnicodeMS.pfa

Open the file and changed the FontName to the correct short font name. In my case is from Arial Unicode MS to ArialUnicodeMS.

Remember to convert the file from windows to unix format. using dos2unix. To find out if the font still is in msdos format try this. od -a arial.ttf grep cr . If there is output then it is still in msdos format.

4) Copy the AFM and the PFA file to the guicommon/tk/admin/AFM folder.


5) We then need to change the uifont.ali, in the guicommon/tk/admin folder. You can set it in the common uifont.ali or make a copy of the file then set it into a new folder e.g. font_test and then set the environment at /reports/conf/opmn.conf under your Ias-Componentss , and the PATH e.g.


variable id="TK_FONTALIAS" value="/ApplTop/product/10.1.2.0/guicommon/tk/admin/Arial"/

In the uifont.ali
Comment out the the item in the #Mapping from MS Windows and # Mapping from Macintosh

Then goto the end of the file, in the [ PDF:Subset ] section add the following. This will add the Arialunicode ms as pdf font subset and also used the Arial as bold and italic format when the report needed.

"Arial Unicode MS"..... = "ARIALUNI.ttf"
"ArialUnicodeMS"..... = "ARIALUNI.ttf"

# Replace normal Arial fonts with the Arial Unicode MS fonts
"arial"...Bold.. ="arialbd.ttf"
"arial"..Italic.Bold.. ="arialbi.ttf"
"arial"..Italic... ="ariali.ttf"
"Arial"..... ="ARIALUNI.ttf"

6) Copy the .ttf fonts to the path that is inside the opmn.conf. variable id="PATH" value=""

7) Changed the guicommon/tk/admin/US/Tk2Motif.rgb. Add this entry after the
!Tk2Motif*fontMapCs: iso8859-2=EE8ISO8859P2
add this k2Motif*fontMapCs: iso8859-1=UTF8

8) Changed the reports.sh in the $ORACLE_HOME/bin folder. changed this
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1; export NLS_LANG
into
NLS_LANG=AMERICAN_AMERICA.UTF8; export NLS_LANG

9) To test the report, after you restart the opmn services
rwrun.sh report= destype=file desname=/tmp/test.pdf desformat=pdf batch=yes userid=test/test@test


Follow the metalink guide, if you need to configure it properly

Note 356221.1: A Practical Methodology on Porting Reports from Windows to Unix with Different Fonts
Note 726205.1: Step By Step To Generate Arabic PDF Reports on Unix
Note 350971.1: Troubleshooting Guide for Font Aliasing / Font Subsetting / Font Embedding Issues
Note 414803.1: How to Display 'Multiple Designed Fonts' in PDF Outputs of Reports Designed Using Multiple Fonts?

Wednesday, October 15, 2008

Transfer login to different server

IN Sql server 2000, To transfer the login with password to another sql server , you need to run the below sql

print ''
print '-- Script for restoring standard sql logins.'
print '-- As found on ' + @@servername + ' per ' + cast(getdate() as char)
select cast('exec sp_addlogin ''' + upper(a.loginname) + ''', ' as varchar(40)),
convert(varbinary(64),b.password),
cast(',''' + 'YOURDBSNAME' + ''', ' +
'''' + 'us_english' + ''', ' as varchar(35)),
convert(varbinary(64),b.sid),
',''skip_encryption'' '
from master.dbo.syslogins a,
master.dbo.sysxlogins b
where a.isntname = 0
and a.sid = b.sid
and b.name not in ('sa','repl_publisher','repl_subscriber')
order by b.name
Print ''

IN SQL server 2005, you use this SP_HELP_REVLOGIN

to create this sp, follow this microsoft link http://support.microsoft.com/kb/918992/