AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 25.11.2010, 18:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,644 / 848 (80) +++++++
Регистрация: 28.10.2006
mbsturk: HOWTO: Change collation of AX database?
Источник: http://mbsturk.blogspot.com/2010/11/...-database.html
==============

AX databases are by default created with the same collation as your SQL Server has. But time to time you might need the database to have different collation. Maybe you think you can just execute ALTER DATABASE statement to change database's collation but this won't help. It is necessary to take in account that also all character columns (char, varchar, nchar, nvarchar, text, ntext) have also collation that might be different from the database one. So, what do you have to do to change collation of the whole database including the columns? Let's assume we have a database that has Latin1_General_CS_AS collation. Having AX database with case sensitive collation is really bad idea so we want to change it to Latin1_General_CI_AS. First step we have to do is to script out current database. Open SQL Server Management Studio

, connect to SQL Server Database Engine and expand Databases node in Object Explorer. Then right-click the required database and from the context menu select Tasks -> Generate Scripts.































Select the proper database and check Script all objects in the database and click Next.






















On Choose Script Options page set following properties to True and click Next:
  • Script collation
  • Script Database Create
  • Script Logins
  • Script Indexes



Select Script to New Query Window and click Finish to generate the script.



Click Close after the script creation is completed.

The script will be open in a new query window. Now we need to change name of the database. Press CTRL+H to open Replace window and type original database name into Find what text box and new database name into Replace with text box. Then click Replace All to use new database name through the whole script.



You may close the Find and Replace window now and press F5 to execute the script. Ignore any warnings regarding maximum key length.

When the script finishes we have a new database with required collation. We need to transfer the data now. This can be done using Import and Export wizard. Right-click the original database and select Tasks -> Export data from the context menu to start the wizard.









Original database should be selected as data source by default, however you can change it if required.






Select destination database where the data will be copied.



Leave Copy data from one or more tables or views checked and click Next.

Select all tables but do not select the views as this would result in failures during the execution. Keep Optimize for many tables option checked and click Next.




It might take several minutes as a new SSIS (SQL Server Integration Services) package is being generated. After the package is created Save and Execute Package window is open.







You can save the created package here. If you don't want to save the package, or after you have configured all options to save the package, click Finish to execute the package.







After the package execution completes, we just need to configure new database to be used by AOS.




Источник: http://mbsturk.blogspot.com/2010/11/...-database.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
mbsturk: Ax 2009 Rollup 4 Version Checker Blog bot DAX Blogs 0 29.04.2010 17:05
emeadaxsupport: Checking Database entries after restoring a Microsoft Dynamics 2009 SQL Database to another Domain or Environment Blog bot DAX Blogs 0 18.02.2010 23:05
AX 2009 Technical Journal: Short note on AX and database mirroring in SQL Server 2008 Blog bot DAX Blogs 0 04.02.2010 06:10
emeadaxsupport: Unable to install Dynamics AX 2009 Analysis extensions when the default SQL Server Analysis Server collation is set to Turkish_CI_AS or Turkish_CS_AS Blog bot DAX Blogs 0 22.09.2009 04:06
axStart: Microsoft Dynamics AX 2009 Hot Topics Web Seminar Series Blog bot DAX Blogs 0 06.08.2008 12:05

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 20:44.