SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Converting nvarchar to varchar
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

MuadDBA
Aged Yak Warrior

USA
628 Posts

Posted - 04/09/2002 :  14:58:42  Show Profile  Reply with Quote
One of our illustrious vendors has coded all the tables related to their application to use nvarchar datatypes instead of varchar types. Given that we don't use any extended characters in our database, I thought I would go about converting them. I asked for their blessing, and they gave it, with the exception of primary key fields, citing that various system tabels refer to primary keys and so therefore converting a primary key could be risky.

One of the big space and performance gains, though, will be in converting Primary key and other index fields to varchar...so can anyone thing of a valid SQLServer reason (ie not related to the application) that I couldn't convert them, too?

robvolk
Most Valuable Yak

USA
15665 Posts

Posted - 04/09/2002 :  15:36:23  Show Profile  Visit robvolk's Homepage  Reply with Quote
You'd have to drop any foreign key constraints that exist between the tables before you convert them. Otherwise, as long as the data converts properly, there should be no problem, and you can recreate the foreign keys when all the tables are converted. Make a FULL DATABASE backup before you do this, if there are any problems, you can restore from the backup and try again.

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000