Posts

Showing posts from 2022

การต่อนำข้อมูลหลายๆแถวมาต่อกันให้เหลือแถวเดียว

Synnex STRING_AGG ( expression, separator ) [ <order_clause> ] <order_clause> ::=        WITHIN GROUP ( ORDER BY <order_by_expression_list> [ ASC | DESC ] ) Example select receipt_id, STRING_AGG(receipt_item,',') within group (order by receipt_line asc) from table_receipt group by receipt_id

Index List (Last Modify)

 select STATS_DATE(so.object_id, index_id) StatsDate , si.name IndexName , schema_name(so.schema_id) + N'.' + so.Name TableName , so.object_id, si.index_id from sys.indexes si inner join sys.tables so on so.object_id = si.object_id order by 1 desc

Show Port Error

     เพื่อใช้ในการตรวจสอบว่าที่ SAN Switch มีอาการ Error บ้างไหม มันจำทำให้ Server ที่เชื่อมต่อกับ SAN Switch มีอาการช้าลงได้ ดูตรง crc err, link fail ควรต้องเป็น 0 ตลอด SANSWITCH:admin> porterrshow อ้างอิง Command ของ HP San Switch