Unknown type - sys.date

A SQL Server Management Studio add-in to source control your database in Subversion or Team Foundation Server.

Unknown type - sys.date

Postby Frankie » Tue Jul 23, 2013 3:10 am

Hi All,

I'm using SQL Source Control 3 and when i tried linking my database to a SQL 2005 server, i am getting "Unknown type - sys.date" error.

I am not able to perform "Get latest" due to this error as well.

Any help is greatly appreciated.
Posts: 1
Joined: Tue Jul 23, 2013 3:06 am

Postby andy.campbell.smith » Thu Jul 25, 2013 2:16 pm

Can you clarify exactly what it is you're doing? You said "linking my database to a SQL 2005 server" - what do you mean by that?

Usually this kind of error suggests a SQL Server version mismatch - if you're linking to a repository of scripts generated by SQL Source Control on a different version of SQL Server, SQL Source Control may not be able to apply them to your database because the object creation scripts may use features not present in SQL 2005.
Andy Campbell Smith

Red Gate Technical Support Engineer
Posts: 173
Joined: Thu Oct 20, 2011 10:19 am
Location: Red Gate Software

Postby Totu » Mon Jun 23, 2014 10:29 am


Last Friday I bumped into the same error message in one for our CD pipelines, here is my fix:

As Andy described, the error is thrown because the product thinks you have an old version of SQL Server as a source or target. Why does it think like that when my SQL Server is 2008 R2?

When I was looking at the logs I found this line that gave me a hint:
Code: Select all
Warning: The SQL Server version specified for the scripts folder

I went into the RedGateDatabaseInfo.xml and looked for something about the version and removed the DatabaseVersion tag. After running the pipeline again, it successfully finished.

I hope this helps.

Bálint Bartha, Skyscanner
Posts: 11
Joined: Mon Apr 07, 2014 1:38 pm

Postby james.billings » Thu Jun 26, 2014 2:58 pm

That's correct- the xml file will normally be populated with information about the server and database version, and if these are incorrect it'll change the behaviour.
I believe it used to default to assuming 2005 which is why this error used to come up a lot more regularly- I think we may have changed the default to a more recent version which is why removing the info perhaps helped.
Posts: 1122
Joined: Wed Jun 16, 2010 10:10 am
Location: Red Gate

Return to SQL Source Control Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests