Posts

Anonymous User Access to SharePoint

In addition to having to follow the standard process to enable web application's anonymous access:


I had to do a few PowerShell commands to make anonymous access perform most activities on SharePoint without limitation.


1) Modify the root webs anonymous permission mask (you can reduce the access here too)


web.AnonymousPermMask64="FullMask"

2) Allow client calls for anonymous users

$webApp = Get-SPWebApplication http://forms.turnkey.global
$webApp.ClientCallableSettings.AnonymousRestrictedTypes.Remove( [Microsoft.SharePoint.SPList],"GetItems")
$webApp.Update()


3) I also had to enable iframes for other sites to point to my SharePoint forms


http://sadomovalex.blogspot.com.au/2015/12/remove-x-frame-options-sameorigin-http.html

T-SQL Set Recovery Mode to Simple and Truncate Log Files

I used this script to change the current recovery mode on a SQL server to simple from full recovery.
For new databases, update the system database named 'model' as this is the database template used for all new databases. Setting the recovery mode to simple on this database wi


USE master
GO
set ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
DECLARE @DbNames TABLE (
rowNum int identity (1,1),
dbname sysname NOT NULL )
INSERT INTO @DbNames
SELECT name
FROM sys.databases
WHERE state=0 AND user_access=0 and has_dbaccess(name) = 1
ORDER BY [name]
DECLARE @EndCount int;
SELECT @EndCount = count(*) FROM @DbNames
DECLARE @RowCounter int;
SELECT @RowCounter = 1;
DECLARE @DbName varchar(155);
DECLARE @sql varchar(2000);
WHILE (@RowCounter <= @EndCount)
BEGIN
SELECT @DbName = dbname FROM @DbNames WHERE @RowCounter = rowNum;
SELECT @sql1 = 'ALTER DATABASE ['+@DbName+'] SET RECOVERY SIMPLE'
SELECT @sql2 = 'USE ['+@DbName+']; DBCC SHRINKFILE(N'''+@DbName+'_log''…
One of the hottest issues in web developer circles this year is accessibility of websites on various devices other than the standard desktop or laptop screens. While the subject is not new, it has taken on a relatively new approach with respect to how to deal with the opportunities ahead.
With mobile devices, tablets, and similar gadgets gaining ground faster than most can keep up, it behooves organizational stakeholders to address the issues encompassing user interactions and acceptance of their websites on the latest diminutive gizmos. Oh, and don't forget other devices acquiring web-enabled screens such as refrigerators, washing machines and other everyday appliances.

Users who access your websites through their mobile devices or other display screens really do not care what method you use, just as long as that they can effectively navigate your website on whatever device they happen to be using. For that reason, the two methods described in this article have been devised for w…

Review Timer Job Definition - "Object Reference not set to an instance of an object"

Hi All,

Recently had a problem in SharePoint 2013 after rebuilding the Search service application. The timer job for 'CreateStoreRebalancerJobDefinition' had broken and was causing the Review Timer Job page to error with "Object Reference not set to an instance of an object" error.

The resolution was from:

Get-SPTimerJob | out-file –filepath “c:\timerjobs.txt”http://myserver:55555/_admin/ServiceJobDefinitions.aspx – Does not displayGet-SPTimerJob | where {$_.displayname -like “”} | fl | out-file –filepath “c:\timerjobs.txt”
(Creates the txt file with the jobs that do not work)Get-SPTimerJob | where { $_.name -like “*job name” } |ft id,name
(Not really needed, as text file above will display thiws, simply copy/paste into line below the job id number.)$job = Get-SPTimerJob -id putidenumberhere$job.Delete()Pretty swift, fixed the issue.
Source: http://social.technet.microsoft.com/Forums/en-US/266b6e78-4d4d-4f40-8db2-f42f5da4d3ed/review-timer-job-definition-page-errror-object…

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 capture Oracle server.
7.Create a new oracle database ‘orclshuts’ using the Data Configuration Assistant.
8.Create a new oracle database ‘repo’ using the Data Configuration Assistant.
9.Using SQL Developer login to the newly created database
a.Right click on the new connection