[20171206]rman與truncate.txt

来源:http://www.cnblogs.com/lfree/archive/2017/12/06/7991113.html
-Advertisement-
Play Games

[20171206]rman與truncate.txt--//昨天下班在回家的路上,突然想起以前遇到的問題,就是truncate表後,rman做備份時會備份多少truncate表的信息,--//當時在itpub上,還存在討論,就是rman會備份空block嗎?參考鏈接:http://www.itpu ...


[20171206]rman與truncate.txt

--//昨天下班在回家的路上,突然想起以前遇到的問題,就是truncate表後,rman做備份時會備份多少truncate表的信息,
--//當時在itpub上,還存在討論,就是rman會備份空block嗎?參考鏈接:http://www.itpub.net/thread-2050864-9-1.html
--//zergduan兄還開了SR,答覆如下:

終於有回覆了

經過dump的確認,unused block compression 特性是在extent一級,而不是在block級啟用:
-------------------------
BEFORE : RelFno: 7, BeginBlock: 128, Flag: 0, First: 50, Free: 63438
BEFORE : FFFFFFFFFFFF0300 0000000000000000 0000000000000000 0000000000000000

AFTER : RelFno: 7, BeginBlock: 128, Flag: 0, First: 1, Free: 63487
AFTER : 0100000000000000 0000000000000000 0000000000000000 0000000000000000

RMAN read that there is one extent to be backup from the table. and I will backup all the blocks. It does not read at BLOCK level.
......
unused block compression doesn't kick in unless all the extents are unused. Granularity can't be changed to a block.
---------------------------

truncate之後,該對象仍然存在,所以,部分extent(比如頭部)中仍然有一些metadata,這樣的extent被認為非空,會被整體備份出來。
由於truncate 並不刪除數據,所以,該塊上仍然保留有您測試的字元串等。所以,通過strings命令可以看到這部分數據。

該問題的重點,我想應該是,最後驗證了 unused block compression 的粒度是在extent級別,不是block。

--//是否跟rman input memory buffer有關.通過例子來來說明:

1.環境:
SCOTT@book> @ &r/ver1
PORT_STRING                    VERSION        BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx            11.2.0.4.0     Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

$ cat d2.txt
drop tablespace t01 including contents and datafiles;
drop tablespace t02 including contents and datafiles;
drop tablespace t03 including contents and datafiles;
drop tablespace t04 including contents and datafiles;
drop tablespace t05 including contents and datafiles;

CREATE TABLESPACE T01 DATAFILE '/mnt/ramdisk/book/T01.dbf' SIZE 6M AUTOEXTEND OFF LOGGING ONLINE EXTENT MANAGEMENT LOCAL AUTOALLOCATE BLOCKSIZE 8K SEGMENT SPACE MANAGEMENT AUTO FLASHBACK ON;
CREATE TABLESPACE T02 DATAFILE '/mnt/ramdisk/book/T02.dbf' SIZE 6M AUTOEXTEND OFF LOGGING ONLINE EXTENT MANAGEMENT LOCAL AUTOALLOCATE BLOCKSIZE 8K SEGMENT SPACE MANAGEMENT AUTO FLASHBACK ON;
CREATE TABLESPACE T03 DATAFILE '/mnt/ramdisk/book/T03.dbf' SIZE 6M AUTOEXTEND OFF LOGGING ONLINE EXTENT MANAGEMENT LOCAL AUTOALLOCATE BLOCKSIZE 8K SEGMENT SPACE MANAGEMENT AUTO FLASHBACK ON;
CREATE TABLESPACE T04 DATAFILE '/mnt/ramdisk/book/T04.dbf' SIZE 6M AUTOEXTEND OFF LOGGING ONLINE EXTENT MANAGEMENT LOCAL AUTOALLOCATE BLOCKSIZE 8K SEGMENT SPACE MANAGEMENT AUTO FLASHBACK ON;
CREATE TABLESPACE T05 DATAFILE '/mnt/ramdisk/book/T05.dbf' SIZE 6M AUTOEXTEND OFF LOGGING ONLINE EXTENT MANAGEMENT LOCAL AUTOALLOCATE BLOCKSIZE 8K SEGMENT SPACE MANAGEMENT AUTO FLASHBACK ON;

create table t01 tablespace t01 as select rownum id ,to_char(rownum,'FM000000')||lpad('A',26,'A') name from dual connect by level<=1e5;
create table t02 tablespace t02 as select rownum id ,to_char(rownum,'FM000000')||lpad('B',26,'B') name from dual connect by level<=1e5;
create table t03 tablespace t03 as select rownum id ,to_char(rownum,'FM000000')||lpad('C',26,'C') name from dual connect by level<=1e5;
create table t04 tablespace t04 as select rownum id ,to_char(rownum,'FM000000')||lpad('D',26,'D') name from dual connect by level<=1e5;
create table t05 tablespace t05 as select rownum id ,to_char(rownum,'FM000000')||lpad('E',26,'E') name from dual connect by level<=1e5;

alter system checkpoint;
alter system checkpoint;
alter system checkpoint;

2.測試:
--//建立如上表空間:
RMAN> CONFIGURE CHANNEL 1 DEVICE TYPE DISK clear;
old RMAN configuration parameters:
CONFIGURE CHANNEL 1 DEVICE TYPE DISK RATE 128 K;
old RMAN configuration parameters are successfully deleted

RMAN> report schema ;
Report of database schema for database with db_unique_name BOOK
List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    760      SYSTEM               ***     /mnt/ramdisk/book/system01.dbf
2    940      SYSAUX               ***     /mnt/ramdisk/book/sysaux01.dbf
3    1075     UNDOTBS1             ***     /mnt/ramdisk/book/undotbs01.dbf
4    256      USERS                ***     /mnt/ramdisk/book/users01.dbf
5    346      EXAMPLE              ***     /mnt/ramdisk/book/example01.dbf
6    40       TEA                  ***     /mnt/ramdisk/book/tea01.dbf
7    6        T01                  ***     /mnt/ramdisk/book/T01.dbf
8    6        T02                  ***     /mnt/ramdisk/book/T02.dbf
9    6        T03                  ***     /mnt/ramdisk/book/T03.dbf
10   6        T04                  ***     /mnt/ramdisk/book/T04.dbf
11   6        T05                  ***     /mnt/ramdisk/book/T05.dbf

List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    414      TEMP                 32767       /mnt/ramdisk/book/temp01.dbf

SCOTT@book> truncate table t01 ;
Table truncated.

--//truncate表T01.測試備份看看:
RMAN> backup datafile 7 format '/home/oracle/backup/T1_%U';

Starting backup at 2017-12-06 08:37:56
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=80 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00007 name=/mnt/ramdisk/book/T01.dbf
channel ORA_DISK_1: starting piece 1 at 2017-12-06 08:37:57
channel ORA_DISK_1: finished piece 1 at 2017-12-06 08:37:58
piece handle=/home/oracle/backup/T1_h7sle5j5_1_1 tag=TAG20171206T083757 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2017-12-06 08:37:58

$ strings -t d T1_h7sle5j5_1_1 | grep 'AAAAA'|wc
   9978   26939  440924

$ strings -t d T1_h7sle5j5_1_1 | grep 'AAAAAA' |head -1
1082678 K 000174AAAAAAAAAAAAAAAAAAAAAAAAAA,
$ strings -t d T1_h7sle5j5_1_1 | grep 'AAAAAA' |tail -1
1581019  009807AAAAAAAAAAAAAAAAAAAAAAAAAA

--//可以確定在備份集合中記錄是那些.因為T02表結構是一樣的.通過T02也可以確定備份記錄的塊號.

