目前分類:資料庫管理 (28)

瀏覽方式: 標題列表 簡短摘要

SQL Server Analysis 預設執行個體使用的TCP 通訊埠是 2382

當作業系統安裝第二個AS的執行個體時,要如何確認該執行個體使用什麼 Port Number

小草 發表在 痞客邦 留言(0) 人氣()

 

考量既有主機Buffer pool不夠大的狀況,記憶體無法應付大量交易。可能因為i/o而降低效能,因此SQL 2014新增了Buffer Pool Extension技術。*.bpe檔案主要是建立在SSD硬碟上,利用SSD快速讀寫的技術,使其成為記憶體與實體硬碟中的第二個快取暫存區。

小草 發表在 痞客邦 留言(0) 人氣()

 

透過 SSMS 連線到 SQL Server 2008R2 資料庫伺服器時,編輯 SQL Server Agent job 中的步驟時出現收以下錯誤訊息:

小草 發表在 痞客邦 留言(0) 人氣()

 

「SQL 追蹤」最常用於效能調教與T-SQL 陳述式與預存程序偵錯,此外也提供稽核資料庫活動、收集資料庫樣本資料..等等。

小草 發表在 痞客邦 留言(0) 人氣()

 

安裝SQL Server 2012 管理工具之後,發現伺服器中舊版的SQL Server 2008 R2 組態管理員發生錯誤。錯誤訊息為:「遠端程序呼叫失敗。[0800706]

image

小草 發表在 痞客邦 留言(0) 人氣()

 

利用SQL Server 提供的系統預存程序 xp_fixeddrives 計算硬碟使用量

小草 發表在 痞客邦 留言(0) 人氣()

方法1:使用 DBCC showfilestats with no_infomsgs  計算 mdf 總容量與使用容量

                        DBCC SQLPERF(logspace)   計算 ldf 總容量與使用容量

小草 發表在 痞客邦 留言(0) 人氣()

開啟 SSMS 工具中的物件總管展開[管理]結點,開啟 Database Mail 組態精靈,第一次安裝請選擇第一個選項設定Database Mail

image

小草 發表在 痞客邦 留言(0) 人氣()

 

 

小草 發表在 痞客邦 留言(0) 人氣()

問題說明:

SSMS 工具中物件總管是窗內,資料庫執行各體的執行狀態圖示消失。

小草 發表在 痞客邦 留言(0) 人氣()

今天運氣不錯,遇到這個問題

好在Google一下就發現有人曾經遇過了

小草 發表在 痞客邦 留言(0) 人氣()

  • Oct 11 Thu 2012 01:14
  • DAC

SQL Server 為系統管理員提供了特殊的診斷連接,可在伺服器的標準連接失效時使用。

image

小草 發表在 痞客邦 留言(0) 人氣()

備份組」(Backup Set) 包含單次成功備份作業的備份。 RESTORE、RESTORE FILELISTONLY、RESTORE HEADERONLY 和 RESTORE VERIFYONLY 陳述式是用於單一備份組上
USE msdb
SELECT name, database_name, backup_size, TYPE,
compatibility_level, backup_set_id
FROM dbo.backupset;
SELECT logical_name, backup_size, file_type
FROM dbo.backupfile;
image

參考 :backupsetBackupfile


小草 發表在 痞客邦 留言(0) 人氣()

USE master
GO
ALTER DATABASE tempdb 
        MODIFY FILE (NAME = tempdev, FILENAME = 'D:\DATA\MSSQL\tempdb.mdf')
GO
ALTER DATABASE tempdb 
        MODIFY FILE (NAME = templog, FILENAME = 'D:\DATA\MSSQL\tempdb.ldf')
GO

 

 

小草 發表在 痞客邦 留言(0) 人氣()

SQL Server 安裝失敗,錯誤訊息如下:
SQL Server setup media does not support the language of the OS or does not have ENU Localized files.

小草 發表在 痞客邦 留言(0) 人氣()

前天經由Byron 告知 SQL Server 2011 RC0可供下載。為了跟上SQL Team的進度,只好將手邊的CTP3移除了
(你也可以使用升級的方式,相關內容可參考RiCo技術農場)

小草 發表在 痞客邦 留言(0) 人氣()

最近從Byron 那裏得知有CTP3可以測試了
UI介面更貼近正式版了,所以撥空下載之後就趕緊找個環境來瞧瞧囉~

小草 發表在 痞客邦 留言(0) 人氣()

--drop table #spt_space
go
IF  OBJECT_ID('tempdb..#tmp','U') IS NOT NULL
drop table #tmp
go
IF  OBJECT_ID('tempdb..#spt_space','U') IS NOT NULL
drop table #spt_space
go
declare @id int         
declare @type   character(2)        
declare @pages  int         
declare @dbname sysname
declare @dbsize dec(15,0)
declare @bytesperpage   dec(15,0)
declare @pagesperMB     dec(15,0)

create table #spt_space
(
    objid       int null,
    rows        int null,
    reserved    dec(15) null,
    data        dec(15) null,
    indexp      dec(15) null,
    unused      dec(15) null
)

set nocount on

-- Create a cursor to loop through the user tables
declare c_tables cursor for
select  id
from    sysobjects
where   xtype = 'U'

open c_tables

fetch next from c_tables
into @id

while @@fetch_status = 0
begin

    /* Code from sp_spaceused */
    insert into #spt_space (objid, reserved)
        select objid = @id, sum(reserved)
            from sysindexes
                where indid in (0, 1, 255)
                    and id = @id

    select @pages = sum(dpages)
            from sysindexes
                where indid < 2
                    and id = @id
    select @pages = @pages + isnull(sum(used), 0)
        from sysindexes
            where indid = 255
                and id = @id
    update #spt_space
        set data = @pages
    where objid = @id


    /* index: sum(used) where indid in (0, 1, 255) - data */
    update #spt_space
        set indexp = (select sum(used)
                from sysindexes
                where indid in (0, 1, 255)
                and id = @id)
                - data
        where objid = @id

    /* unused: sum(reserved) - sum(used) where indid in (0, 1, 255) */
    update #spt_space
        set unused = reserved
                - (select sum(used)
                    from sysindexes
                        where indid in (0, 1, 255)
                        and id = @id)
        where objid = @id

    update #spt_space
        set rows = i.rows
            from sysindexes i
                where i.indid < 2
                and i.id = @id
                and objid = @id

    fetch next from c_tables
    into @id
end

select --top 25
    Table_Name = (select [name] from sysobjects where id = objid),
    rows = convert(char(11), rows),
    reserved_KB = (reserved * d.low / 1024.) ,
    data_KB = (data * d.low / 1024.) ,
    index_size_KB = (indexp * d.low / 1024.) ,
    unused_KB = (unused * d.low / 1024.) 
into #tmp       
from    #spt_space, master.dbo.spt_values d
where   d.number = 1
and d.type = 'E'
order by reserved desc

drop table #spt_space
close c_tables
deallocate c_tables



select * from #tmp

 

image

小草 發表在 痞客邦 留言(2) 人氣()

在Windows 2008 R2的環境中,如果直接從 autorun.exe 開始安裝SQL 2000會出現下列錯誤訊息。

image

小草 發表在 痞客邦 留言(0) 人氣()

又發生 SQL Server 啟動失敗啦~接連幾次都碰到 SQL 靈異事件,最近真是運氣太好了。

 

小草 發表在 痞客邦 留言(0) 人氣()

1 2