Thursday, December 7, 2023

SQL Server SSMS stuck on query while truncate the table

 I was going to truncate a table in sqlserver database but it seems to be went in deadlock. Apart from this if issue persist regularly then use delete command instead of truncate command.

List of Deadlock
SELECT
    SESSION_ID
FROM SYS.DM_EXEC_REQUESTS
WHERE BLOCKING_SESSION_ID != 0


Kill the deadlock:
kill SESSION_ID

Create Sequence Using SQL in MYSQL

Generate a range of consecutive/Sequence numbers (1 to 100)  using a MySQL query, see below. Replace 100 number as per your choice, so it will generate sequence of numbers 1 to number you will going to replace

select t0.rn+t1.rn+t2.rn+t3.rn  as Sequence
from
    (select 0 rn union select 1    rn union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t0,
    (select 0 rn union select 10   rn union select 20 union select 30 union select 40 union select 50 union select 60 union select 70 union select 80 union select 90) t1,
    (select 0 rn union select 100  rn union select 200 union select 300 union select 400 union select 500 union select 600 union select 700 union select 800 union select 900) t2,
    (select 0 rn union select 1000 rn union select 2000 union select 3000 union select 4000 union select 5000 union select 6000 union select 7000 union select 8000 union select 9000) t3
where
    t3.rn<=100
    and t2.rn<=100
    and t1.rn<=100
    and t0.rn+t1.rn+t2.rn+t3.rn<=100
    and t0.rn+t1.rn+t2.rn+t3.rn<>0
    order by 1

Wednesday, August 23, 2023

SQL Server blocked access to procedure 'sys.xp_cmdshell' of component

SQL Server blocked access to procedure 'sys.xp_cmdshell' of component 'xp_cmdshell' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'xp_cmdshell' by using sp_configure. For more information about enabling 'xp_cmdshell', see "Surface Area Configuration" in SQL Server Books Online.


Solution

EXEC sp_configure 'show advanced options', 1
GO
-- To update the currently configured value for advanced options.
RECONFIGURE
GO
-- To enable the feature.
EXEC sp_configure 'xp_cmdshell', 1
GO
-- To update the currently configured value for this feature.
RECONFIGURE
GO




hide again (Rollback)
-- show advanced options
EXEC sp_configure 'show advanced options', 1
GO
RECONFIGURE
GO
-- enable xp_cmdshell
EXEC sp_configure 'xp_cmdshell', 1
GO
RECONFIGURE
GO
-- hide advanced options
EXEC sp_configure 'show advanced options', 0
GO
RECONFIGURE
GO

Driver class 'org.gjt.mm.mysql.Driver' could not be found

Driver class 'org.gjt.mm.mysql.Driver' could not be found, make sure the 'MySQL' driver (jar file) is installed. org.gjt.mm.mysql.Driver

Issue : Creating connection with MySQL with kettle, was using 

  • Data Integration Kettle version 9.0
  • Mysql Driver version 8.0.25


Error

Driver class 'org.gjt.mm.mysql.Driver' could not be found, make sure the 'MySQL' driver (jar file) is installed. org.gjt.mm.mysql.Driver

Solution

Get version 5 latest driver from url https://downloads.mysql.com/archives/c-j/  (it is 5.1.49)


Saturday, July 1, 2023

ALTER TABLE statement conflicted with the FOREIGN KEY constraint

Server Type - MS SQL  Server

Scanerio : Error faced when tried to apply foreign key constraint on table having data in it (non empty table).

Error

Msg 547, Level 16, State 0, Line 20 The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "". The conflict occurred in database "", table "dbo.", column '**'

Solution

Empty table first then apply foreign key

 

Tuesday, May 16, 2023

Dividing Number Return ZERO Postgres

 If you are also facing same issue, here is solution


EARLIER

select (15/20)
 
Output

0

NOW

use this command to get correct output in postgres

select (15/20::float)::numeric(5,2)

Output 

0.75 

 

you can Also  create function in database

CREATE OR REPLACE FUNCTION dvdrental1(part int, fullv int) RETURNS float AS $$
BEGIN
  RAISE NOTICE 'PROGRESS IN PERCENT : %', (part/fullv::float)::numeric(5,2);
  RETURN part/fullv::float;
END;
$$  LANGUAGE plpgsql VOLATILE
  COST 100;

Postgres DvdRental Sample Database Restore Error

I was facing error while restoring the database dvdrental for postgres. Postgres 9 was installed on my machine and connect as postgres user with database postgres.

First i tried to execute restore.sql script using pgadmin sql executor and throw below error:

ERROR:  syntax error at or near ''\''
LINE 35: \connect

SOLUTION
SQL need to execute on CMD, so open CMD and move to postgres installation directory

cd C:\Program Files\PostgreSQL\9.5\bin
>Enter

psql -h localhost -d postgres -U postgres -p 5432 -a -q -f C:\Users\userPostgres\Downloads\dvdrental\restore.sql


On Execution again faced error

psql:C:/Users/userPostgres/Downloads/dvdrental/restore.sql:920: ERROR:  could not open file "C:\Users\userPostgres\Downloads\dvdrental\3057.dat" for reading: Permission denied




COPY public.actor (actor_id, first_name, last_name, last_update) FROM stdin;
COPY public.actor (actor_id, first_name, last_name, last_update) FROM 'C:\Users\userPostgres\Downloads\dvdrental\3057.dat';
psql:C:/Users/userPostgres/Downloads/dvdrental/restore.sql:920: ERROR:  could not open file "C:\Users\userPostgres\Downloads\dvdrental\3057.dat" for reading: Permission denied
--
-- Data for Name: address; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.address (address_id, address, address2, district, city_id, postal_code, phone, last_update) FROM stdin;
COPY public.address (address_id, address, address2, district, city_id, postal_code, phone, last_update) FROM 'C:\Users\userPostgres\Downloads\dvdrental\3065.dat';
psql:C:/Users/userPostgres/Downloads/dvdrental/restore.sql:928: ERROR:  could not open file "C:\Users\userPostgres\Downloads\dvdrental\3065.dat" for reading: Permission denied
--
-- Data for Name: category; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.category (category_id, name, last_update) FROM stdin;
COPY public.category (category_id, name, last_update) FROM 'C:\Users\userPostgres\Downloads\dvdrental\3059.dat';
psql:C:/Users/userPostgres/Downloads/dvdrental/restore.sql:936: ERROR:  could not open file "C:\Users\userPostgres\Downloads\dvdrental\3059.dat" for reading: Permission denied
--
-- Data for Name: city; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.city (city_id, city, country_id, last_update) FROM stdin;
COPY public.city (city_id, city, country_id, last_update) FROM 'C:\Users\userPostgres\Downloads\dvdrental\3067.dat';
psql:C:/Users/userPostgres/Downloads/dvdrental/restore.sql:944: ERROR:  could not open file "C:\Users\userPostgres\Downloads\dvdrental\3067.dat" for reading: Permission denied
--
-- Data for Name: country; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.country (country_id, country, last_update) FROM stdin;
COPY public.country (country_id, country, last_update) FROM 'C:\Users\userPostgres\Downloads\dvdrental\3069.dat';
psql:C:/Users/userPostgres/Downloads/dvdrental/restore.sql:952: ERROR:  could not open file "C:\Users\userPostgres\Downloads\dvdrental\3069.dat" for reading: Permission denied
--
-- Data for Name: customer; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.customer (customer_id, store_id, first_name, last_name, email, address_id, activebool, create_date, last_update, active) FROM stdin;
COPY public.customer (customer_id, store_id, first_name, last_name, email, address_id, activebool, create_date, last_update, active) FROM 'C:\Users\userPostgres\Downloads\dvdrental\3055.dat';
psql:C:/Users/userPostgres/Downloads/dvdrental/restore.sql:960: ERROR:  could not open file "C:\Users\userPostgres\Downloads\dvdrental\3055.dat" for reading: Permission denied
--
-- Data for Name: film; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.film (film_id, title, description, release_year, language_id, rental_duration, rental_rate, length, replacement_cost, rating, last_update, special_features, fulltext) FROM stdin;
COPY public.film (film_id, title, description, release_year, language_id, rental_duration, rental_rate, length, replacement_cost, rating, last_update, special_features, fulltext) FROM 'C:\Users\userPostgres\Downloads\dvdrental\3061.dat';
psql:C:/Users/userPostgres/Downloads/dvdrental/restore.sql:968: ERROR:  could not open file "C:\Users\userPostgres\Downloads\dvdrental\3061.dat" for reading: Permission denied
--
-- Data for Name: film_actor; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.film_actor (actor_id, film_id, last_update) FROM stdin;
COPY public.film_actor (actor_id, film_id, last_update) FROM 'C:\Users\userPostgres\Downloads\dvdrental\3062.dat';
psql:C:/Users/userPostgres/Downloads/dvdrental/restore.sql:976: ERROR:  could not open file "C:\Users\userPostgres\Downloads\dvdrental\3062.dat" for reading: Permission denied
--
-- Data for Name: film_category; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.film_category (film_id, category_id, last_update) FROM stdin;
COPY public.film_category (film_id, category_id, last_update) FROM 'C:\Users\userPostgres\Downloads\dvdrental\3063.dat';
psql:C:/Users/userPostgres/Downloads/dvdrental/restore.sql:984: ERROR:  could not open file "C:\Users\userPostgres\Downloads\dvdrental\3063.dat" for reading: Permission denied
--
-- Data for Name: inventory; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.inventory (inventory_id, film_id, store_id, last_update) FROM stdin;
COPY public.inventory (inventory_id, film_id, store_id, last_update) FROM 'C:\Users\userPostgres\Downloads\dvdrental\3071.dat';
psql:C:/Users/userPostgres/Downloads/dvdrental/restore.sql:992: ERROR:  could not open file "C:\Users\userPostgres\Downloads\dvdrental\3071.dat" for reading: Permission denied
--
-- Data for Name: language; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.language (language_id, name, last_update) FROM stdin;
COPY public.language (language_id, name, last_update) FROM 'C:\Users\userPostgres\Downloads\dvdrental\3073.dat';
psql:C:/Users/userPostgres/Downloads/dvdrental/restore.sql:1000: ERROR:  could not open file "C:\Users\userPostgres\Downloads\dvdrental\3073.dat" for reading: Permission denied
--
-- Data for Name: payment; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.payment (payment_id, customer_id, staff_id, rental_id, amount, payment_date) FROM stdin;
COPY public.payment (payment_id, customer_id, staff_id, rental_id, amount, payment_date) FROM 'C:\Users\userPostgres\Downloads\dvdrental\3075.dat';
psql:C:/Users/userPostgres/Downloads/dvdrental/restore.sql:1008: ERROR:  could not open file "C:\Users\userPostgres\Downloads\dvdrental\3075.dat" for reading: Permission denied
--
-- Data for Name: rental; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.rental (rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update) FROM stdin;
COPY public.rental (rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update) FROM 'C:\Users\userPostgres\Downloads\dvdrental\3077.dat';
psql:C:/Users/userPostgres/Downloads/dvdrental/restore.sql:1016: ERROR:  could not open file "C:\Users\userPostgres\Downloads\dvdrental\3077.dat" for reading: Permission denied
--
-- Data for Name: staff; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.staff (staff_id, first_name, last_name, address_id, email, store_id, active, username, password, last_update, picture) FROM stdin;
COPY public.staff (staff_id, first_name, last_name, address_id, email, store_id, active, username, password, last_update, picture) FROM 'C:\Users\userPostgres\Downloads\dvdrental\3079.dat';
psql:C:/Users/userPostgres/Downloads/dvdrental/restore.sql:1024: ERROR:  could not open file "C:\Users\userPostgres\Downloads\dvdrental\3079.dat" for reading: Permission denied
--
-- Data for Name: store; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.store (store_id, manager_staff_id, address_id, last_update) FROM stdin;
COPY public.store (store_id, manager_staff_id, address_id, last_update) FROM 'C:\Users\userPostgres\Downloads\dvdrental\3081.dat';
psql:C:/Users/userPostgres/Downloads/dvdrental/restore.sql:1032: ERROR:  could not open file "C:\Users\userPostgres\Downloads\dvdrental\3081.dat" for reading: Permission denied




SOLUTION
1. Check Directory permission (read,write) to window user
2. Change "dvdrental" directory to some another drive, i moved folder to E drive, now path is as below, Also dont forget to change the path within the restore.sql file



psql -h localhost -d postgres -U postgres -p 5432 -a -q -f E\dvdrental\restore.sql



Tuesday, February 14, 2023

Find Deadlock query and Kill the Process in Postgres

If your query took longer and never ending then possibility tables are under deadlock. You can easily identify the deadlock in postgres and kill the lock.

SELECT * FROM pg_locks pl LEFT JOIN pg_stat_activity psa ON pl.pid = psa.pid where state= 'active'

    
Find the records which are under deadlock

select
    pid, state, usename, query, query_start
from
    pg_stat_activity
where
    pid in
    (
        select
            pid
        from
            pg_locks pgl
            join pg_class pgc on pgl.relation = pgc.oid
        where
            pgc.relkind = 'r'
            and pgc.relname = 'your_table'
    );



Observe the query output and identify your queries causing deadlock.

Then Kill the ProcessID's one by one

SELECT pg_cancel_backend(0001);


if Deadlock still there, your PID still visible in pg_locks table then use below query

select pg_terminate_backend(0001)

   

Friday, September 2, 2022

py0024 Python error, while reading CSV file

 Python error, while reading CSV file

import pandas as pd
f = 'C:\\Users\\*****\\Desktop\\Emp.csv'
from datetime import datetime
custom_date_parser = lambda x: datetime.strptime(x,"%d-%m-%Y %H:%M:%S")
df = pd.read_csv(f,nrows=100,parse_dates=True,date_parser=custom_date_parser)
df.info()



During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\*****\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pandas\util\_decorators.py", line 311, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\*****\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pandas\io\parsers\readers.py", line 586, in read_csv
    return _read(filepath_or_buffer, kwds)
  File "C:\Users\*****\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pandas\io\parsers\readers.py", line 488, in _read
    return parser.read(nrows)
  File "C:\Users\*****\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pandas\io\parsers\readers.py", line 1047, in read
    index, columns, col_dict = self._engine.read(nrows)
  File "C:\Users\*****\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pandas\io\parsers\c_parser_wrapper.py", line 309, in read
    names, data = self._do_date_conversions(names, data)
  File "C:\Users\*****\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pandas\io\parsers\base_parser.py", line 802, in _do_date_conversions
    keep_date_col=self.keep_date_col,
  File "C:\Users\*****\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pandas\io\parsers\base_parser.py", line 1093, in _process_date_conversion
    data_dict[colspec] = converter(data_dict[colspec])
  File "C:\Users\*****\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pandas\io\parsers\base_parser.py", line 1055, in converter
    return generic_parser(date_parser, *date_cols)
  File "C:\Users\*****\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pandas\io\date_converters.py", line 100, in generic_parser
    results[i] = parse_func(*args)
  File "<stdin>", line 1, in <lambda>
  File "C:\Users\*****\AppData\Local\Programs\Python\Python37-32\lib\_strptime.py", line 588, in _strptime_datetime
    return cls(*args)
ValueError: second must be in 0..59
>>> df.info()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'df' is not defined




second (in date data) should be 3 digit in file, in my case it was 05:33:09345 five digit data. having bad data in csv

Solution
As error clear said, Date format in file doesnt match with the Date pass in code. Seconds of date in CSV file should be of 3 digits only. Verify your data in CSV and try to resolve data in CSV file.

DBvisualizer | Not Starting after Install

 I have installed DB-visualizer on windows machine, after installation when i click icon to launch application it wont launch. I checked event viewer nothing appear. Then i tried to launch application using CMD and got below error.

Error:
Don't set the -Xmx property too large as it may result in Java not being able to launch DbVisualizer properly. If you experience problems starting DbVisualizer open a file explorer tool on your system and remove this file depending on operating system:

Solution :
Open Below file and set the Xmx properties to 256 or 512
Windows: C:\Users\<user>\.dbvis\user.vmoptions


-Xmx512m
-Xss1m
-XX:StringTableSize=1000003
-Dsun.locale.formatasdefault=true
-include-options ${USERPROFILE}\.dbvis\user.vmoptions

Wednesday, August 31, 2022

MYSQL Error : This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA

 Error while executing script in MYSQL workbench


Error

Error Code: 1418. This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)

