Brad Chen's SQL Server Blog

MS, SQL Server Support, Guidelines, Tips, Troubleshooting

Browse by Tags

Tagged Content List
  • Blog Post: Query SQL Server backup history and restore history records

    1.使用以下TSQL語法查詢備份檔紀錄 SELECT bs.backup_set_id, bs.database_name, bs.backup_start_date, bs.backup_finish_date, CAST(CAST(bs.backup_size/1000000 AS INT) AS VARCHAR(14)) + ' ' + 'MB' AS [Size], CAST(DATEDIFF(second, bs.backup_start_date, bs.backup_finish_date) AS VARCHAR(4)) + ' ' + 'Seconds' [TimeTaken...
  • Blog Post: Apply snapshot from Alternate folder to improve performance when initialize a Subscription in Transactional Replication

    Apply snapshot from Alternate folder to improve performance when initialize a Subscription in Transactional Replication 訂閱的初始化有兩個過程: 1.產生snapshot file,這個是snapshot agent所負責的工作。 Type of Replication Common Snapshot Files Snapshot Replication or Transactional...
  • Blog Post: Quick to build a testing web site to access SQL Server

    Classic ASP How to access SQL Server in Active Server Pages http://support.microsoft.com/kb/169377/en-us ASP.NET 1.1 逐步解說:在 Web Form 網頁中顯示資料 Visual Studio .NET 2003 http://msdn.microsoft.com/zh-tw/library/cc438239(v=vs.71).aspx Walkthrough: Basic Data Access in Web Pages Visual Studio 2005 http...
  • Blog Post: How to Rename SQL Server Cluster Virtual Server Name(Network name)

    How to Rename SQL Server Cluster Virtual Server Name(Network name) Rename a SQL Server Failover Cluster Instance http://msdn.microsoft.com/en-us/library/ms178083.aspx The name of the virtual server is always the same as the name of the SQL Network Name (the SQL Virtual Server Network Name)....
  • Blog Post: SQL Server 2008 與SQL Server 2005 Sample Databases範例資料庫下載與安裝

    SQL Server 2008 與SQL Server 2005 Sample Databases範例資料庫下載與安裝 SQL Server 2008安裝光碟已不再含有範例資料庫Sample Database,需自行到CodePlex網站的SQL Server Database Product Samples網頁下載 http://msftdbprodsamples.codeplex.com/ [SQL Server 2008] [SQL Server 2005] SQL Server 2008 Sample Database...
  • Blog Post: 立即中斷所有SQL Server連線

    立即中斷所有SQL Server連線 1.針對單一資料庫的連線 範例:將Northwind資料庫設定為只能有一個連線,並中斷其他連線 -- 中斷 Northwind 資料庫的所有連線 USE master GO ALTER DATABASE [Northwind] SET SINGLE_USER WITH ROLLBACK IMMEDIATE; GO -- 復原為一般多人連線 USE master GO ALTER DATABASE [Northwind] SET MULTI_USER WITH ROLLBACK IMMEDIATE; GO 2.針對所有SQL Server連線 (1...
  • Blog Post: SQLDiag工具程式的使用

    SQLDiag工具程式的使用 前言:SQLDiag是SQL Server內建的診斷收集共用程式, [ SQL Server 2005 ] 預設位置:C:\Program Files\Microsoft SQL Server\90\Tools\Binn\SQLDiag.exe 你可以在任何路徑下執行SQLDiag因為此路徑已被加到path系統變數,執行sqldiag -?或sqldiag /?即可顯示參數說明 SQL 2005的sqldiag搭配參數請使用正斜線"/" SQLdiag 可以收集下列類型的診斷資訊: Windows 效能記錄 Windows 事件記錄檔 SQL Server...
  • Blog Post: Listing space used information in each database files

    Listing space used information in each database files -- SQL Server 2000請將 sys.databases改成sysdatabases -- 第欄是資料使用大小單位是KB CREATE TABLE #db_space ( [DBname] NVARCHAR(50), [Fileid] NVARCHAR(10), [Filegroup] NVARCHAR(10), [TotalExtents] int, [UsedExtents] int, [Name] NVARCHAR(50), [FileName] NVARCHAR...
Page 1 of 1 (8 items)