Sql-Server

Verificare l'esistenza di un file

Davide Mauri

Con queste poche dighe di codice è possibile verificare - unicamente mediante T-SQL - l’esistenza o meno di un file:

create table [#cmdoutput]
(
[output] nvarchar(1024)
)
go

insert into [#cmdoutput] ([output])
exec xp_cmdshell ‘dir /b \\tauceti2\c$\autoexec.bat’
go

declare @exists int
select @exists = count(*) from #cmdoutput where [output] is not null
if (@exists > 0) print ‘Exists’ else print ‘Not Exists’
go

SQLIO Disk Subsystem Benchmark Tool

Davide Mauri

Grazie al tool SQLIO è possibile analizzare e testare le performance del sistema I/O del server sulla quale varrà installato SQL Server:

http://www.microsoft.com/downloads/details.aspx?familyid=9a8b005b-84e4-4f24-8d65-cb53442d9e19&displaylang=en

Questo strumento è fondamentale per verificare che le performance siano quelle desiderate o per capire qual’è il carico massimo (in termini di I/O) che il sistema può sopportare.