热情软件屋

 

在连接数据库时出现目录表不能被建立


编号:QA001713
建立日期: 1999年9月15日 最后修改日期:1999年10月29日
所属类别:

JON_WW:
    PB
    Win98
    本人在连接数据库时出现目录表不能被建立:catalog tables could not to be created and are not available for use.请各位大虾帮忙。THANK YOU!

回答:

    开发时,联接数据库的用户要有DBO的权限!!
    havesnow看了以上解答后问如何建立用户的DBO的权限 ?
    JiangAn回答说:
    可能我有点错了,具体内容请参阅《PB ONLINE BOOK》中的《Connecting to your DataBase》中的"Chapter 4:Manager Database Connections"中的“about the powerbuilder repository”,下面就是文章。一开始联接时的用户要有建表的权限,不同的数据库有不同的做法,如MS SQL SERVER中可在Enterprise Manager中的DATABASE--具体数据库--双击--permission设置。或更简单一点,将联接的用户当成DBO,还是在这个程序中,LOGINS--用户--双击--在相应的数据库中ALIAS设为DBO就可以了。SQL ANYWHERE中可用SQL CENTER设置,其它系统应该也差不多吧!
    About the Powersoft repository
    By default, PowerBuilder creates five Powersoft system tables the first time it connects to a database. These five tables, known collectively as the Powersoft repository , store extended attribute information (such as display formats, validation rules, and font information) about tables and columns in your database. You can also define extended attributes when you create or modify a table in PowerBuilder.
    
    This section tells you how to:
    
    lMake sure the Powersoft repository is created with the proper access rights
    
    lDisplay and open a Powersoft repository table
    
    lUnderstand the kind of information stored in the Powersoft repository
    
    lControl repository access
    
    
    
    Logging on to your database for the first time
    
    By default, PowerBuilder creates the Powersoft repository the first time you connect to a database with PowerBuilder.
    
    To ensure that PowerBuilder creates the repository tables with the proper access rights to make them available to all users, the first person to connect to the database with PowerBuilder must log on with the proper authority.
    
    
    
    vTo ensure proper creation of the Powersoft repository:|Make sure the first person to connect to the database with PowerBuilder has sufficient authority to create tables and grant permissions to PUBLIC.This means that the first person to connect to the database should log on as the database owner, database administrator, system user, system administrator, or system owner, as specified by your DBMS.
    
    
    
    Displaying the repository
    
    PowerBuilder maintains the Powersoft repository automatically whenever you change the information for a table or column. The Powersoft system tables in the repository are different from the system tables provided by your DBMS.
    
    If you want, you can display and open Powersoft repository tables in the Database painter just like other tables.
    
    
    
    vTo display the Powersoft repository tables:1Open the Select Tables dialog box in the Database painter.FOR INFO For instructions, see the PowerBuilder User's Guide .
    
    2Select the Show system tables checkbox.The Powersoft repository tables and DBMS system tables display in the tables list, as follows:
    
    |Powersoft repository tables The five tables in the Powersoft repository are: pbcatcol, pbcatedt, pbcatfmt, pbcattbl, and pbcatvld.
    
    |DBMS system tables The system tables supplied by the DBMS usually have a DBMS-specific prefix (such as sys or dbo ).
    
    3Open a Powersoft repository table to display its contents.FOR INFO For instructions, see the PowerBuilder User's Guide .
    
    Do not edit the repository tablesDo not change the values in the Powersoft repository tables.
    
    
    
    Contents of the repository
    
    PowerBuilder stores five types of extended attribute information in the Powersoft repository. (For more about the Powersoft repository, see the PowerBuilder User's Guide .)
    
    
    
    This Powersoft repository tableStores information aboutThat includes
    
    pbcatcolColumnsNames, comments, headers, labels, case, initial value, and justification
    
    pbcatedtEdit stylesEdit style names and definitions
    
    pbcatfmtDisplay formatsDisplay format names and definitions
    
    pbcattblTablesName, owner, default fonts (for data, headings and labels), and comments
    
    pbcatvldValidation rulesValidation rule names and definitions
    
    Prefixes in repository table namesFor some databases, PowerBuilder precedes the name of the repository table with a default DBMS-specific prefix. For example, the names of Powersoft repository tables have the prefix DBO in a SQL Server database (such as DBO.pbcatcol), SYSTEM in an ORACLE database (such as SYSTEM.pbcatfmt), and PBCATOWN in a DB2 database (such as PBCATOWN.pbcattbl).The preceding table gives the base name of each repository table without the DBMS-specific prefix.
    
    
    
    Controlling repository access
    
    To control access to the Powersoft repository at your site, you can specify that PowerBuilder not create the repository, that the existing repository should not be updated, or that the repository is accessible only to certain users or groups.
    
    You can control repository access by doing any of the following:
    
    |Setting Use Powersoft Repository Set the Use Powersoft Repository database preference in the Database Preferences property sheet in the Database painter.
    
    |Setting Read Only Set the Read Only database preference in the Database Preferences property sheet in the Database painter.
    
    |Granting permissions on repository tables Grant explicit permissions on the repository tables to users or groups at your site.
    
    
    
    Setting Use Powersoft Repository or Read Only to control access
    
    
    
    vTo control repository access by setting Use Powersoft Repository or Read Only:1In the Database painter, click the Database Preferences button in the PainterBar. orSelect Design>Options from the menu bar.
    
    Database Preferences buttonIf your PainterBar does not include the Database Preferences button, use the customize feature to add the button to the PainterBar.FOR INFO For instructions on customizing toolbars, see the PowerBuilder User's Guide .
    
    The Database Preferences property sheet displays. If necessary, click the General tab to display the General property page.
    
    2Set values for Use Powersoft Repository or Read Only as follows:
    
    
    
    PreferenceWhat you doEffect
    
    Use Powersoft RepositoryClear the checkboxDoes not create the Powersoft repository tables if they do not exist. Instead, the DataWindow and Report painters use the appropriate default values for extended attributes (such as headers, labels, and text color)If the Powersoft repository tables already exist, PowerBuilder does not use them when you create a new DataWindow or report
    
    Read OnlySelect the checkboxIf the Powersoft repository tables already exist, PowerBuilder uses them when you create a new DataWindow or report , but does not update themTherefore, you cannot modify (update) information in the repository tables or any other database tables in the DataWindow and Report painters when the Read Only checkbox is selected3Do one of the following:
    
    lClick Apply to apply the preference settings to the current connection and all future connections without closing the Database Preferences property sheet.
    
    lClick OK to apply the preference settings to the current connection and all future connections and close the Database Preferences property sheet.PowerBuilder saves your preference settings in the [Database] section of the PowerBuilder initialization file.
    
    
    
    Granting permissions on repository tables to control access
    
    If your DBMS supports SQL GRANT and REVOKE statements, you can control access to the Powersoft repository tables. The default authorization for each repository table is:
    GRANT SELECT, UPDATE, INSERT, DELETE ON table TO PUBLIC
    After the repository tables are created, you can (for example) control access to them by granting SELECT authority to end users and SELECT, UPDATE, INSERT, and DELETE authority to developers.
    This technique offers security and flexibility that is enforced by the DBMS itself.

此问题由JiangAn回答。

 
把这个问题推荐给朋友
   
   
您的意见类别
您的名字
您的电子邮件
您的建议(请尽可能详细)
 
 

版权所有 1997-2008 热情软件屋
如果您有任何建议和意见, 请给我发个电子邮件 askpro@china-askpro.com
Web Designed by ZebraStudio