這個是從Will 保哥的部落格看到 - (http://blog.miniasp.com/post/2007/11/05/How-to-get-detailed-Data-Dictionary-in-SQL-Server-2005.aspx)
DECLARE @fromDepartmentId int; | |
DECLARE @toDepartmentId int; | |
SET @fromDepartmentId = $fromDepartmentId; -- set 來源copy的單位 - 以我們例子就是單位A | |
SET @toDepartmentId = $departmentId; -- set 要被copy的單位 - 以我們例子就是單位B | |
INSERT INTO Department2NodePermission (DepartmentId, NodeId, Permission) | |
SELECT | |
@toDepartmentId, | |
[NodeId], |
var jq = document.createElement('script'); | |
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
// ... give time for script to load, then type. | |
jQuery.noConflict(); |
In the webconfig, add following two:
<configuration>
<system.web>
<!--unit in kb-->
<!-- default 4096 -> 4MB -->
I have a generic class in my project with derived classes.
public class GenericClass<T> : GenericInterface<T>
{
}
public class Test : GenericClass
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)
DECLARE @databaseId nvarchar(128); | |
SET @databaseId = 'dbname'; ---改成要查看的資料庫 | |
-- 用戶索引查找次數 -> 這個表示主動用where條件過濾的欄位 | |
-- 用戶索引被動查找次數 -> 這個表示被動做join的次數 | |
select db_name(database_id) as N'資料庫名稱', |
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
# 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)] |
# 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 |