วันพฤหัสบดีที่ 25 เมษายน พ.ศ. 2562

Set Enable .Net framework 3.5 on windows 10 (ติดตั้ง .Netframework 3.5 บนวินโดวน์ 10)

1. Download windows 8.1 file [ TH : ดาวน์โหลดไฟล์ ของ windows 8.1 ]

2. Mount File windows Copy file \sources\sxs from mount drive to C:\ESD\Windows\sources\sxs
[TH : แตกไฟล์วินโดวน์แล้วคัดลอกโฟล์เดอร์ \sources\sxs ไปวางที่โฟล์เดอร์ C:\ESD\Windows\sources\sxs ]
3. Run cmd.exe as administrator [ คลิกขวารัน cmd.exe ในโหมดของ Administrator ]
4. Enter Dism /online /enable-feature /featurename:NetFx3 /All /LimitAccess /Source:C:\ESD\Windows\sources\sxs [ TH :พิมพ์ข้อความ Dism /online /enable-feature /featurename:NetFx3 /All /LimitAccess /Source:C:\ESD\Windows\sources\sxs แล้ว Enter ]
5.waiting too slowly for successfully. [TH :รอจนแสดงข้อความ successfully]
6. check feature after success go to Menu Control Panel > UnInstall a program > Turn Windows on or off  case install successfully like this image.
[TH : เช็คว่าติดตั้งเรียบร้อยแล้วที่ เมนู Control Panel > UnInstall a program > Turn Windows on or off  ถ้าติดตั้งเรียบร้อยจะแสดงสีทึบหรือเครื่องหมายติ๊กถูกดังภาพ]




วันพฤหัสบดีที่ 21 มีนาคม พ.ศ. 2562

SQL Server Skill Table Query

💛ต้องการแก้ไขและแทนค่าบางค่าใน Column💛

UPDATE dbo._YourTable_
SET _ColumnName_ = REPLACE(_ColumnName_, '_OldValue_', '_NewValue_')
WHERE FilterSQL LIKE '%_SomeValue_%' //บรรทัดนี้มีหรือไม่มีก็ได้
------------------------------------------------------------------
💙[Add column Table]💙 ALTER TABLE dbo._YourTable_ ADD _ColumnName1_ VARCHAR(20) NULL ,_ColumnName2_ INT NULL ; ------------------------------------------------------------------ 💚[Modify type column of table ]💚 ALTER TABLE _YourTable_ ALTER COLUMN _ColumnName_ VARCHAR(MAX); ------------------------------------------------------------------ 💗[Select ALL Table and Stored on DB]💗 SELECT * FROM SYSOBJECTS --WHERE -- xtype = 'U' ORDER BY crdate desc; GO ------------------------------------------------------------------

วันพฤหัสบดีที่ 14 กุมภาพันธ์ พ.ศ. 2562

SQL Server Cannot Drop Column


ลบ Column ของ Table แล้ว Error

Msg 5074, Level 16, State 1, Line 27
The object 'DF__TableName__ColumnName__04DCFCE9' is dependent on column 'ColumnName'.
Msg 4922, Level 16, State 9, Line 27
ALTER TABLE DROP COLUMN ColumnName failed because one or more objects access this column.


เนื่องจากมีเป็น Field Default Contraint  สามารถ drop column ได้ด้วย script นี้

DECLARE @ConstraintName nvarchar(200)
SELECT @ConstraintName = Name FROM SYS.DEFAULT_CONSTRAINTS WHERE PARENT_OBJECT_ID = OBJECT_ID('__TableName__') AND PARENT_COLUMN_ID = (SELECT column_id FROM sys.columns WHERE NAME = N'__ColumnName__' AND object_id = OBJECT_ID(N'__TableName__'))
IF @ConstraintName IS NOT NULL
EXEC('ALTER TABLE __TableName__ DROP CONSTRAINT ' + @ConstraintName)
IF EXISTS (SELECT * FROM syscolumns WHERE id=object_id('__TableName__') AND name='__ColumnName__')
EXEC('ALTER TABLE __TableName__ DROP COLUMN __ColumnName__')


