17.6 C
Firenze
venerdì, Agosto 1, 2025
Home Blog Page 3401

Merak : modifica (massiva) del TIPO di Casella

Per modificare la TIPOLOGIA di casella (imap, pop3, ecc.) si può intervenire direttamente sul database con questa istruzione:

UPDATE Users SET U_AccountType = ‘0’ WHERE U_Domain = ‘miosito.it’

basta Ricordare che:

AccountType = ‘0’ > pop3
AccountType = ‘2’ > imap
AccountType = ‘1’ > imap e pop3

The database principal owns a schema in the database, and cannot be dropped.

0

E’ possibile, in fase di cancellazione di un utente, imbattersi in questo errore:

Drop failed for User ‘xxxxxx’. (Microsoft.SqlServer.Smo)
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
The database principal owns a schema in the database, and cannot be dropped. (Microsoft SQL Server, Error: 15138)

questo succede perchè l’utente è ancora MEMBRO di qualche Schema (nel database) e per cancellarlo bisogna prima rimuoverlo da questi schemi.
Utilizzare come SQL nel DB :

SELECT sc.name
FROM sys.schemas sc
WHERE sc.principal_id = USER_ID(‘xxxxx’)

per vedere in che schemi è l’utente. Dopodichè assegnare a DBO questi schemi in modo da “estrometterlo”

ALTER AUTHORIZATION
ON SCHEMA::db_owner
TO dbo

Unable to Relay

0

Unable to Relay è un problema di server della posta in uscita.
Lo puoi trovare in più casi
1) le impostazioni LOCALI di Outlook per il server della posta in uscita sono sbagliate (mancano user e pass per l’autenticazione)
2) le impostazioni LOCALI di Outlook per il server della posta in uscita sono “anche corrette” ma stai usando un SMTP che magari non ti fa passare (es sei connesso TIN spedisci con infostrada)
3) se è un server che ha un SMTP di inoltro….l’smtp di inoltro non ti fa passare.
Poi i casi possono essere anche altri……ma in linea di massima è un errore che ti dice che c’è qualcosa che non va in posta in uscita, non sei riconosciuto, quindi non passi!

Il set di backup include il backup di un database diverso dal database ‘xx’ esistente

0

E’ possibile, in fase di ripristino ricevere questo errore :

System.Data.SqlClient.SqlError: Il set di backup include il backup di un database diverso dal database ‘xxx’ esistente. (Microsoft.SqlServer.Smo)

questo capita perchè il Db è diverso, ma per aggirarlo è sufficiente andare in OPZIONI e utilizzare la funzione SOVRASCRIVI DATABASE ESISTENTE

 

Ripristinare un Database SQL Server da BACKUP

0

Per ripristinare un database SQL server, con Sql Studio, da un file BAK è necessario avere almeno 1 modo per far arrivare il file sul server.
Meglio se con un sistema FTP.
A quel punto possiamo utilizzare il software come mostrato in figura per caricare il file BAK
(Attenzione – i percorsi della figura sono quelli del SERVER, non del CLIENT)

come permessi per l’utente, per il momento gli ho dato : db_owner, db_denydatareader e db_backupoperator

Fusione di due Metabase.Xml (iis6 merge XML files)

0

Ci sono dei casi, nella vita, in cui IIS migration TOOL potrebbe non funzionare. I motivi possono essere molteplici, dall’errore di accesso NEGATO a errori di altra natura. In questo caso potrebbe essere necessaria una FUSIONE di due file METABASE.Xml di IIS.
Purtroppo, a differenza di quello che si crede, questa procedura non può essere fatta in modo “spavaldo” con un banale text editor Avanzato (ci ho provato) in quanto genera degli errori di vario tipo. Non può essere utilizzato nemmeno il BACKUP di IIS

Purtroppo dall’interfaccia di amministrazione le uniche operazioni che riguardano la gestione del metabase di IIS sono relative al backup ed relativo ripristino, ma fortunatamente Microsoft non ci lascia completamente a mano vuota, rendendo possibile l’operazione di esportazione e importazione tramite uno script vbs utilizzabile via shell che si chiama iiscnfg

Questo è il comando per l’esportazione, che va eseguito sul server in cui c’è la configurazione da copiare.

iiscnfg /export /f nomefile /sp / /children

Vediamo i parametri che sono stati inseriti qui:

/f indica che l’esportazione deve avvenire su file ( nel mio caso nomefile è c:backup.xml )
/sp indica il ramo del metabase, che in questo caso è un slash (che indica tutto IIS) ma potrebbe anche indicare un singolo sito
/children consente semplicemente di esportare in maniera ricorsiva tutte le sottochiavi

Prima di procedere all’importazione sul server di destinazione vi CONSIGLIO di fare un BACKUP della configurazione attuale.
Qualcosa potrebbe andare storto, potrebbero essere sovrascritti dei siti web duplicati
Ecco il comando per l’IMPORTAZIONE :

iiscnfg /import /f nomefile /sp / /dp / /children /merge

Questo SISTEMA funziona a patto che i percorsi rimangano gli stessi, ovvero se i siti prima erano sul disco D dovranno essere su D anche adesso.
Se dovete passare un server IIS5 a IIS6 procedere così:
– aggiornare WIndows 2000 a Windows 2003. Non sucecderà niente e IIS sarà aggiornato al 6.0.
– eseguire la procedura di EXPORT con iiscnfg
– EDITARE il file XML generato, più che altro per corregegre tutti i percorsi c:winnt in c:windows
– reimportare il file

XCOPY – La guida completa

