ws******@hotmail.com (Rodger Dodger) wrote in message news:<c1**************************@posting.google. com>...
Hi there.
We have an application that can run on a non-unicode or a unicode sql
server
database.
Currently the application is running in a unicode database, as a
non-unicode database is less than half the size, I would prefer to
have a non-unicode database for demo purposes to be on my laptop, etc
etc
Is it possible to change a unicode sql server 2000 database into a
non-unicode database?
And if so, how would I go about doing this?
Any help would be greatly appreciated.
Thanks
Rodger
I'm not sure I understand your question - MSSQL always supports
Unicode in all databases. You can change a database's collation, but
that doesn't affect Unicode support, so I guess you may want to know
how to change all your nvarchar columns to varchar? If so, then one
way is to execute the results of a query like this:
SELECT 'ALTER TABLE ' + TABLE_SCHEMA + '.' + TABLE_NAME + ' ALTER
COLUMN ' + COLUMN_NAME + ' VARCHAR(' + CAST(CHARACTER_MAXIMUM_LENGTH
AS VARCHAR(10)) + ')'
FROM INFORMATION_SCHEMA.COLUMNS
WHERE DATA_TYPE = 'NVARCHAR'
This is a rather heavy-handed approach, however, so make sure you have
a backup before running it. If this doesn't help, or isn't what you're
trying to do, then please clarify what you need to achieve.
Simon