meta données pour cette page
  •  

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
sql_server:alway_on:rstauration_manuelle_db_instance_secondaire [15/04/2025 18:13] – créée mdlsql_server:alway_on:rstauration_manuelle_db_instance_secondaire [26/10/2025 12:43] (Version actuelle) mdl
Ligne 1: Ligne 1:
 +  * Backup full et TLOG
 +<code TSQL>
 BACKUP DATABASE [IVANTI_SECURITYCONTROLS] to disk='\\GVASQLCL1\1-Temp_AlwaysOnBuild\IVANTI_SECURITYCONTROLS_BackupFull_10-04-2025.bak' with stats=2; BACKUP DATABASE [IVANTI_SECURITYCONTROLS] to disk='\\GVASQLCL1\1-Temp_AlwaysOnBuild\IVANTI_SECURITYCONTROLS_BackupFull_10-04-2025.bak' with stats=2;
  
 BACKUP LOG [IVANTI_SECURITYCONTROLS] to disk='\\GVASQLCL1\1-Temp_AlwaysOnBuild\IVANTI_SECURITYCONTROLS_BackupLog_10-04-2025.bak' with  stats=2; BACKUP LOG [IVANTI_SECURITYCONTROLS] to disk='\\GVASQLCL1\1-Temp_AlwaysOnBuild\IVANTI_SECURITYCONTROLS_BackupLog_10-04-2025.bak' with  stats=2;
 +</code>
  
  
- +  * restore 
-##### +<code TSQL>
 restore filelistonly from disk='\\GVASQLCL1\1-Temp_AlwaysOnBuild\IVANTI_SECURITYCONTROLS_BackupFull_10-04-2025.bak'; restore filelistonly from disk='\\GVASQLCL1\1-Temp_AlwaysOnBuild\IVANTI_SECURITYCONTROLS_BackupFull_10-04-2025.bak';
  
Ligne 20: Ligne 22:
  
 ALTER DATABASE [IVANTI_SECURITYCONTROLS] SET HADR AVAILABILITY GROUP = [gvasqlag1]; ALTER DATABASE [IVANTI_SECURITYCONTROLS] SET HADR AVAILABILITY GROUP = [gvasqlag1];
 +</code>
  
- +  * on compare sur la primaire le nombre de BDD versus nombre de BDD dans AG 
-####+<code TSQL>
 select count(name)from sys.databases select count(name)from sys.databases
 where name not in('master','model','msdb','tempdb'); where name not in('master','model','msdb','tempdb');
Ligne 28: Ligne 31:
  
 select count(distinct(database_name))  from master.sys.dm_hadr_database_replica_cluster_states select count(distinct(database_name))  from master.sys.dm_hadr_database_replica_cluster_states
 +</code>