This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export ORACLE_HOME=/oracle/oracle11g | |
| $ORACLE_HOME/bin/sqlplus / as sysdba <<EOF | |
| spool $ORACLE_HOME/log/backup.log; | |
| alter database end backup; | |
| spool off; | |
| EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import MySQLdb | |
| import os | |
| import time | |
| import datetime | |
| dt=datetime.datetime.now().strftime("%I:%M%p on %B %d, %Y") | |
| file1 = open("/scripts/post-thaw.log","a+" ) | |
| try: | |
| os.remove('/tmp/freeze_snap.lock') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Sid": "VisualEditor0", | |
| "Effect": "Allow", | |
| "Action": [ | |
| "ec2:CopySnapshot", | |
| "ec2:AuthorizeSecurityGroupIngress", | |
| "ec2:ModifyVolumeAttribute", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Collections; | |
| import java.util.HashMap; | |
| import java.util.Map; | |
| import org.springframework.security.authentication.AuthenticationProvider; | |
| import org.springframework.security.authentication.BadCredentialsException; | |
| import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; | |
| import org.springframework.security.core.Authentication; | |
| import org.springframework.security.core.AuthenticationException; | |
| /** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - hosts: localhost | |
| connection: local | |
| tasks: | |
| - name: Clone VM from Template | |
| - vmware_guest: | |
| hostname: vcenter.asvignesh.in | |
| username: [email protected] | |
| password: password | |
| validate_certs: no | |
| name: newvm001 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Connect-VIServer -Server vcenter.asvignesh.in -Credential | |
| $ovfPath = "C:\Users\asvig\Downloads\nimesa.ova" | |
| $ovfConfig = Get-OvfConfiguration -Ovf $ovfPath | |
| $ovfConfig.Common.ip.Value="10.10.x.x" | |
| $ovfConfig.Common.netmask.Value="255.255.0.0" | |
| $ovfConfig.Common.gateway.Value="10.0.0.1" | |
| $ovfConfig.Common.dns1.Value="8.8.4.4" | |
| $ovfConfig.Common.dns2.Value="8.8.8.8" | |
| $ovfConfig.NetworkMapping.VM_Network.Value="VM Network" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $dbs = Get-SqlDatabase -ServerInstance NW1\CLUST2 | |
| foreach ($database in $dbs | where { $_.IsSystemObject -eq $False }) | |
| { | |
| $dbName = $database.Name | |
| $sql = @" | |
| USE [master] | |
| GO | |
| ALTER DATABASE [$dbName] SET RECOVERY FULL WITH NO_WAIT | |
| GO | |
| "@ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| param( | |
| $serverName, | |
| $backupDirectory | |
| ) | |
| [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO") | Out-Null | |
| [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SmoExtended") | Out-Null | |
| [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.ConnectionInfo") | Out-Null | |
| [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SmoEnum") | Out-Null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| param( | |
| $serverName, | |
| $backupDirectory | |
| ) | |
| [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO") | Out-Null | |
| [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SmoExtended") | Out-Null | |
| [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.ConnectionInfo") | Out-Null | |
| [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SmoEnum") | Out-Null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| param( | |
| $serverName, | |
| $backupDirectory | |
| ) | |
| [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO") | Out-Null | |
| [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SmoExtended") | Out-Null | |
| [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.ConnectionInfo") | Out-Null | |
| [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SmoEnum") | Out-Null |