Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Converting nvarchar to varchar

Author  Topic 

MuadDBA

628 Posts

Posted - 2002-04-09 : 14:58:42
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

15732 Posts

Posted - 2002-04-09 : 15:36:23
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
   

- Advertisement -