麻煩有參加幫我填寫一下問卷 - 瞭解一下大家感受如何 感謝
# 看看那些會刪掉 | |
dir -Directory -Recurse -Include bin,obj | %{$_.FullName} | |
# 實際刪掉 | |
dir -Directory -Recurse -Include bin,obj | Remove-Item -Force -Recurse |
When delete large data showed
The transaction log for database '{db name}' is full due to 'ACTIVE_TRANSACTION'.
which means there is no more space for log
if you don't have that much space for large delete, do it in chunks
more info checkout
有時候檔案名稱裡面會有數字,但是排序的時候因為是用字串排序,所以順序不如預期。 例如說有以下幾個檔案:
a1
a2
a10
a20
預期的排序應該如上,但是實際上排序出來會類似:
# original from http://stackoverflow.com/questions/20269202/remove-files-from-zip-file-with-powershell | |
# 這邊是從某個zip檔案裡面的對應對應files刪掉 | |
[Reflection.Assembly]::LoadWithPartialName('System.IO.Compression') | |
$zipfile = 'C:\path\to\your.zip' | |
$files = 'some.file', 'other.file', ... | |
$stream = New-Object IO.FileStream($zipfile, [IO.FileMode]::Open) | |
$mode = [IO.Compression.ZipArchiveMode]::Update |
# usage Set-FileTimeStamps -path C:Ref -date 7/1/11 | |
# From https://blogs.technet.microsoft.com/heyscriptingguy/2012/06/01/use-powershell-to-modify-file-access-time-stamps/ | |
Function Set-FileTimeStamps | |
{ | |
Param ( | |
[Parameter(mandatory=$true)] |
Location of installed sql server Instance
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL
EDIT:
If you are looking for 32 bit instances on a 64 bit OS, you will need to look here:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SQL Server\Instance Names\SQL
DECLARE @databaseId nvarchar(128); | |
SET @databaseId = 'dbname'; ---改成要查看的資料庫 | |
-- 用戶索引查找次數 -> 這個表示主動用where條件過濾的欄位 | |
-- 用戶索引被動查找次數 -> 這個表示被動做join的次數 | |
select db_name(database_id) as N'資料庫名稱', |
Sometimes some files are accedntily added into the source control, which later relaized caused by not include a project level .gitignore
Below command provide way to remove all track files which should be ignored
-
Produce the
.gitignore
file first and place in the root of git project -
Remove all files (
-r
for recurse,.
mean from current directory) from git
but leave the physical file untouch (indicate by the--cache
option)