SCOTT@book> select rowid,t02.* from t02 where id in (174,9807);
ROWID                      ID NAME
------------------ ---------- --------------------------------
AAAWLjAAIAAAACDACt        174 000174BBBBBBBBBBBBBBBBBBBBBBBBBB
AAAWLjAAIAAAAC/AAA       9807 009807BBBBBBBBBBBBBBBBBBBBBBBBBB

SCOTT@book> @ &r/rowid AAAWLjAAIAAAACDACt
    OBJECT       FILE      BLOCK        ROW ROWID_DBA            DBA                  TEXT
---------- ---------- ---------- ---------- -------------------- -------------------- ----------------------------------------
     90851          8        131        173  0x2000083           8,131                alter system dump datafile 8 block 131 ;

SCOTT@book> @ &r/rowid AAAWLjAAIAAAAC/AAA
    OBJECT       FILE      BLOCK        ROW ROWID_DBA            DBA                  TEXT
---------- ---------- ---------- ---------- -------------------- -------------------- ----------------------------------------
     90851          8        191          0  0x20000BF           8,191                alter system dump datafile 8 block 191 ;

--//總共191-131+1=61,加上前面3塊,就是64塊,也就是 64*8192 = 524288,524288/1024=512K.
--//我以前一直的理解truncate後會備份一些塊,僅僅備份一個extent,這樣僅僅備份64K(8塊).而實際上是512K.
--//為什麼不是1M,而是512K?????

3.測試:
--//測試備份4個文件作為備份集的情況:

RMAN> backup datafile 7,8,9,10 format '/home/oracle/backup/T1234_%U';

Starting backup at 2017-12-06 08:53:53
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=94 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00007 name=/mnt/ramdisk/book/T01.dbf
input datafile file number=00008 name=/mnt/ramdisk/book/T02.dbf
input datafile file number=00009 name=/mnt/ramdisk/book/T03.dbf
input datafile file number=00010 name=/mnt/ramdisk/book/T04.dbf
channel ORA_DISK_1: starting piece 1 at 2017-12-06 08:53:54
channel ORA_DISK_1: finished piece 1 at 2017-12-06 08:53:55
piece handle=/home/oracle/backup/T1234_h8sle6h2_1_1 tag=TAG20171206T085353 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2017-12-06 08:53:55


$ strings -t d T1234_h8sle6h2_1_1 | grep 'AAAAA' |head -1
4179254 K 000174AAAAAAAAAAAAAAAAAAAAAAAAAA,
$ strings -t d T1234_h8sle6h2_1_1 | grep 'AAAAA' |tail -1
4677595  009807AAAAAAAAAAAAAAAAAAAAAAAAAA
$ strings -t d T1234_h8sle6h2_1_1 | grep 'AAAAA' |wc
   9978   26939  440924

--//與備份1個數據文件一樣,不展開分析了.本來還想測試備份5個數據文件的.
--//因為備份1個文件僅僅備份512K(在truncate後),我開始的理解應該是1M.why?
--//不過我的理解還是和rman input memory buffer有關.

4.測試:
SCOTT@book> drop tablespace t01 including contents and datafiles;
Tablespace dropped.

CREATE TABLESPACE t01 DATAFILE
  '/mnt/ramdisk/book/T01.dbf' SIZE 6M AUTOEXTEND OFF
LOGGING
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M
BLOCKSIZE 8K
SEGMENT SPACE MANAGEMENT AUTO
FLASHBACK ON;
--//建立UNIFORM SIZE 1M.

create table t01 tablespace t01 as select rownum id ,to_char(rownum,'FM000000')||lpad('A',26,'A') name from dual connect by level<=1e5;

SCOTT@book> create table t01 tablespace t01 as select rownum id ,to_char(rownum,'FM000000')||lpad('A',26,'A') name from dual connect by level<=1e5;
Table created.

SCOTT@book> truncate table t01 ;
Table truncated.

RMAN> backup datafile 7 format '/home/oracle/backup/T1x_%U';
Starting backup at 2017-12-06 09:02:19
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00007 name=/mnt/ramdisk/book/T01.dbf
channel ORA_DISK_1: starting piece 1 at 2017-12-06 09:02:19
channel ORA_DISK_1: finished piece 1 at 2017-12-06 09:02:20
piece handle=/home/oracle/backup/T1x_h9sle70r_1_1 tag=TAG20171206T090219 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2017-12-06 09:02:20

$ strings -t d T1x_h9sle70r_1_1 | grep 'AAAAA' |wc
 100000  270040 4424269

$ strings -t d T1x_h9sle70r_1_1 | grep 'AAAAA' |head -1
1090870 K 000174AAAAAAAAAAAAAAAAAAAAAAAAAA,
$ strings -t d T1x_h9sle70r_1_1 | grep 'AAAAA' |tail -1
6021081 c< 099859AAAAAAAAAAAAAAAAAAAAAAAAAA

$ strings -t d T1x_h9sle70r_1_1 | grep 'AAAAA' |wc
 100000  270040 4424269
--//昏,全部備份.看來沒有這麼簡單.

SCOTT@book> drop table t01 purge ;
Table dropped.

SCOTT@book> create table t01 tablespace t01 as select rownum id ,to_char(rownum,'FM000000')||lpad('A',26,'A') name from dual connect by level<=1e5;
Table created.

SCOTT@book> select rowid,t01.* from t01 where id in (174,99859);
ROWID                      ID NAME
------------------ ---------- --------------------------------
AAAWLuAAHAAAACEACt        174 000174AAAAAAAAAAAAAAAAAAAAAAAAAA
AAAWLuAAHAAAALdAAA      99859 099859AAAAAAAAAAAAAAAAAAAAAAAAAA

SCOTT@book> @ &r/rowid AAAWLuAAHAAAACEACt
    OBJECT       FILE      BLOCK        ROW ROWID_DBA            DBA                  TEXT
---------- ---------- ---------- ---------- -------------------- -------------------- ----------------------------------------
     90862          7        132        173  0x1C00084           7,132                alter system dump datafile 7 block 132 ;

SCOTT@book> @ &r/rowid AAAWLuAAHAAAALdAAA
    OBJECT       FILE      BLOCK        ROW ROWID_DBA            DBA                  TEXT
---------- ---------- ---------- ---------- -------------------- -------------------- ----------------------------------------
     90862          7        733          0  0x1C002DD           7,733                alter system dump datafile 7 block 733 ;

SCOTT@book> column PARTITION_NAME noprint
SCOTT@book> select * from dba_extents where segment_name='T01';
OWNER  SEGMENT_NAME SEGMENT_TYPE TABLESPACE_NAME EXTENT_ID    FILE_ID   BLOCK_ID      BYTES     BLOCKS RELATIVE_FNO
------ ------------ ------------ --------------- --------- ---------- ---------- ---------- ---------- ------------
SCOTT  T01          TABLE        T01                     0          7        128    1048576        128            7
SCOTT  T01          TABLE        T01                     1          7        256    1048576        128            7
SCOTT  T01          TABLE        T01                     2          7        384    1048576        128            7
SCOTT  T01          TABLE        T01                     3          7        512    1048576        128            7
SCOTT  T01          TABLE        T01                     4          7        640    1048576        128            7

--//難道truncate後rman備份會8個extents嗎?

5.測試:

SCOTT@book> drop tablespace t01 including contents and datafiles;
Tablespace dropped.

CREATE TABLESPACE t01 DATAFILE
  '/mnt/ramdisk/book/T01.dbf' SIZE 21M AUTOEXTEND OFF
LOGGING
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M
BLOCKSIZE 8K
SEGMENT SPACE MANAGEMENT AUTO
FLASHBACK ON;
--//建立UNIFORM SIZE 1M.

create table t01 tablespace t01 as select rownum id ,to_char(rownum,'FM000000')||lpad('A',26,'A') name from dual connect by level<=4e5;

SCOTT@book> select * from dba_extents where segment_name='T01';
OWNER  SEGMENT_NAME SEGMENT_TYPE TABLESPACE_NAME EXTENT_ID    FILE_ID   BLOCK_ID      BYTES     BLOCKS RELATIVE_FNO
------ ------------ ------------ --------------- --------- ---------- ---------- ---------- ---------- ------------
SCOTT  T01          TABLE        T01                     0          7        128    1048576        128            7
SCOTT  T01          TABLE        T01                     1          7        256    1048576        128            7
SCOTT  T01          TABLE        T01                     2          7        384    1048576        128            7
SCOTT  T01          TABLE        T01                     3          7        512    1048576        128            7
SCOTT  T01          TABLE        T01                     4          7        640    1048576        128            7
SCOTT  T01          TABLE        T01                     5          7        768    1048576        128            7
SCOTT  T01          TABLE        T01                     6          7        896    1048576        128            7
SCOTT  T01          TABLE        T01                     7          7       1024    1048576        128            7
SCOTT  T01          TABLE        T01                     8          7       1152    1048576        128            7
SCOTT  T01          TABLE        T01                     9          7       1280    1048576        128            7
SCOTT  T01          TABLE        T01                    10          7       1408    1048576        128            7
SCOTT  T01          TABLE        T01                    11          7       1536    1048576        128            7
SCOTT  T01          TABLE        T01                    12          7       1664    1048576        128            7
SCOTT  T01          TABLE        T01                    13          7       1792    1048576        128            7
SCOTT  T01          TABLE        T01                    14          7       1920    1048576        128            7
SCOTT  T01          TABLE        T01                    15          7       2048    1048576        128            7
SCOTT  T01          TABLE        T01                    16          7       2176    1048576        128            7
SCOTT  T01          TABLE        T01                    17          7       2304    1048576        128            7
SCOTT  T01          TABLE        T01                    18          7       2432    1048576        128            7
19 rows selected.

SCOTT@book> truncate table t01 ;
Table truncated.

RMAN> backup datafile 7 format '/home/oracle/backup/T1y_%U';
Starting backup at 2017-12-06 09:17:52
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00007 name=/mnt/ramdisk/book/T01.dbf
channel ORA_DISK_1: starting piece 1 at 2017-12-06 09:17:52
channel ORA_DISK_1: finished piece 1 at 2017-12-06 09:17:53
piece handle=/home/oracle/backup/T1y_hbsle7u0_1_1 tag=TAG20171206T091752 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2017-12-06 09:17:53

