Showing posts with label sql server. Show all posts
Showing posts with label sql server. Show all posts

Saturday, December 3, 2016

Hibernate - Cannot insert explicit value for identity column in table 'MYTABLE' when IDENTITY_INSERT is set to OFF


When using Hibernate targeting an SQL Server database could happen to have the error "Cannot insert explicit value for identity column in table 'MYTABLE' when IDENTITY_INSERT is set to OFF".
Here is how to deal with that.

Thursday, July 9, 2015

Sql Server Procedure to Write Log into a File



Sometimes you have to write a long running time procedure and you want to log to file what is happening during the execution, in order to check the status, or just for event logging purpose. Here I propose a simple stored procedure for Sql Server that allows you to do that, using it instead of the classic "print" to dbms console.

(c) Copyright 2020 - MyTroubleshooting.com