Syntax
xcopy Source [Destination] [/w] [/p] [/c] [/v] [/q] [/f] [/l] [/g] [/d[:mm-dd-yyyy]] [/u] [/i] [/s [/e]] [/t] [/k] [/r] [/h] [{/a|/m}] [/n] [/o] [/x] [/exclude:file1[+[file2]][+[file3]] [{/y|/-y}] [/z]

Parameters
Source : Required. Specifies the location and names of the files you want to copy. This parameter must include either a drive or a path.
Destination : Specifies the destination of the files you want to copy. This parameter can include a drive letter and colon, a directory name, a file name, or a combination of these.
/w : Displays the following message and waits for your response before starting to copy files:
Press any key to begin copying file(s)
/p : Prompts you to confirm whether you want to create each destination file.
/c : Ignores errors.
/v : Verifies each file as it is written to the destination file to make sure that the destination files are identical to the source files.
/q : Suppresses the display of xcopy messages.
/f : Displays source and destination file names while copying.
/l : Displays a list of files that are to be copied.
/g : Creates decrypted destination files.
/d[:mm-dd-yyyy] : Copies source files changed on or after the specified date only. If you do not include a mm-dd-yyyy value, xcopy copies all Source files that are newer than existing Destination files. This command-line option allows you to update files that have changed.
/u : Copies files from Source that exist on Destination only.
/i : If Source is a directory or contains wildcards and Destination does not exist, xcopy assumes destination specifies a directory name and creates a new directory. Then, xcopy copies all specified files into the new directory. By default, xcopy prompts you to specify whether Destination is a file or a directory.
/s : Copies directories and subdirectories, unless they are empty. If you omit /s, xcopy works within a single directory.
/e : Copies all subdirectories, even if they are empty. Use /e with the /s and /t command-line options.
/t : Copies the subdirectory structure (that is, the tree) only, not files. To copy empty directories, you must include the /e command-line option.
/k : Copies files and retains the read-only attribute on destination files if present on the source files. By default, xcopy removes the read-only attribute.
/r : Copies read-only files.
/h : Copies files with hidden and system file attributes. By default, xcopy does not copy hidden or system files.
/a : Copies only source files that have their archive file attributes set. /a does not modify the archive file attribute of the source file. For information about how to set the archive file attribute by using attrib, see Related Topics.
/m : Copies source files that have their archive file attributes set. Unlike /a, /m turns off archive file attributes in the files that are specified in the source. For information about how to set the archive file attribute by using attrib, see Related Topics.
/n : Creates copies by using the NTFS short file or directory names. /n is required when you copy files or directories from an NTFS volume to a FAT volume or when the FAT file system naming convention (that is, 8.3 characters) is required on the destination file system. The destination file system can be FAT or NTFS.
/o : Copies file ownership and discretionary access control list (DACL) information.
/x : Copies file audit settings and system access control list (SACL) information (implies /o).
/exclude:filename1[+[filename2]][+[filename3]] : Specifies a list of files containing strings.
/y : Suppresses prompting to confirm that you want to overwrite an existing destination file.
/-y : Prompts to confirm that you want to overwrite an existing destination file.
/z : Copies over a network in restartable mode.
/? : Displays help at the command prompt.

RIFERIMENTI qui

iismt.exe – The IIS Migration Tool was unable to connect to the remote computer. Access is denied.

Oggi ho ricevuto questo errore da IIS Migration TOOL in fase di migrazione da un server IIS 5.0 a un server IIS 6.0.

The IIS Migration Tool was unable to connect to the remote computer. Access is denied.

per Risolvere questo problema è necessario controllare :

– che sia stata stabilita una connessione di rete tra la sorgente e il server obiettivo (attenzione a diverse subnet mask!!)
– che il servizio IISAdmin sia in esecuzione sia sul server di origine e di destinazione
– che la condivisione di file * Amministrativa sia abilitato sul server di origine (controllare unità C$)
– che l’utente abbia privilegi di amministratore e lo sia sia sul server sorgente sia sul server di destinazione
– che ci sia un adeguato spazio su disco rigido sul server di destinazione

Backup in SQL Server versione Express

0

Con questo comando, lanciato dalla consolle SQL di Studio Express si può effettuare il Backup di un database SQL Server su Express Edition:

BACKUP DATABASE [VIM-VCDB] TO DISK = N’C:VIM-VCDB.bak’ WITH NOFORMAT, INIT, NAME = N’VIM-VCDB’,SKIP, NOREWIND, NOUNLOAD, STATS = 10

Con questo comando è possibile schedulare l’esecuzione dei backup in SQL Server versione Express :

Sqlcmd.exe -E -Q ” BACKUP DATABASE [VIM-VCDB] TO DISK = N’C:VIM-VCDB.bak’ WITH NOFORMAT, INIT, NAME = N’VIM-VCDB’,SKIP, NOREWIND, NOUNLOAD, STATS = 10″Sqlcmd.exe è presente nella cartella Bin dell’installazione di SQL Server

Merak – Disabilita connessioni a questo dominio – DISABILITATA

E’ possibile, a volte, trovare la casella “DISABILITA CONNESSIONI a QUESTO DOMINIO” in modalità DISABILITATA (come da figura)

in questo modo non può funzionare la disabilitazione delle caselle e non funziona neppure da riga di comando.
(c:meraktool modify domain ” + sito + ” D_DisableLogin TRUE)

per attivarla bisogna ATTIVARE i LIMITI di DOMINIO:
Impostazioni globali > Domini > Utilizza limiti di dominio

Ultime dal Nostro BLog