Solution

Execute the below Command in the MySQL console or Workbench:

SET GLOBAL log_bin_trust_function_creators = 1;
 

For Permanent solution add the below parameter in mysql.ini file:

log_bin_trust_function_creators = 1;


Friday, August 26, 2022

Open Office Writer : Table of Index / Hyperlink

 How to Enable Hyperlink in Index Table. 

You must have a Open office writer with content and make sure content is marked as Heading 1, Heading 2 , Heading 3,.... Heading n

 

 

Next Add Index table Go to  Insert > Table of Contents and Index >  Table of Contents and Index or bibliography

Index will be added, and you may noticed no hyperlink on index data. 

Now right click on Index > Edit Index > Tab "Entries"

Make sure the structure is same as given image LS, E#, E , T, #, LE and Edit LS and LE as Internet Link. Do it for level 1,2,3 as per requirement



Wednesday, August 10, 2022

ORA-39001 ORA-39000 ORA-31640 ORA-27041 OSD-04002 : Oracle IMPDP Error

impdp Scott/tiger full=Y directory=data_pump_dir dumpfile=scott.dmp TABLE_EXISTS_ACTION=SKIP SKIP_UNUSABLE_INDEXES=y EXCLUDE=STATISTICS DATA_OPTIONS=skip_constraint_errors  REMAP_SCHEMA=old_schedma_in_dmp:scott logfile=data_pump_dir:scott_full_094358_1.log EXCLUDE=GRANT

After executing above command received error :

ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-31640: unable to open dump file "D:\backups\scott_full.dmp" for read
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 5) Access is denied.


As per error
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 5) Access is denied.

i was assuming that the files or folder do not have correct permission either for window user or oracle user (which is owner of directory)

Looked for many websites while googling, no one able to give the correct resolution for this error, every one is assuming for permission issue.


Problem :

- Using parameter log file wrongly "logfile=data_pump_dir:scott_full_094358_1.log", it should be without "data_pump_dir"
- For another Log File Name ( I am not sure about this), when i use logfile parameter "logfile=scott_full_094358_1.log" it was still giving issue.
Then i modified the log file name to "logfile=scott_full.log" then only it worked for me.

Working IMPDP command
impdp Scott/tiger full=Y directory=data_pump_dir dumpfile=scott.dmp TABLE_EXISTS_ACTION=SKIP SKIP_UNUSABLE_INDEXES=y EXCLUDE=STATISTICS DATA_OPTIONS=skip_constraint_errors  REMAP_SCHEMA=old_schedma_in_dmp:scott logfile=scott_full.log EXCLUDE=GRANT

Friday, August 5, 2022

CMD : code to copy the files from 1 folder to another

 requirement : Here i have scenario like i have all the files name or image name which i need to copy over to new directory in same computer or on any external drive.

Code

@echo off
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
SET "source=D:\srcdir\"
SET "source1="D:\srcdir""
SET "destination=D:\Destination"
SET "FileNameFromTExtFile=.\Path1.txt"

if not exist "D:\Destination\" mkdir D:\Destination 
rem copy Folder Structure as of source in Destination
XCOPY "%source1%" "%destination%" /t /e
 
FOR /F "usebackq eol=| delims=" %%f IN ("%FileNameFromTExtFile%") DO (
    where /Q /R %source1% %%f
rem echo !ERRORLEVEL!
    IF "!ERRORLEVEL!" == "1" (
@copy /y "%source1%%%f" "%destination%%%f" 
        )
     IF "!ERRORLEVEL!" == "2" (
        echo "%source1%%%f" is not found!
    )
)

 In above code it will copy all the files which are mentioned in Path1.txt file and it will loop through all the files and copy to Destination folder from source folder (srcdir).

It will also copy all directory structure before copying the fles.

Feel free to edit code as per your requirement.

how data need to pass in Path1.txt file?

\1C9A7356.JPG
\1C9A7360.JPG
\1C9A7364.JPG
\cam1\1C9A8147.JPG
\cam1\1C9A8163.JPG
\cam1\1C9A8165.JPG
\cam2\SHP04337.jpg
\cam2\SHP04353.jpg
\cam2\SHP04388.jpg
\cam1\DSC_3568.JPG
\cam1\DSC_3571.JPG
\cam1\DSC_3575.JPG
\cam1\DSC_3576.JPG
\cam2\SHP05260.jpg
\cam2\SHP05263.jpg
\cam2\SHP05288.jpg
\cam2\SHP05334.jpg
\cam3\1C9A8935.JPG
\cam3\1C9A8938.JPG
\cam3\1C9A8940.JPG
\cam3\1C9A8942.JPG

