Over the years l have worked with many different people, and observed many people at work. When working in a mechanical garage l was impressed with the range of tools used by the time served mechanic's. When a plumber and electrician come to fit a new kitchen l was always was curious about the range to tools to do different jobs.
Today l had a relatively simple task when completing data migration task, which l was doing using SSIS. Most of the work uses TSQL when possible. In this case though l was asked convert the a string value from the source for one specific control on one form to Camel Case. First thought use play to my strengths and use TQL, so quick google, and found this stack overflow posting -> http://stackoverflow.com/questions/5164201/is-there-any-sql-server-built-in-function-to-convert-string-in-camel-case
Ok yes it was possible to use TSQL, the phrase that ran through my mind at that point was "when you have a hammer everything looks like a nail". Yes l could create the function and call it from the query etc.... SSIS is the most wonderful toolbox though (pun intended if you notice it). One of them is the script task. Since l only had to convert one control (there is a large number!) why not use some code? Would that be easier? Goggling lead to stack overflow posting -> http://stackoverflow.com/questions/1206019/converting-string-to-title-case-in-c-sharp ( This article filled in the gaps for me https://msdn.microsoft.com/en-us/library/system.globalization.textinfo.totitlecase.aspx)
public void Main()
string fieldName = (string)Dts.Variables["User::str_Field_ID"].Value;
string stringValue = (string)Dts.Variables["User::str_NNLFP_VALUE_TXT"].Value;
if (fieldName == "XYZ014")
TextInfo textInfo = new CultureInfo("en-GB", false).TextInfo;
stringValue = textInfo.ToTitleCase(stringValue);
Dts.Variables["User::str_NNLFP_VALUE_TXT"].Value = stringValue.ToString();
Dts.TaskResult = (int)ScriptResults.Success;
Yes it has taken me time and effort to learn C#, that said it's an excellent additional to my toolbox. Yes l could have done the same in TSQL, it would have taken probably taken longer. Right tool for the right job? That l am sure is a matter of opinion and or debate. Speaking personally for this specific project yes l believe so. It has encouraged me to keep adding to my own personal IT toolbox......
Ok long story, short. I downloaded and installed SQL server 2016 CTP3 on Windows 10 Pro X64 Virtual machine which was set up for testing purposes. Yes l know that was a silly idea, what the heck living dangerously is fun sometimes! The OS was a standard install and it's standalone as in not connected to a domain or clever stuff. When propmted to enter a user account, l used a personal Microsoft account l have. Next l installed SQL Server 2016 CTP nothing fancy and choose the native SSRS install
(If you just interested in list of steps l followed they are at the bottom of this posting)
Next logged in as the user account that was used during set up, this is Microsoft account. Now l wanted to play with SSRS, so open the default browser (Microsoft Edge) and entered the url “localhost/reportserver” and waited. Next got a dialog box asking me to enter my user credentials
So l entered my Microsoft account details, and eventually ended up with the error message below.
Yes l know that I should have remembered, an admin account requires to grant permission on Report Manager to the account you are connecting with “Doh!”. Next step was to see if l could run Microsoft Edge (the default browser) as Administrator, no that was not possible. As can be seen from the screen shot below it was possible to run command prompt as Administrator, which did not make sense, but not Microsoft Edge.
Again Google the rescue and found this page - http://www.virtualizationhowto.com/2015/07/windows-10-edge-opened-builtin-administrator-account/. Followed instructions open Microsoft Edge, restarted Windows was able to run Microsoft Edge as Administrator, "Yippee!!!" Typed in the url “localhost/reportserver”, then eventually got the following error message.
During earlier search found this page http://www.windowscentral.com/how-find-internet-explorer-windows-10-if-you-really-need-it. I had tried this before making the change in this page http://www.ghacks.net/2014/11/12/how-to-enable-the-hidden-windows-10-administrator-account/. So entered ‘Internet ‘ into the search box and selected to run Internet Explorer as Administrator.
Success !!!!!! (see screenshot below) As the saying goes “ a long way for a short cut”, however it works!
So l set about making the relevant changes in report manager, setting up the Microsoft user account l normally log in with as content mgr etc. That all seemed to go as expected. Next switched accounts back to the Microsoft account and thought l will just open Microsoft Edge. Since the account has been set up and l do not need to run it as Administrator. This did not work l got the error message below. So l typed into the search box 'Internet' and Internet Explorer was one of the applications l was able choose to run, the result can be seen below. It worked as expected.
Is there an easier way? Then please let me know, this was not the most fun learning journey, and I’m always open to learn.
So what steps did l follow?
Used instructions to enable the administrator account and set the password for the Administrator account.
Switched accounts from Microsoft account to Administrator account
Used these instructions to make relevant change to the security policy
Used these instructions to find Internet Explorer and open using "Run as Administrator" option
4) Open SSRS report manager (running as local administrator), set the relevant permissions for the Microsoft account
5) Switched accounts from Administrator account, to Microsoft account. Searched for Internet Explorer then browsed to "localhost/reports" and was able to see SSRS report manager.