Posts

Showing posts from November, 2013

Simple Script to return Table from CSV in Oracle

That's it...in T-SQL a 'select ... where someval...in @tablevar' can be over int or string. But in Oracle the IN will only work over number values, thus we must cast TO_NUMBER. That was fun =). SELECT TO_NUMBER(column_value) FROM XMLTABLE(<csv_string>)

Migrate from SQL Server to Oracle in .NET using Devart

Steps to migrate from SQL Server to Oracle for Shuts Project. 1.       Download and install Oracle Database 11g – Personal Edition – this edition offers the full feature set of Enterprise Edition and is targeted for development/staging. 2.       Download and install JDK 7. 3.       Upgrade the SQL Developer from 2.x to 4.0.0.12.84 4.       Launch SQL Developer and use the Migration workbench to capture an external database. a.       Click tools -> migration -> Create database capture scripts 5.       Copy the capture scripts to the target server. Execute OMWB_OFFLINE_CAPTURE.BAT and pass in parameters for username/password and target db. rem   %1 DBA login id rem   %2 password rem   %3 database name rem   %4 database server name 6.       Copy output of ...

SharePoint Set Locale Region on All Web Applications and Site Collections

A quick script works on both SharePoint 2010 and 2013. Make sure to update en-AU to the target locale you are after =). Enjoy! [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") $farm = [Microsoft.SharePoint.Administration.SPFarm]::Local $websvcs = $farm.Services | ? -FilterScript {$_.GetType() -eq [Microsoft.SharePoint.Administration.SPWebService]} $webapps = @() foreach ($websvc in $websvcs) { $NewLocale = "en-AU" foreach ($webApp in $websvc.WebApplications) { foreach ($site in $webApp.Sites) { Write-Host "Updating Site -" $site -ForegroundColor "Green"       $Webs = $site.AllWebs ForEach ($Web In $Webs) {    If ($Web.locale -ne $NewLocale)    {       Write-Host $Web.title "- " -NoNewLine; Write-Host "changing from" $Web.locale "to" $NewLocale -ForegroundColor "Green"       $Web.Locale = $NewLocale       $Web.Update()    ...