Change all varchars to nvarchar

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

Change all varchars to nvarchar

Postby Paul75uk » Fri Dec 09, 2011 9:22 am


We want to make a bulk change to all tables - to change all instances of varchar to nvarchar.

Back in the day before SQL Source Control we would have done a find and replace throughout our SQL scripts to do this. We are working in a dev environment where we are yet to go live with the database, so upgrading users isn't an issue.

My question is, is it ok to go to the Tables directory (that is maintained by RedGate SQL Source Control) and do a find a replace here and then commit the changes? Or do I have to make this sort of change in Sql Server Managenment Studio? Or are there any other ideas how to make a change like this.


Posts: 1
Joined: Fri Dec 09, 2011 9:16 am

Postby David Atkinson » Fri Dec 09, 2011 10:11 am

I wouldn't recommend changing SQL Source Control's own working folder as this isn't a supported scenario.

However, what you can do is to create a new working folder and check out your scripts folder to this, make any changes to the files, and check them in. Provided you're using the 'dedicated' model, you'll be able to return to SQL Source Control and run 'get latest' on these to update your development environments.

David Atkinson
Product Manager
Red Gate Software
David Atkinson
Posts: 1143
Joined: Mon Dec 05, 2005 3:54 pm
Location: Twitter: @dtabase

Return to SQL Source Control Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests