Monday, 11 April 2016

Default display format for date field in Oracle SQL Developer

For date fields, by default SQL Developer will display date only without the time.

To set it to display the time as well, do the following:

1. In SQL Developer, go to Tools >> Preferences.
2. In the Preferences dialog, select Database >> NLS Parameters from the left panel.
3. From the list of NLS parameters, enter DD-MON-RR HH24:MI:SS into the Date Format field.
4. Save and close the dialog.

Tuesday, 8 December 2015

MSDTC on server 'servername' is unavailable

By default, when a stand-alone instance of Microsoft SQL Server exists in a cluster environment, the SQL Server-based instance is set to start automatically. If the host node is rebooted, you may receive the following error message when you issue commands that are related to distributed transactions:

ERROR: MSDTC on server 'servername' is unavailable.

On the server where the trigger resides, you need to turn the MSDTC service on. You can this by clicking START > SETTINGS > CONTROL PANEL > ADMINISTRATIVE TOOLS > SERVICES. Find the service called 'Distributed Transaction Coordinator' and RIGHT CLICK (on it and select) > Start.

Context Has Changed Since the Database Was Created

This article describes and provides the solutions of a common error in Entity Framework: 
"Context has changed since the database was created, Model backing a DB Context has changed, Model backing the context has changed since the database was created."

This is the most frequent error in Entity Framework. This type of error occurred when the model and the database cannot be mapped correctly. That means there is a modification or changed in the database. We made any type of schema change on the table or database after including Entity Data Model in the project or solutions.

To solve this error write the following code in Application_Start() Method in Global.asax.cs file.
Database.SetInitializer<CustomerDBContext>(null);

That means we need to bind our DB context class with a null value. If the database schema is changed, it is mandatory to updates the .edmx file.

Wednesday, 25 February 2015

An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode

To solve this issue go to Control Panel --> Administrative Tools --> IIS Manager and Change Application site's Managed Pipeline from Integrated to Classic.