CMD : Copy the Folder Structure only

Command to copy the folder structure on disk drive without copy the files on cmd

D:\Source>XCOPY "D:\Source" "D:\MyDrive" /t /e
Does D:\Source specify a file name
or directory name on the target
(F = file, D = directory)?

After execution of command CMD will ask to enter A or D.

Give Input A if you would like to add output in file and D if you would like create directories.

This command will create folders ( including sub folders) on your specified path without copying the files.

Monday, June 6, 2022

SQL Server Database in Single User Model

 Some time you may have notice database status change to "Single User", Once database status changed to "single user" you will not be able to execute query on that database. Below is the solution to change the status of database to "MULTI_USER"

Solution :
SELECT request_session_id, * FROM sys.dm_tran_locks WHERE resource_database_id = DB_ID('databaseName')

Connect to Master database or any other database which is in open state, Copy request_session_id from above query and Kill the session using below command.


KILL request_session_id

USE master
GO
ALTER DATABASE databaseName SET MULTI_USER WITH ROLLBACK IMMEDIATE
GO
ALTER DATABASE databaseName SET online
Go


Friday, May 27, 2022

Kettle There was a data type error: the data type of java.lang.Long object [5061] does not correspond to value meta [BigNumber(15)]

: Errors detected!
: Because of an error, this step can't continue:
: org.pentaho.di.core.exception.KettleValueException:
********** BigNumber(15) : There was a data type error: the data type of java.lang.Long object [5061] does not correspond to value meta [BigNumber(15)]

