字符集是来自用户还是数据库?

发布于 2024-10-16 05:54:20 字数 341 浏览 4 评论 0原文

我试图找出我们的项目哪里出了问题。

很久以前,我们的数据库管理员为我们正在处理的项目创建了一个用户和一个架构。

我们将该用户提供给创建表并安装应用程序的承包商。

今天我发现我们的数据库不支持 UTF-8 字符,而我们需要它。

select value from nls_database_parameters 
where parameter='NLS_CHARACTERSET'

结果是: WE8ISO8859P1

我的问题是,是创建用户时犯的错误,还是创建表的承包商犯的错误?

谢谢

I'm trying to figure out where our project went wrong.

A long time ago, our database administrator created a user and a schema for the project we were working on.

We gave that user to a contractor who created the tables and installed the application.

Today I discovered that our database doesn't support UTF-8 characters and we need it to.

select value from nls_database_parameters 
where parameter='NLS_CHARACTERSET'

The result is : WE8ISO8859P1

My question is, was the mistake made when the user was created, or was the mistake done by the contractor who created the tables?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

围归者 2024-10-23 05:54:20

字符集是数据库的一个属性。因此,创建数据库的人可能选择了错误的字符集。创建用户或创建表时没有与字符集相关的设置(除了确定是使用数据库字符集(CHAR/VARCHAR2)还是国家字符集(NCHAR/NVARCHAR2)数据类型)。

更改现有数据库的字符集可能需要一些努力。全球化指南中有一个关于字符集迁移的部分。根据 Oracle 版本(10g 和 11g 中的过程不同)以及已存在的数据,执行导出和导出操作。导入到新数据库可能是最简单的选择。

我应该补充一点,您在帖子中指定的操作顺序没有意义。必须先创建数据库,然后才能创建用户或模式。因此,DBA 可能很久以前就创建了用户和模式,而承包商最近创建了数据库,这是没有意义的。您是否可能在非 Oracle 上下文中使用术语“数据库”和“模式”?

The character set is an attribute of the database. So whoever created the database presumably chose the wrong character set. There are no character set related settings when you create a user or create a table (other than determining whether to use the database character set (CHAR/ VARCHAR2) or the national character set (NCHAR/ NVARCHAR2) data types).

Changing the character set of an existing database may take a bit of effort. The Globalization Guide has a section on character set migration. Depending on the Oracle version (the procedure is different in 10g and 11g) and what data already exists, doing an export & import to a new database may be the easiest option.

I should add that the order of operations you specified in your post doesn't make sense. The database has to be created before the user or the schema can be created. So it doesn't make sense that the DBA could have created the user and the schema a long time ago and the contractor created the database more recently. Are you possibly using the terms "database" and "schema" in a non-Oracle context?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文