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

Sunday, March 1, 2015

Cant open sqlproj with Visual Studio 2012 Install SQL Server Data Tools

I recently updated to Visual Studio 2012 Ultimate.
When i tried to open an existing SQL Server SQLCLR Project (*.sqlproj), it says that the sqlproj is incompatible with the version I am running.

How-i-fixed-it:
 
 
I installed the SQL Server Data Tools from http://msdn.microsoft.com/en-us/data/tools.aspx.

I found the solution here:

http://stackoverflow.com/questions/11906691/visual-studio-2012-csproj-and-sqlproj

and here:
http://www.comoke.com/index.php/2012/10/visual-studio-2012-database-project-sqlproj-project-type-not-supported/

and here:
http://blog.tentaclesoftware.com/archive/2013/02/11/visual-studio-2010-and-2012-sqlproj-interoperability.aspx
Read more »

How to update Linq to SQL dbml database layout in Visual Studio 2012

I have not been working with the Linq to SQL tool before and had to make some changes to an existing Visual Studio 2012 project. Some new colums were added to a database table and i needed to update the corresponding dbml file in the Visual Studio project.

How-i-fixed-it:
I found the solution here: http://stackoverflow.com/questions/1110171/how-to-update-linq-to-sql-dbml-file

Delete the modified tables from the designer, and drag them back onto the designer surface from the Database Explorer. I have found that, for this to work reliably, you have to:
a. Refresh the database schema in the Database Explorer (right-click, refresh)
b. Save the designer after deleting the tables
c. Save again after dragging the tables back.
Read more »

SQL Server Message 6260 system overflowexception because of arithmetic overflow error caused by divison by 0

One of my C# SQLCLR table valued function started to throw an exception with some recently added data to the database:

SQL Server Message 6260
system.overflowexception Arithmetic Overflow

How-i-fixed-it:
It turned out to be caused by a divison by 0 happening at runtime because of bad records in the data. I added some code to check for this which fixed the problem of the arithemtic overlow.

Read more »

Saturday, February 28, 2015

How to migrate upgrade update MS SQL Server 2000 database to SQL Server 2012

I was looking for a way / description how to upgrade an existing SQL Server 2000 database to SQL Server 2012.

How i fixed it:
SQL Server 2000 database has to be upgraded to 2005/2008 first.

If found the right hints how to do it in the SQL Server Forum here: http://social.msdn.microsoft.com/Forums/sqlserver/en-US/8ab5617e-0644-4434-96af-ebc04ba89f75/upgrading-from-sql-2000-to-2012-how

The procedure is described well in this document:
http://download.microsoft.com/download/9/5/3/9533501A-6F3E-4D03-A6A3-359AF6A79877/SQL_Server_2012_Upgrade_Technical_Reference_Guide_White_Paper.pdf

It says (page 241), that i have to first upgrade the database from 2000 to 2005/2008 and then to 2012.



 
Read more »