How to see table structure in H2 database

Just enter following sql query:

show columns from table_name;


How to Change Column Size in Table

Here is how to increase field length in database. Let us say you have a VARCHAR column with length 20, and want to increase its length to 255.
You need to change columnt type in database to increase coolumn size.

Here is how to do it:

ALTER TABLE table_name
MODIFY column_name
In the above command, you need to specify table_name whose column you want to modify, column_name of column whose length you want to change, and new_length, new size number.


How to export VMware VM to OVA template

  1. Install VMware PowerCLI powershell module:

Install-Module -Name VMware.PowerCLI

2. Connect to server


It will ask for credentials.

In case if you see error “Error: Invalid server certificate”, you will need to check Error: Invalid server certificate article.

3. Export VM

export-vm -vm vm-name -format OVA

It will export OVA and save it to tour current directory.

Also you can specify -destination parameter to local folder where this ova will be saved.

For example:

That’s it.


How to fix Connect-VIServer “Error: Invalid server certificate”

If you see following error when trying to connect to host useing Connect-VIServer:

Connect-VIServer : 6/14/2021 3:16:08 PM Connect-VIServer Error: Invalid server certificate. Use Set-PowerCLIConfiguration to set the value for the InvalidCertificateAction option to Prompt
if you’d like to connect once or to add a permanent exception for this server.
Additional Information: Could not establish trust relationship for the SSL/TLS secure channel with authority ‘xx.xx.xx.xx’.
At line:1 char:1

  • Connect-VIServer
  • ~~~~~~~
    • CategoryInfo : SecurityError: (:) [Connect-VIServer], ViSecurityNegotiationException
    • FullyQualifiedErrorId : Client20_ConnectivityServiceImpl_Reconnect_CertificateError,VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVIServer

Just run following powershell command:

Set-PowerCLIConfiguration InvalidCertificateAction=Prompt


How to prevent IP spoofing on Ubuntu.

IP spoofing is the creation of network packets with fake IP
addresses in order to log in from another IP address.

1. To prevent open the file "/etc/host.conf":
sudo vi /etc/host.conf

2. Replace the following lines:
The "order" line is only used by old versions of the C library.
​order hosts,bind
​multi on

With following lines:
The "order" line is only used by old versions of the C library.
​order bind,hosts
​nospoof on

That's it.