Tuesday, November 03, 2020

英雄名

听朋友说:
他在王者荣耀游戏里使用的英雄(曹操)名称不能放曹操,最后他只能放曹植爸
笑死了,曹植爸是可以的(当时)。

Tuesday, October 27, 2020

Executionpolicy Unrestricted but still prompt "Execution Policy Change".

 I do face this problem few time. When Powershell executionpolicy was set to bypass/unrestricted, but when run the ps1 file it is still prompt "Execution Policy Change".
The only way can fix this is restart.(so far).



Wednesday, September 30, 2020

 For sp_MSForEachDB:
When the DB is exist, table exist, but column not exist. even you filter out the DB, but it still show the Error
"Msg 207, Level 16, State 1, Line 5 invalid column name"

eg. you have 2 DB (DB1 & DB2), Both DB same table name (TB1), but TB1 in DB1 have ColumnA, TB1 in DB2 dont have.

Code:
exec sp_MSForEachDB 'use [?]
if ''?'' <> ''DB2'' select * from ?.dbo.TB1 where ColumnA=''A'';'


You can see script was filter out the DB2, but it still give the error when you run it. 

----------------------
A poor solution here:

exec sp_MSForEachDB 'use [?]
if ''?'' <> ''DB2''
Begin
if exists (select COL_NAME(OBJECT_ID(B.name),C.column_id) from ?.sys.tables B join ?.sys.columns C on B.object_id=C.object_id where B.name=''TB1'' and C.name=''ColumnA'')
    Begin
    declare @colname varchar(100)
    declare @sql nvarchar(2000)
    set @colname=''ColumnA''
    select @sql = N''select * from ?.dbo.TB1 where ''+@colname+''=''''A'''';''
    exec sp_executesql @sql
    End
End'

Wednesday, July 22, 2020

Network Level Authentication (NLA) Error

If you get below error message, you may try the below solutions, this may happen when you using RDP.

Error:
The remote computer that you are trying to connect to requires Network Level Authentication (NLA), but your Windows domain controller cannot be contacted to perform NLA. If you are an administrator on the remote computer, you can disable NLA by using the options on the Remote tab of the System Properties dialog box.

Solution:
1) Use username with server name.
eg. server\administrator
2) Change network DNS server address to other.

Tuesday, May 19, 2020

RDP need ICMPv4?

Today we have a replacement of old server in data center, the new server was done the setup in office, and able to remote (RDP) with all the setting of windows firewall.

allow  TCP/UDP for rdp port, scope limited remote's IP

But the thing happen when i plug it in to data center router. (juniper SSG5), it is unable to connect remotely. and after some troubleshooting, and i enable the ICMPv4 in windows firewall.

allow ICMPv4 for any remote's IP (scope IP will fail the rdp)

And finally the remote able to get thru. I try to unable/enable a few time. it was same result.
why?
Anyone able to explain to me, as i know RDP only need TCP/UDP.

Some info:
OS: windows server 2019
Firewall: Juniper SSG5 (very old firewall)
RDP port: not default






OpenOffice change your file content


OpenOffice problem:
When double click on a 0KB csv file, Open with openoffice or even you cancel it, the csv file will become 2KB.

The content of 2KB:
ÐÏ à¡± á                ; þÿ                             þÿÿÿ    þÿÿÿ        ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿR o o t   E n t r y                                              ÿÿÿÿÿÿÿÿÿÿÿÿ                                    þÿÿÿ                                                                            ÿÿÿÿÿÿÿÿÿÿÿÿ                                    þÿÿÿ                                                                            ÿÿÿÿÿÿÿÿÿÿÿÿ                                    þÿÿÿ                                                                            ÿÿÿÿÿÿÿÿÿÿÿÿ                                    þÿÿÿ       


Here is some info:

OS: Windows server 2016
OpenOffice version: 4.1.1
Open with scalc.exe program


Video:









Wednesday, March 11, 2020

Hyper-V Problem

Problem 1 in hyper V:
Create Virtual server failed.

Problem 2 in hyper V:
Apply checkpoint failed.

But this two problem i solve it by one solution:
Restart hyper-v virtual machine management service

Root cause i also not sure, if any one knew please drop me a message.

Friday, March 06, 2020

kernel package: 'linux-generic' error

Description:
1) Case happen when install mini ubuntu 18.04 LTS

2) Process: install system

3) Error message:
Unable to install the selcted kernel
An error was returned while trying to install the kernel into the target system.
kernel package: 'linux-generic'.
check /var/log/syslog or see virtual console 4 for the details.

Solution:
I try expert installation.
and choose "linux-image-5.3.0-40-generic" kernel
and choose all driver (instance of target)

Thursday, March 05, 2020

Tomcat http port not work

For windows user install the tomcat: there is a problem, when you set the HTTP/1.1 port on setup. it may not work. Here is for reference.

Description on case:
When setup the tomcat (UI), it allow to change the shutdown port and HTTP/1.1 port. But after you change this 2 port, only shutdown port will reflect to server.xml, while HTTP/1.1 port will be always default.

To solve this:
You need to manually edit the HTTP/1.1 port on "tomcat folder/conf/server.xml" and restart service.

This list have no problem:
Tomcat v7.0.10 (java 7 x32)

Tomcat v7.0.94 (java 7 x32)
Tomcat v7.0.96 (java 7 x32)
Tomcat v7.0.99 (java 7 x32)
Tomcat v9.0.16 (java 8 x64)
Tomcat v9.0.30 (java 8 x64)

This list have above problem: (this both release year 2020)
Tomcat v7.0.100 (java 7 x32)
Tomcat v9.0.31 (java 8 x64)

* The testing done most with windows server 2016 std, and some in windows 2019 std.





Sunday, January 05, 2020

java 1.8 32bit

To check java version on window:
1) From "programs and features", if there is 64 bit, it will show 64 bit else just show java.



2) With "java -version" Comman,.if 64 bit, it will show "Java HotSpot 64-bit Server VM", else just show java version.