at org.pentaho.di.core.row.value.ValueMetaBase.getString(ValueMetaBase.java:1927)
at org.pentaho.di.core.row.RowMeta.getString(RowMeta.java:328)
at org.pentaho.di.core.row.RowMeta.getString(RowMeta.java:860)
at org.pentaho.di.trans.steps.tableoutput.TableOutput.writeToTable(TableOutput.java:384)
at org.pentaho.di.trans.steps.tableoutput.TableOutput.processRow(TableOutput.java:125)
at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)
at java.lang.Thread.run(Unknown Source)


This Error is causing in one of the transformation where components is being used Table Input, Select Value, File Output, and Database lookup

Situation

  •    Field1 is of Number type size 15
  •    Field1 is used in "Values to return from the lookup table" in Component Database Lookup
  •    Checkbox "Enable Cache" was Checked 
  •    Checkbox "Load all data from table" was Checked 


    
Solution

  •     Uncheck Checkbox  "Load all data from table" was Checked

    

Thursday, May 12, 2022

Local Task Bar appear when Remote Machine done in FULL Screen

You may appear the local machine Task Bar overlap on Remote machine task bar when operating remote desktop in full screen mode (mstsc).

To avoid this Problem just restart the services of Explorer of local machine will fix your problem.

Open you task manager from local machine

Locate the "windows explorer" under Process tab.

Right click and Restart services

web stats