$ strings -t d T1y_hbsle7u0_1_1 | grep 'AAAAA' |head -1
1090870 K 000174AAAAAAAAAAAAAAAAAAAAAAAAAA,
$ strings -t d T1y_hbsle7u0_1_1 | grep 'AAAAA' |tail -1
9445337 [L 169075AAAAAAAAAAAAAAAAAAAAAAAAAA
$ strings -t d T1y_hbsle7u0_1_1 | grep 'AAAAA' |wc
 169242  456998 7484144

SCOTT@book> drop table t01 purge ;
Table dropped.

SCOTT@book> create table t01 tablespace t01 as select rownum id ,to_char(rownum,'FM000000')||lpad('A',26,'A') name from dual connect by level<=4e5;
Table created.

SCOTT@book> select rowid,t01.* from t01 where id in (174,169075,169242);
ROWID                      ID NAME
------------------ ---------- --------------------------------
AAAWL0AAHAAAACEACt        174 000174AAAAAAAAAAAAAAAAAAAAAAAAAA
AAAWL0AAHAAAAR/AAA     169075 169075AAAAAAAAAAAAAAAAAAAAAAAAAA
AAAWL0AAHAAAAR/ACn     169242 169242AAAAAAAAAAAAAAAAAAAAAAAAAA

SCOTT@book> @ &r/rowid AAAWL0AAHAAAACEACt
    OBJECT       FILE      BLOCK        ROW ROWID_DBA            DBA                  TEXT
---------- ---------- ---------- ---------- -------------------- -------------------- ----------------------------------------
     90868          7        132        173  0x1C00084           7,132                alter system dump datafile 7 block 132 ;

SCOTT@book> @ &r/rowid AAAWL0AAHAAAAR/AAA
    OBJECT       FILE      BLOCK        ROW ROWID_DBA            DBA                  TEXT
---------- ---------- ---------- ---------- -------------------- -------------------- ----------------------------------------
     90868          7       1151          0  0x1C0047F           7,1151               alter system dump datafile 7 block 1151

SCOTT@book> @ &r/rowid AAAWL0AAHAAAAR/ACn
    OBJECT       FILE      BLOCK        ROW ROWID_DBA            DBA                  TEXT
---------- ---------- ---------- ---------- -------------------- -------------------- ----------------------------------------
     90868          7       1151        167  0x1C0047F           7,1151               alter system dump datafile 7 block 1151
       
--//昏,確實是8個extents.
--//也就是truncate後rman備份信息的量最大是8個extents.有點小疑問,我的測試使用的磁碟空間是連續的,如果離散是否也是這樣,不測試了浪費時間.



您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • 企業級緩存系統varnish應用與實戰 環境背景:隨著公司業務快速發展,公司的電子商務平臺已經聚集了很多的忠實粉絲,公司也拿到了投資,這時老闆想通過一場類似雙十一的活動,進行一場大的促銷,屆時會有非常多的粉絲訪問網站,你的總監與市場部門開完會後,確定活動期間會有平常10倍以上的訪問請求,總監要求大幅 ...
  • Innodb中的鎖 共用鎖和排它鎖(Shared and Exclusive Locks) 共用鎖和排它鎖是行級鎖,有兩種類型的行級鎖 共用鎖(s lock)允許持有鎖的事務對行進行讀取操作 排它鎖(x lock)允許持有鎖的事務對行進行更新和刪除操作 事務a在行r上擁有共用鎖,則其他事務可以獲得r ...
  • 1.mongodb下載地址: https://www.mongodb.com/dr/fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-ssl-3.6.0-signed.msi 2.安裝後文件夾結構如下圖所示 2、在D:\MongoDB下新建 ...
  • 對這個游戲我想大家都不陌生 不管新手還是老手都會遇到難題基本上是處於不會玩的狀態下去亂押註又或者是被某某某帶著跟計劃玩一是直接拉你進群讓你去跟計 劃(沒有長期的計 劃跟計劃死的人很多,你也不例外)二是在微 信 群里發神經的亂下註(或許看到別人買什麼你也跟著買,微信群基本都是托) 那該如何對待這個游戲 ...
  • 通常情況下,ETL工程師創建一個Agent Job來周期性地執行Package,Agent底層調用SSISDB的存儲過程(catalog.start_execution)以同步模式來啟動執行實例,這就意味著,我們可以模擬Agent Job的行為,使用TSQL腳本執行Package。SSIS引擎每執行 ...
  • 瞭解事務和鎖 事務:保持邏輯數據一致性與可恢復性,必不可少的利器。 鎖:多用戶訪問同一資料庫資源時,對訪問的先後次序許可權管理的一種機制,沒有他事務或許將會一塌糊塗,不能保證數據的安全正確讀寫。 死鎖:是資料庫性能的重量級殺手之一,而死鎖卻是不同事務之間搶占數據資源造成的。 不懂的聽上去,挺神奇的,懂 ...
  • 前言: 操作資料庫時候難免會因為“大意”而誤操作,需要快速恢復的話通過備份來恢復是不太可能的,因為需要還原和binlog差來恢復,等不了,很費時。這裡先說明下因為Delete 操作的恢復方法:主要還是通過binlog來進行恢復,前提是binlog_format必須是Row格式,否則只能通過備份來恢復 ...
  • 1. 首先要在實例級別啟用FILESTREAM,打開Sql Server Configuration Manager視窗,雙擊需要設置的SQL SERVER實例進行設置。 2. 需要更改 SQL SERVER 實例的 FILESTREAM 訪問級別,執行以下代碼,並重啟 SQL SERVER 服務: ...
一周排行
    -Advertisement-
    Play Games
  • 移動開發(一):使用.NET MAUI開發第一個安卓APP 對於工作多年的C#程式員來說,近來想嘗試開發一款安卓APP,考慮了很久最終選擇使用.NET MAUI這個微軟官方的框架來嘗試體驗開發安卓APP,畢竟是使用Visual Studio開發工具,使用起來也比較的順手,結合微軟官方的教程進行了安卓 ...
  • 前言 QuestPDF 是一個開源 .NET 庫,用於生成 PDF 文檔。使用了C# Fluent API方式可簡化開發、減少錯誤並提高工作效率。利用它可以輕鬆生成 PDF 報告、發票、導出文件等。 項目介紹 QuestPDF 是一個革命性的開源 .NET 庫,它徹底改變了我們生成 PDF 文檔的方 ...
  • 項目地址 項目後端地址: https://github.com/ZyPLJ/ZYTteeHole 項目前端頁面地址: ZyPLJ/TreeHoleVue (github.com) https://github.com/ZyPLJ/TreeHoleVue 目前項目測試訪問地址: http://tree ...
  • 話不多說,直接開乾 一.下載 1.官方鏈接下載: https://www.microsoft.com/zh-cn/sql-server/sql-server-downloads 2.在下載目錄中找到下麵這個小的安裝包 SQL2022-SSEI-Dev.exe,運行開始下載SQL server; 二. ...
  • 前言 隨著物聯網(IoT)技術的迅猛發展,MQTT(消息隊列遙測傳輸)協議憑藉其輕量級和高效性,已成為眾多物聯網應用的首選通信標準。 MQTTnet 作為一個高性能的 .NET 開源庫,為 .NET 平臺上的 MQTT 客戶端與伺服器開發提供了強大的支持。 本文將全面介紹 MQTTnet 的核心功能 ...
  • Serilog支持多種接收器用於日誌存儲,增強器用於添加屬性,LogContext管理動態屬性,支持多種輸出格式包括純文本、JSON及ExpressionTemplate。還提供了自定義格式化選項,適用於不同需求。 ...
  • 目錄簡介獲取 HTML 文檔解析 HTML 文檔測試參考文章 簡介 動態內容網站使用 JavaScript 腳本動態檢索和渲染數據,爬取信息時需要模擬瀏覽器行為,否則獲取到的源碼基本是空的。 本文使用的爬取步驟如下: 使用 Selenium 獲取渲染後的 HTML 文檔 使用 HtmlAgility ...
  • 1.前言 什麼是熱更新 游戲或者軟體更新時,無需重新下載客戶端進行安裝,而是在應用程式啟動的情況下,在內部進行資源或者代碼更新 Unity目前常用熱更新解決方案 HybridCLR,Xlua,ILRuntime等 Unity目前常用資源管理解決方案 AssetBundles,Addressable, ...
  • 本文章主要是在C# ASP.NET Core Web API框架實現向手機發送驗證碼簡訊功能。這裡我選擇是一個互億無線簡訊驗證碼平臺,其實像阿裡雲,騰訊雲上面也可以。 首先我們先去 互億無線 https://www.ihuyi.com/api/sms.html 去註冊一個賬號 註冊完成賬號後,它會送 ...
  • 通過以下方式可以高效,並保證數據同步的可靠性 1.API設計 使用RESTful設計,確保API端點明確,並使用適當的HTTP方法(如POST用於創建,PUT用於更新)。 設計清晰的請求和響應模型,以確保客戶端能夠理解預期格式。 2.數據驗證 在伺服器端進行嚴格的數據驗證,確保接收到的數據符合預期格 ...