DOS | Creare un file da riga di comando
Questo comando crea un file grande 50 megabyte: fsutil file createnew test.txt 52428800
Guide pratiche di Linux, Windows, Database, Sviluppo Web e molto altro
Questo comando crea un file grande 50 megabyte: fsutil file createnew test.txt 52428800
Il seguente codice permette di aggiungere, in una tabella, un nuovo campo solo se questi non esiste già: IF NOT EXISTS( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Tabella' AND…
SELECT o.Name AS 'StoredProcedure' FROM SysObjects AS o INNER JOIN SysComments AS c ON o.ID = c.ID WHERE c. LIKE '%testo da ricercare%' AND o. = 'P'
SELECT ID,CASE WHEN ID % 2 = 0 THEN ‘Pari’ ELSE ‘Dispari’ END AS ‘Verifica’ FROM Tabella (Utilizzare % 4 al posto di % 2 se si vuole verificare che…
Problema: Inserendo nel web.config la voce <modules runAllManagedModulesForAllRequests=”true” /> si verifica l’errore This configuration section cannot be used at this path. This happens when the section is locked at a…
Avviare Power Shell da SQL Server Management studio e lanciare il seguente script: $db = (new-Object Microsoft.SqlServer.Management.Smo.Server("nome_server")).Databases.Item("nome_database") Foreach ($sp in $db.StoredProcedures){ if(!$sp.IsSystemObject){ if (!$sp.IsEncrypted){ $sp.TextMode = $false; $sp.IsEncrypted = $true;…
Questo comando esegue il backup del database “master” di sql server nella cartella C:\Backup: osql -S .\sqlexpress -E -Q “BACKUP DATABASE master TO DISK=’C:\Backup\master.bak’ WITH FORMAT
Protected Function GetFTPFile(ByVal FileDaScaricare As String) As String Dim r As String = String.Empty Dim a As String = Now.Year Dim m As String = Now.Month If CInt(m) < 10…