โดยแทนชื่อTableที่ต้องการลบที่ __TableName__ และแทนชื่อColumnที่ต้องการลบที่ __ColumnName__

วันจันทร์ที่ 26 พฤศจิกายน พ.ศ. 2561

SQL Server 2017 Cannot find one or more components. Please re install the application

เปิดใช้ SQL SERVER แล้วพบ Error Message box : Cannot find one or more components. Please re install the application

1.ถ้าติดตั้งโปรแกรม SQL SERVER อีกครั้งแล้วยังเปิดใช้โปรแกรมไม่ได้
If can not openning program after you re-install SQL SERVER.

2.ถ้าลบ instance name แล้วยังเปิดใช้งานโปรแกรมไม่ได้
If can not openning program after you remove instance name.

3.ถ้าลบ Following Folder ที่ Registry แล้วยังเปิดใช้งานโปรแกรมไม่ได้
If can not openning program after delete Following Folder of Registry.

ให้ดาวน์โหลด Visual Studio Shell 2015
( URL : http://www.visualstudioextensibility.com/downloads/vs-shells/ ) มา แล้วติดตั้งใหม่อีกครั้ง ซึ่งระยะเวลาในการติดตั้งขึ้นอยู่กับทรัพยากรเครื่องนั้นๆ
Download Visual Studio Shell 2015
( URL : http://www.visualstudioextensibility.com/downloads/vs-shells/ ) and Re-install again.

หากติดตั้งVisual Studio Shell 2015 ไม่ได้ให้ตรวจสอบ .Net Framework ของเครื่อง เอา .NetFramework 3.5 ออก ตามภาพด้านล่าง แล้วดับเบิ้ลคลิกเพื่อติดตั้งใหม่อีกรอบ
If can not re-install Visual Studio Shell 2015 make sure .Net Framework 3.5 was disable. Check see picture below.


SQL Server 2017 Remove Instance name

ลบ Instance Name ของ SQL Server 2017
ปล.ในเครื่องลบทั้ง sql server 2017 และ 2008 R2 ใช้วิธีการเดียวกันต่างกันที version ต่อท้าย และถ้าในเครื่องมี instance name มากกว่า 1 instance name ให้รันวิธีการนี้อีกรอบตามจำนวน instance name ที่ต้องการลบ ระยะเวลาที่ใช้ขึ้นอยู่กับทรัพยากรเครื่องนั้นๆ

1. ไปที่ control panel

2. เลือก Uninstall a program


3. choose microsoft sql server 2017 (64 bit)


4. Select Remove on message box


5. Show message and wating


6. Select instance name you want to remove and cilck Next button


7. Select Feature of Instance want to remove and cilck Next button


8. Waiting to preparing


9. Prepare success and click Remove button


10. Remove Processing 


11. Remove Successful !! 
If you have many instance name you must running process for choose your instance name again



วันจันทร์ที่ 9 กรกฎาคม พ.ศ. 2561

CredSSP encryption oracle remediation - error when connecting via Remote Desktop Connection

พบข้อความแสดง Error ตามภาพError Message!!
━━━━━━━━━━━━━━━━━━━━━━━━
~ วิธีแก้ ~
~ How to Fix ~
1. เปิด RUN พิมพ์ "gpedit.msc"
2. Tab ซ้าย Local computer Policy 
> Computer Configuration. > Administrative Templates. > Systems. > Credentials Delegation
 ที่ Tab กลางจะแสดงการตั้งค่าต่างๆ
Settings > ดับเบิ้ลคลิก Encryption Oracle Remediation

3. เลือก สถานะเป็น "Enabled" และ Protection Level เป็น "Vulnerable"


วันพุธที่ 14 มีนาคม พ.ศ. 2561

Set Enable .Net framework 3.5 on windows 10 (ติดตั้ง .Netframework 3.5 บนวินโดวน์ 10)

1. Download windows 8.1 file [ TH : ดาวน์โหลดไฟล์ ของ windows 8.1 ] 2. Mount File windows Copy file \sources\sxs from mount drive ...