powered by simpleCommunicator - 2.0.49     © 2025 Programmizd 02
Форумы / Сертификация и обучение [игнор отключен] [закрыт для гостей] / 70-228 Вопрос из Testking 2.0 № 94
5 сообщений из 5, страница 1 из 1
70-228 Вопрос из Testking 2.0 № 94
    #32564171
Dixi
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Question No: 94
You are the database administrator for an accounting company. You are installing SQL Server 2000
on a new Microsoft Windows 2000 Server computer. The computer will run two client/server
database applications that your company has purchased. Each application uses a separate database.
During the installation, you specify SQL_Latin1_General_CP1_CI_AI as the default collation for the
SQL server computer. After completing the installation, you discover that one of the new applications,
named Financials, is sorting information incorrectly.
You contact the application vendor and discover that the Financials application requires the
SQL_Latin1_CP437_BIN collation. You need to configure the correct collation for the applications
without diminishing the performance of the SQL Server computer.
What should you do?

A. Rerun the SQL Server Setup and specify the SQL_Latin1_General_CP437_BIN collation.
B. Run the rebuildm utility and specify the SQL_Latin1_General_CP437_BIN collation.
C. Use the ALTER DATABASE statement to specify the SQL_Latin1_General_CP437_BIN collation
for the Financials database.
D. Use the ALTER TABLE statement to specify the SQL_Latin1_General_CP437_BIN collation for
each table in the Financials database.

Answer: C.
Explanation: The collation of a database can be specified in the COLLATE clause of the ALTER
DATABASE statement. This will change the default collation of the database that was specified when the
database was created, or to alter the collation for a database where the collation was not specified when the
database was created and thus the default collation of the server was used.
Reference: BOL: ALTER DATABASE

Incorrect Answers:
A: The collation of a database can be altered using the COLLATE clause of the ALTER DATABASE
statement. It is therefore not necessary to reinstall the instance of SQL Server 2000 or to rerun the
setup program. Furthermore, rerunning the SQL Server 2000 setup program would disrupt the
performance of the SQL Server computer.
B: The rebuildm utility alters the master database and can be used to change the collation settings for an
instance of SQL Server 2000. However, it is only the Financial database that needs to be altered as it
is financial application is the only application that uses the SQL_Latin1_General_CP437_BIN
collation.
D: The COLLATE clause can be specified at different levels. It can be specified for the database, a
table, a column or an expression. In this scenario the collation can be altered at the database level as
this will reduce administrative effort when new tables are added to the database.

=============================================================
Я попробовал сделать как учит TestKing (ответ C) - collation базы поменялся,а collation в существующих таблицах базы остался прежним. Я чего-то неправильно делаю или правильный ответ D?
...
Рейтинг: 0 / 0
70-228 Вопрос из Testking 2.0 № 94
    #32564637
Фотография Quark
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Ответ Д однозначно неправильный, так как действительно любая сосзданная вновь таблица будет иметь старый коллатион.
НАсчет С
действительно в МСДН написано

Altering the default collation of a database does not change the collations of the columns in any existing user-defined tables. These can be changed with ALTER TABLE. The COLLATE CLAUSE on an ALTER DATABASE statement changes:

The default collation for the database. This new default collation is applied to all columns, user-defined data types, variables, and parameters subsequently created in the database. It is also used when resolving the object identifiers specified in SQL statements against the objects defined in the database.


Any char, varchar, text, nchar, nvarchar, or ntext columns in system tables to the new collation.

Но думаю что этот ответ правильный так как:

All existing char, varchar, text, nchar, nvarchar, or ntext parameters and scalar return values for stored procedures and user-defined functions to the new collation.

The char, varchar, text, nchar, nvarchar, or ntext system data types, and all user-defined data types based on these system data types, to the new default collation.
...
Рейтинг: 0 / 0
70-228 Вопрос из Testking 2.0 № 94
    #32564640
Фотография Quark
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
то есть раз уж это APPLICATION то и collation самих таблиц ей будет по-барабану
...
Рейтинг: 0 / 0
70-228 Вопрос из Testking 2.0 № 94
    #32565361
Dixi
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Новые таблицы создавать не надо так как все уже создано по условию задачи.
Если принять ответ C и оставить в таблицах неправильные COLLATE приложение не будет сортировать корректно (даже если < ……It is also used when resolving the object identifiers specified in SQL statements against the objects defined in the database. …..All existing char, varchar, text, nchar, nvarchar, or ntext parameters and scalar return values for stored procedures and user-defined functions to the new collation. The char, varchar, text, nchar, nvarchar, or ntext system data types, and all user-defined data types based on these system data types, to the new default collation.>)

Фразу < то есть раз уж это APPLICATION то и collation самих таблиц ей будет по-барабану > я не совсем понял.

Думаю все же правильный ответ D.
...
Рейтинг: 0 / 0
70-228 Вопрос из Testking 2.0 № 94
    #32565449
Фотография Quark
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
авторФразу < то есть раз уж это APPLICATION то и collation самих таблиц ей будет по-барабану > я не совсем понял
ИМХО, что если это application то обращаться к БД оно будет посредством хранимых процедур, вьюх итп для которых уже будет новый collate/

авторНовые таблицы создавать не надо
Опять же application, кто его знает что там в логику зашито.
...
Рейтинг: 0 / 0
5 сообщений из 5, страница 1 из 1
Форумы / Сертификация и обучение [игнор отключен] [закрыт для гостей] / 70-228 Вопрос из Testking 2.0 № 94
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]