Monday, 12 February 2018

Trace DTC Transactions

In the SQL Server go to
C:\Windows\System32\Msdtc\Trace
msdtcvtr.bat -tracelog c:\windows\System32\MsDtc\Trace\dtctrace.log -o dtcTextLog
If it shows the following error
1) The utility TraceFmt.exe is missing
Download and install Windows Driver Kit (WDK)
https://msdn.microsoft.com/en-us/windows/hardware/hh852365
The executable location should be in the environment variable path

Thursday, 8 September 2016

Office 365 Design

The front-end toolkit that makes your app or add-in blend seamlessly into Office 365.

https://dev.office.com/fabric


Monday, 16 May 2016

Tech Crawling



http://yeoman.io/

Yeoman helps you to kickstart new projects, prescribing best practices and tools to help you stay productive


http://bower.io/

Web sites are made of lots of things — frameworks, libraries, assets, and utilities. Bower manages all these things for you.
Keeping track of all these packages and making sure they are up to date (or set to the specific versions you need) is tricky. Bower to the rescue!


http://gruntjs.com/

The JavaScript Task Runner


http://ionicframework.com/

Free and open source, Ionic offers a library of mobile-optimized HTML, CSS and JS components and tools for building highly interactive native and progressive web apps. Built with Sass, optimized for AngularJS.


http://www.omnisharp.net

OmniSharp is a set of tooling, editor integrations and libraries that together create an ecosystem that allows you to have a great programming experience no matter what your editor and operating system of choice may be.


Thursday, 30 April 2015

Windows Convert Text File Encoding

Sometimes UTF-8 encoding just doesn't cut it for some developments and there is need for another type of encoding.

Found this problem working with portuguese language, the accentuation was all wrong.

You can do this with powershell.

Just run this in windows powershell

gc -en utf8 file_with_utf8.txt | Out-File -en unicode filewith_unicode.txt


Useful when the files are really big.

Monday, 6 April 2015

How to add a timezone to datetimeoffset column

Sometimes developers forgot to give the appropriate datatype and the date timezone is simply truncated.

For instance,  you wanted to insert  the date 2015-04-06 17:37:03.106 +01:00 but at some point the type of the variable you stored the value was datetime as implicity conversion truncates de timezone

As shown in the following example


To fix this apply the function TODATETIMEOFFSET 

https://msdn.microsoft.com/en-us/library/bb630335.aspx

And the result is


You loose some precision but for my case it's just fine,


Which SQL Server Editions supports Table and Index Partitioning


  • SQL Server 2012 and 2014 Enterprise Edition 
  • SQL Server 2008 R2 DataCenter and Enterprise Edition 
  • SQL Server 2008 Enterprise Edition
  • SQL Server 2005 Developer and Enterprise Edition

Thursday, 2 April 2015

Lightweight WebService Testing Tool

WebService Studio 2 available for download at https://code.google.com/p/webservicestudio2/

WebServices have evolved but there's still a lot of ASMX Web Service out there.

ASMX is simple and because it is simple, it isn’t very powerful, but you still have to work with them.

Instead of downloading SoapUI massive 1OO MB installer for basic testing why not use this tool 200KB Executable, I definitetly do!

Regular Expression Tester

Check out https://regex101.com Great Online Regular Expression Tester, with a full reference help and awesome explanation of the regular expression that you're building. It's specially helpful when the regular expression starting getting big and it's hard to find mistakes

Monday, 15 October 2012

View user permissions in SQL SERVER

Hi, To check your permissions just run the following queries and you'll get a list of assigned permissions SELECT * FROM fn_my_permissions(NULL, 'SERVER'); USE YourDatabaseName; SELECT * FROM fn_my_permissions (NULL, 'DATABASE'); GO

Tuesday, 10 April 2012

DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. (0xC0209303)

Whenever this error happens

SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.   failed with error code 0xC0209303


Check you connection string if the provider is
;Provider=sqlncli10.1

In my case the was because I had a connection string with Provider=SQLNCLI.1 from Integration 2005 and when I upgraded to 2008 didn't change it.

It took me along time to find this out hope it helps

Tuesday, 12 April 2011

Error when workflow is running in publishing page

I had a custom workflow associated with a content type  used by a publishing page, that gave this error

[NullReferenceException: Object reference not set to an instance of an object.] Microsoft.SharePoint.Publishing.Internal.WorkflowUtilities.GetAssociationDataValue(CachedWorkflow workflow, String xmlNodeName) +124


Digging throught the web I found a solution.


We need to had this association data to the workflow


<my:myFields xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:my=\"http://schemas.microsoft.com/office/infopath/2003/myXSD\" xml:lang=\"en-us\"><my:ItemChangeStop>false</my:ItemChangeStop></my:myFields>


Apparently Sharepoint is looking for node called "ItemChangeStop"


Thanks to Julien C (http://www.sharepointdev.net/sharepoint--workflow/sharepoint-error-when-editing-documents-with-custom-content-types-44343.shtml)


Somewhere else people talked about and hotfix from microsot that isn't available on the web ...

Thursday, 17 March 2011

Error using TextAlignment="Justify"

When using TextAlignment="Justify" in a  TextBlock a windows phone application unexpectedly exits.

After some digging apparently this alignment isn't supported on this control. Although appear as an option is a bug.

Saturday, 6 November 2010

How to Configure Simple Network Time Protocol (SNTP)

Just run the following commands


NET TIME /SETSNTP:time.windows.com
NET STOP W32TIME
NET START W32TIME
W32TM /config /reliable:YES
W32TM /resync /rediscover

Just replace time.windows.com with closest atomic clock address

For instance for Portugal the address is "ntp02.oal.ul.pt"

Wednesday, 20 October 2010

SQL Server 2000, 2005 intellisense and snippets

In SQL Server 2008 there's a cool feature that improves productivity alot, intellisense or code completion as some people call it. But in the early versions there's nothing. In my daily work I use a lot SQL Server 2000 e SQL Server 2005.

I found the following aplication that does the trick, unfortunately there only a trial version,

SQL Prompt

Digging through I found out that old version 2.0.0.59 is free.For me it's good enough.

Download it for free HERE

Saturday, 16 October 2010

Content Management Server 2002 stand-alone template explorer

Several peolpe told me that they couln't load the template explorer even with cmsEnable="1" in the  Vwd.webinfo file when opening a MCMS 2002 Project in Visual Studio 2005.


After some digging I found out that there was a stand alone MCMS template explorer available


Check the site Tools for Content Management Server 2002

Thursday, 14 October 2010

Check for table dependencies on SQL Server

I particularly use  this instruction

EXEC sp_depends TABLE_NAME


But there are several methods as stated here

SQL Server 2000 guys please read de following the article BUG: SP_Depends Does Not List Triggers



Wednesday, 13 October 2010

Error: 18452 Login failed for user ‘user’. The user is not associated with a trusted SQL Server connection

Just the other day I spent  an hour trying to figure the "Error: 18452 Login failed for user ‘user’. The user is not associated with a trusted SQL Server connection" error. 


I easily found out that I need to change the server authentication mode to mixed mode.


It took me a while but I just needed to restart the SQL Server as stated here


http://msdn.microsoft.com/en-us/library/ms188670.aspx

Tuesday, 12 October 2010

How to use UDL File to create sql connection string


1. On a directory of your choosing, create file with UDL extension i.e. test.UDL
2. Open the file icon and a wizard will appear.

3. Create your connection string. First (in the first tab) chose appropriate Provider. Then (in the second tab) construct the Connection by filling the required information (servername, database or similar).
4. Test Connection. If the connection is successful, click OK.
5. Open the UDL file with NOTEPAD
In notepad, you will have the connection string like this
[oledb]
; Everything after this line is an OLE DB initstring
Provider=SQLNCLI10.1;Integrated Security=SSPI;Persist Security Info=False;User ID="";Initial Catalog=MySampleDB;Data Source=.;Initial File Name="";Server SPN=""
The wizard has constructed the connection string. This is for SQL Server. Copy the bolded part and use it as connection string in your application.

Saturday, 9 October 2010

Date Picker JQuery Plugin

The same guy who developed the cool color picker done another excelent job with this date picker. Thanks Stefan Petre



Check how it works here

Nice Color Picker JQuery Plugin

Cool Jquery Plugin with no need of flash. Until now all that I found was in flash. It's A simple component to select color in the same way you select color in Adobe Photoshop.






Check out it works here