Unknown type - sys.date

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

Moderators: Chris Auckland, David Atkinson, sherr, PhilScrace, andy.campbell.smith

Unknown type - sys.date

Postby Frankie » Tue Jul 23, 2013 4: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.
Frankie
 
Posts: 1
Joined: Tue Jul 23, 2013 4:06 am

Postby andy.campbell.smith » Thu Jul 25, 2013 3: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
andy.campbell.smith
 
Posts: 173
Joined: Thu Oct 20, 2011 11:19 am
Location: Red Gate Software

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

Hi,

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.

Cheers,
Balint
Bálint Bartha, Skyscanner
Totu
 
Posts: 11
Joined: Mon Apr 07, 2014 2:38 pm

Postby james.billings » Thu Jun 26, 2014 3: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.
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.


Return to SQL Source Control 3

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests