2024年11月12日 星期二

SQL Server Planning, Pricing and License

 

Server-CALs授權模式

1.需購買的量應該是所有終端用戶的電腦

例如:一台Data warehouse主機 與 一台Web報表主機,但公司有50人或電腦會連進Web報表主機開啟報表,則應該每一台用戶端電腦都需要有CALs授權,Data warehouse主機購買Server授權

2.此授權模式的SQL Server的CPU(Processor)限制只能用到20 cores,如需大量運算或高負載環境可能會有效能不足狀況



Enterprise edition with Server + Client Access License (CAL) licensing is limited to 20 cores per SQL Server instance. (This licensing isn't available for new agreements.) There are no limits under the Core-based Server Licensing model.

FeatureEnterpriseStandardWebExpress
with
Advanced
Services
Express
Maximum compute capacity used by a single instance - SQL Server Database Engine 1Operating system maximumLimited to lesser of 4 sockets or 24 coresLimited to lesser of 4 sockets or 16 coresLimited to lesser of 1 socket or 4 coresLimited to lesser of 1 socket or 4 cores
Maximum compute capacity used by a single instance - Analysis Services or Reporting ServicesOperating system maximumLimited to lesser of 4 sockets or 24 coresLimited to lesser of 4 sockets or 16 coresLimited to lesser of 1 socket or 4 coresLimited to lesser of 1 socket or 4 cores
Maximum memory for buffer pool per instance of SQL Server Database EngineOperating System Maximum128 GB64 GB1410 MB1410 MB






Editions and supported features of SQL Server 2019

https://learn.microsoft.com/en-us/sql/sql-server/editions-and-components-of-sql-server-2019?view=sql-server-ver16




SQL Server editionMaximum compute capacity for a single instance (SQL Server Database Engine)Maximum compute capacity for a single instance (AS, RS)
Enterprise edition: Core-based licensing 1Operating system maximumOperating system maximum
DeveloperOperating system maximumOperating system maximum
StandardLimited to lesser of 4 sockets or 24 coresLimited to lesser of 4 sockets or 24 cores
ExpressLimited to lesser of 1 socket or 4 coresLimited to lesser of 1 socket or 4 cores

1 Enterprise edition with Server + Client Access License (CAL) licensing is limited to 20 cores per SQL Server instance. (This licensing isn't available for new agreements.) There are no limits under the Core-based Server Licensing model.


Compute capacity limits by edition of SQL Server

https://learn.microsoft.com/en-us/sql/sql-server/compute-capacity-limits-by-edition-of-sql-server?view=sql-server-ver16



SQL Server 2019 pricing

https://www.microsoft.com/en-us/sql-server/sql-server-2019-pricing


https://download.microsoft.com/download/f/0/d/f0d7004e-9e39-4991-853b-2aa09e4ce456/SQL%20Server%202019%20%20Licensing%20Datasheet.pdf


SQL Server Failover Cluster Instance只需要買Active Instance的SQL Server License

2022/5詢問零壹,現在規定須再加買3年SA才合規(以前SA一次可以只買一年,現在SA改成一次須買3年)


How much CPU does Microsoft’s SQL Server use?

https://www.heroix.com/blog/how-much-cpu-does-microsofts-sql-server-2016-use-2/




2024年8月14日 星期三

Copy or Backup Command - robocopy

 

robocopy D:\Backup E:\Backup /MIR /MT:100 /LOG+:C:\Logs\robocopy.log


/MIR 鏡像目錄樹(包含空的子目錄),確保目標目錄與來源目錄完全相符,並比對刪除目標中不存在於來源中的任何檔案或目錄,

/MT:100 使用100個執行緒來執行

/LOG 輸出執行狀態至記錄檔 (覆寫現有的記錄檔)

/LOG+ 輸出執行狀態至記錄檔 (附加至現有的記錄檔)


robocopy

https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy


2024年6月5日 星期三

Power BI Desktop

 


Power BI Desktop

 資料連接方式 (Storage Mode)

  1.DirectQuery

  2.Import


若使用DirectQuery資料,Power BI Desktop底下與右邊的資料區Storage Mode會出現DirectQuery


若使用Import資料,Power BI Desktop右邊的資料區的Storage Mode會出現Import

左邊會多出一個 Table View


但是若使用Import並設定了增量更新,且發布到Power BI Cloud後的Semantic Model語意模型(以前稱為DataSet),下載下來從Desktop打開則狀態會變成是Live Connection,並且從Transform介面看不到原始所選擇的DB Table,只能透過原始pbix檔開啟後才能看到



注意事項:

若連接SQL Server,但SQL Server不使用1433 Port,隨然一開始連接成功,選擇Table後,則會出現 以下錯誤,進入Transform介面似乎可以看到資料

但回到Design介面

Reoirt view右邊原本應該有Data欄位可以選擇,卻不一定會出現

Model view則是正常可以看到資料欄位


Error Message:

We couldn't connect to your DirectQuery data source or internal model. Double-check that your server and database names are correct, and that you have permission to access them.


2023年12月5日 星期二

SQL Server has encountered the following error: operating system returned error 19 or Could not allocate space for object in database because the PRIMARY filegroup is full

SQL Server has encountered the following error:  

1.Error operating system returned error 19 

2.Could not allocate space for object in database because the PRIMARY filegroup is full


Possible Cause:

外接SAN/iSCSI Storage磁碟機,指派的可用空間超過Storage實際可用空間,作業系統看到的空間並非Stoage實際可用空間,當Storage空間不足,SQL Server就會出現以下錯誤訊息,導致疑難排解困難,因為作業系統或SQL Server所看到可用空間是足夠的,但卻出現空間不足訊息

例如:  另一種可能是VMware 超額分配可用空間

Dynamic Storage Provisioning / vSphere Storage Thin Provisioning 


Error Message:

Error 1:

The operating system returned error 19(The media is write protected.) to SQL Server during a write at offset 0000000000000000 in file 'N:\SQLData\xxxx2.ndf'. Additional messages in the SQL Server error log and operating system error log may provide more detail. This is a severe system-level error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.

Error 2:

Could not allocate space for object in database because the 'PRIMARY' filegroup is full.


Resolution:

1.從Storage端,增加磁碟擴充可用空間

2.從OS端,因為Storage端空間已經不足,即使OS端檔案總管看到還有可用空間,但仍然需要刪除一些檔案來增加更多可用空間。


SQL Server Planning, Pricing and License

  Server-CALs授權模式 1.需購買的量應該是所有終端用戶的電腦 例如:一台Data warehouse主機 與 一台Web報表主機,但公司有50人或電腦會連進Web報表主機開啟報表,則應該每一台用戶端電腦都需要有CALs授權,Data warehouse主機購買Ser...