發表文章

SQL Server 2008 Job Agent 執行記錄匯出工具

(1)建立專用的低權限SQL帳號 - 可以建立一個只有讀取Job Agent記錄權限的專用SQL帳號,而非使用高權限的sa帳號。 建立SQL登入帳號 : USE [master] GO CREATE LOGIN [JobLogReader] WITH PASSWORD=N'複雜密碼', DEFAULT_DATABASE=[msdb], CHECK_EXPIRATION=ON, CHECK_POLICY=ON GO 在msdb資料庫中建立使用者 USE [msdb] GO CREATE USER [JobLogReader] FOR LOGIN [JobLogReader] GO 授予最小權限 USE [msdb] GO -- 授予讀取sysjobs和sysjobhistory表的權限 GRANT SELECT ON sysjobs TO [JobLogReader] GRANT SELECT ON sysjobhistory TO [JobLogReader] GRANT SELECT ON sysjobsteps TO [JobLogReader] GO (2) <# .SYNOPSIS 撈取SQL Server 2008 Job Agent執行狀況的LOG並匯出為.log檔案 .DESCRIPTION 此腳本用於從SQL Server 2008撈取Job Agent的執行記錄,並使用BCP命令將結果匯出為.log檔案 匯出的檔案格式與SQL Server Agent圖形介面匯出的格式相容,可再次匯入 腳本使用安全的方式處理SQL Server連線憑證,避免明碼存儲 .PARAMETER ServerInstance SQL Server的實例名稱,例如:"SERVERNAME\INSTANCENAME" .PARAMETER Database 包含Job Agent記錄的資料庫名稱,通常為"msdb" .PARAMETER Days 要撈取的天數範圍,例如:7表示撈取最近7天的記錄 .PARAMETER OutputPath 匯出的.log檔案路徑 .EXAMPLE .\Expo...

Module 4: Secure Coding Practices for Input Validation

圖片
1.Range Validator control in ASP.NET supports which type? A.Integer B.String C.Currency D.All of the above https://learn.microsoft.com/en-us/dotnet/api/system.web.ui.webcontrols.rangevalidator?view=netframework-4.8.1 2.Which approach does take less bandwidth and time to validate input data? A.Server Side Validation B.Client Side Validation C.Remote Validation D.Non of them Client side validation is a process of validating user input on the client side, usually in the browser, before it is sent to the server. This approach takes less bandwidth and time to validate input data because the data is validated on the client side, before it is sent to the server.  This reduces the amount of data that needs to be sent to the server, and also reduces the amount of time it takes for the server to process the data. Additionally, client side validation can help reduce the risk of malicious input being sent to the server, as the data is validated before it is sent. 3.Which validation control is ...

GNN(Graph Neural Network)圖像化神經網路part1._柯尼斯堡七橋問題(Seven Bridges Problem)

圖片
  A Gentle Introduction to Graph Neural Networks https://distill.pub/2021/gnn-intro/ Neural networks have been adapted to leverage the structure and properties of graphs.  We explore the components needed for building a graph neural network - and motivate the design choices behind them. 上圖比較關鍵的思想在於每個節點來自於上一層哪些節點計算而來。 GNN透過在每一層中將節點的表示更新為其鄰居節點的加權和,然後將這些更新後的表示作為下一層的輸入,從而逐漸地融合局部和全局信息,並在最終的表示中捕獲圖的結構和特徵。 Graph Neural Networks: A Review of Methods and Applications https://arxiv.org/pdf/1812.08434 https://velog.io/@cha-suyeon/CS224W-6.-Graph-Neural-Networks-1-GNN-Model GNN(Graph Neural Network)圖神經網路 「圖」是由節點(Node)與邊(Edge)所構成的資料結構 GNN 是將圖結構引入深度學習中的神經網路,可以幫助我們分析複雜資料之間的關聯,像是社群關係、交通網路或推薦系統等等。 GNN 可被視為是 CNN 的泛化版本。 世界上有許多資料是以圖的形式表示的 知識圖譜(智能客服) 一個人可能有多重身分是誰的妻子or丈夫,或也同時是哪間公司的高管之類的 道路交通動態流量預測 圖神經網路發表相關研究文獻逐漸攀升 Neural Networks extended by GNNs https://journalofbigdata.springeropen.com/articles/10.1186/s40537-023-00876-4 柯尼斯堡七橋問題(Seven Bridges Problem) 圖論中的著名問題,當時東普魯士柯尼斯堡(Königsberg)也是今日俄羅斯加里寧格勒,...

Lab 08 - Manage Virtual Machines (Task5~Task6)_Cloudshell(用powershell跟bash方式)

圖片
  Task 5: Create a virtual machine using Azure PowerShell  Use the icon (top right) to launch a Cloud Shell session. Alternately, navigate directly to https://shell.azure.com. 若直接網址列這樣訪問會跳出以下視窗 這邊在登入時候從右上角去點開也OK 選好按Apply Be sure to select PowerShell. If necessary, configure the shell storage. Run the following command to create a virtual machine. When prompted, provide a username and password for the VM. While you wait check out the New-AzVM command reference for all the parameters associated with creating a virtual machine. New-AzVm ` -ResourceGroupName 'AZ-104-M8-A728GIWJRI' ` -Name 'myPSVM' ` -Location 'East US' ` -Image 'Win2019Datacenter' ` -Zone '1' ` -Size 'Standard_D2s_v3' ` -Credential (Get-Credential) Once the command completes, use Get-AzVM to list the virtual machines in your resource group. Get-AzVM ` -ResourceGroupName 'AZ-104-M8-A728GIWJRI' ` -Status Verify your new virtual machine is listed and the Status is Runnin...

Lab 08 - Manage Virtual Machines (Task1~Task4)在Azure Portal作業

圖片
Task 1: Deploy zone-resilient Azure virtual machines by using the Azure portal you will deploy two Azure virtual machines into different availability zones by using the Azure portal. Availability zones offer the highest level of uptime SLA for virtual machines at 99.99%.  To achieve this SLA, you must deploy at least two virtual machines across different availability zones. Search for and select Virtual machines, on the Virtual machines blade, click + Create, and then select in the drop-down Azure virtual machine. Notice your other choices. On the Basics tab, in the Availability zone drop down menu, place a checkmark next to Zone 2. This should select both Zone 1 and Zone 2. 做lab發現有ZON不知問題就照他提示的替換。 completing the configuration: Click Next: Disks > , specify the following settings (leave others with their default values): 這邊OS Disk Space可選到以下這些範圍 Disk Type則如下 Key management Click Next: Networking > take the defaults but do not provide a load balancer. Click Next: Management ...