Wednesday, October 6, 2021

The Certificate is not valid and cannot be used to verify

 I was working of oracle apps which was working fine for. One day Suddenly i was unable to launch application.

Note Application was using Java to launch.


Do you want to Continue?

The connection to this website is untrusted.

Note the certificate is not valid and cannot be used to verify the identity of this website.

More Information:

The certificate used to identify the website is not trusted. The reasons are listed below

The certificate Authority that issued this certificate is not trusted.


Problem - 

I was using JDK 1.7 some point of moment i upgrade Java to 1.8

Solution

Restore JDK back to 1.7 or use JAVA_HOME variable as 1.7



Oracle Database IMPDP Error

Error:

import done in AL32UTF8 character set and AL16UTF16 NCHAR character set
export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
Warning: possible data loss in character set conversions
Starting "*DatabaseName*"."SYS_IMPORT_FULL_01":  
*DatabaseName*/******** DIRECTORY=MYDIR DUMPFILE=BackupName.DMP LOGFILE=BackupName.log PARALLEL=8 remap_schema=OldDBName:NewDbName remap_tablespace=OldTbName:NewTbName,OldTb1Name:NewTb1Name, remap_Table=dbname.table_name:newdbName.tableName table_exists_action=TRUNCATE
Processing object type TABLE_EXPORT/TABLE/TABLE
Table "*DatabaseName*"."table_name" exists and has been truncated. Data will be loaded but all dependent metadata will be skipped due to table_exists_action of truncate
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
ORA-31693: Table data object "*DatabaseName*"."table_name" failed to load/unload and is being skipped due to error:
ORA-29913: error in executing ODCIEXTTABLEFETCH callout
ORA-01403: no data found
ORA-04088: error during execution of trigger '*DatabaseName*.****'

 

Solution

change parameter = table_exists_action=TRUNCATE  to table_exists_action=REPLACE

error while inserting record in salesforce

Error:
INVALID_FIELD_FOR_INSERT_UPDATE Error message: Unable to create/update field  Please check the security settings of this field and verify that it is read/write for your profile or permission.

Solution:
remove the fields from migration which are mentioned in above error
cause those fields will be populated automatically by salesforce (while migration)
field data type may be "auto generate" or " Formula"

Saturday, August 7, 2021

Function Identify Special Character and Replace

 Create function in sqlserver to identify the special character in string ( in parameter), and it will replace all the special character with "AND". You can modify the function as per your requirement and can replace it with space.


DROP FUNCTION func_Gen_str

CREATE FUNCTION Func_Gen_str (@NewStr VARCHAR(1000))
RETURNS VARCHAR(1000)
AS
BEGIN
	DECLARE @newstring VARCHAR(1000) = @NewStr;
	DECLARE @pattern VARCHAR(100) = '%[^"0-9a-zA-Z'' -]%';
	DECLARE @i INT;

	BEGIN
		SET @i = PATINDEX(@pattern, @newstring)

		WHILE @i <> 0
		BEGIN
			SET @newstring = LEFT(@newstring, @i - 1) + '" AND "' + SUBSTRING(@newstring, @i + 1, 1000);
			SET @i = PATINDEX(@pattern, @newstring)
		END

		RETURN @newstring;
	END;
END
GO


SELECT dbo.Func_Gen_str('a,bcde.fghifhj')

result will be 
a " AND " bcde " AND " fghifhj

Monday, July 12, 2021

SSMS SQL Server Management Studio, close automatically when execute Query

SSMS SQL Server Management Studio, close automatically when executed Larze size query in Query Window.

It donot give any warning, just close all the opened query window, even it will not ask you to save the open Query Window

I traces the Error from Events: see below:
Faulting application name: Ssms.exe, version: 2011.110.2100.60, time stamp: 0x4f35e2d9
Faulting module name: Microsoft.SqlServer.Management.SqlParser.ni.dll, version: 11.0.2100.60, time stamp: 0x4f35e255
Exception code: 0xc00000fd
Fault offset:
Faulting process id:
Faulting application start time: 0x01d7771d1009d970
Faulting application path: C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Ssms.exe
Faulting module path: C:\Windows\assembly\NativeImages_v4.0.30319_32\Microsoft.S1e156a8e#\7884276fc39356973c434ef7a131480a\Microsoft.SqlServer.Management.SqlParser.ni.dll


What the Query is?

So Query is select statement contains 25000 union all with single column, with no syntax error

How i Resolve the Issue:

My main motive is to insert records in table using Union ALL

And i converted query into Individual Insert statement with Select CTAS

And it works for me.

i read somewhere on internet, Intellisense is causing the problem of crashing

web stats