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
DECLARE | |
/* | |
Banner XE Sequence Fixer (also see Banner XE Sequence Checker) | |
This procedure attempts to fix the situation where a Banner SURROGATE_ID_SEQUENCE | |
gets behind the max SURROGATE_ID that it creates values for. | |
We fix it by selecting the sequence nextval in a loop until it's greater | |
than the surrogate ID. | |
This situation can happen when data rows are copied from one region to another |
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
DECLARE | |
/* | |
Banner XE Sequence Checker | |
This procedure checks all tables in the given schema for the condition where | |
the surrogate id sequence lags the maximum surrogate id. This situation will | |
eventually cause inserts into the table to fail with an unique constraint | |
violation on the surrogate id. | |
This condition comes about when data rows are copied from one region to another |
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 javax.xml.transform.TransformerFactory | |
import javax.xml.transform.stream.StreamResult | |
import javax.xml.transform.stream.StreamSource | |
// Load xslt | |
def xslt= new File("MyTrasform.xsl").getText() | |
// Create transformer | |
def transformer = TransformerFactory.newInstance().newTransformer(new StreamSource(new StringReader(xslt))) |
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
def s = 'Argh, Groovy you say, mate?' | |
def b64 = s.bytes.encodeBase64().toString() | |
def bytes = b64.decodeBase64() | |
def decodedData = new String(bytes) | |
println s | |
println b64 |