Tuesday, March 20, 2012

Change DB intercallation

Is it possible change the intercallation of a DB? I have Modern_Spanish and
I'd like to change it to SQL_Latin1_General_CP1_CI_AS
Regards,
Diego F.Diego
See ALTER DATABASE ......commnad in the BOL
"Diego F." <diegofrNO@.terra.es> wrote in message
news:eKt9HxzlFHA.3936@.TK2MSFTNGP10.phx.gbl...
> Is it possible change the intercallation of a DB? I have Modern_Spanish
> and I'd like to change it to SQL_Latin1_General_CP1_CI_AS
> --
> Regards,
> Diego F.
>
>|||Check this out:
http://msdn.microsoft.com/library/d...br />
819v.asp
ML|||Thank you.
ALTER DATABASE db_name COLLATE ...
Regards,
Diego F.
"Diego F." <diegofrNO@.terra.es> escribi en el mensaje
news:eKt9HxzlFHA.3936@.TK2MSFTNGP10.phx.gbl...
> Is it possible change the intercallation of a DB? I have Modern_Spanish
> and I'd like to change it to SQL_Latin1_General_CP1_CI_AS
> --
> Regards,
> Diego F.
>
>|||Hi,
1=2E Firstly, you will have to bring your database into single-user mode.
2=2E Secondly, you have to check if there are any database objects like
tables, constraints etc dependent on the original collation. If yes, a
simple technique would be to script them and then drop and re-create
using the new collation.
Thirdly, to change the collation for a specific database, you can use
this command
alter database <yourdbname> collate SQL_Latin1_General_CP1_CI_AS.
If you want to modify SQL Server collation i.e. for all DB's then you
have rebuild master database using
1=2EShutdown Microsoft=AE SQL Server=99 2000, and then run Rebuildm.exe.
This is located in the Program Files\Microsoft SQL Server\80\Tools\Binn
directory.
2=2EIn the Rebuild Master dialog box, click Browse.
3=2EIn the Browse for Folder dialog box, select the \Data folder on the
SQL Server 2000 compact disc or in the shared network directory from
which SQL Server 2000 was installed, and then click OK.
4=2EClick Settings. In the Collation Settings dialog box, verify or
change settings used for the master database and all other databases.
Initially, the default collation settings are shown, but these may not
match the collation selected during setup. You can select the same
settings used during setup or select new collation settings. When done,
click OK.
5=2EIn the Rebuild Master dialog box, click Rebuild to start the process.
The Rebuild Master utility reinstalls the master database.|||Notice that this approach will not modify the objects that already
exist in the DB. Only new tables will use the new collation. If you
want to modify the tables that already exist, then you'll need to
recreate them after you modified the database's collation. If you
already have data in the tables, you'll have to BCP the data to text
files and after recreating the tables BCP it back into the tables.
Adi

No comments:

Post a Comment