FREELISTS and FREELIST GROUPS of CREATE TABLE

My oracle 10g, create table statement is below:

CREATE TABLE S005. Test

(

AAA char (1)

)

PCTFREE 0

STORAGE)

FREELISTS 10

FREELIST GROUPS 20

)

LOGGING

NOCACHE

NOPARALLEL

NOMONITORING;

After performing this sql, I have a query table USER_TABLES but FREELISTS and FREELIST_GROUPS fields show nothing.

In my view, FREELISTS value must be 10, and FREELIST_GROUPS should be 20. How to retrieve these values?

Thank you very much

SAMS - Oracle FAQ

Tags: Database

Similar Questions

  • Cats 1-1 and Skype group chat doesn't work do not

    I upgraded Skype since Friday and then none of group cats, that I already have updated and I can't send a message in them. I've also added to groups by other contacts while on a call to them, and the group is created, but it shows as a group of "Untitled" with 0 participants on my screen and no video or mic.

    In addition to this, when I'm on the Cat 1-1 some of my posts don't send not the contact will go into offline mode and 1 minute later, they come online and sends the message. I thought that this could well be the first contact, but happened to 4 or 5 people I speak now.

    I use Skype version 7.21.0.100

    The first three lines of /dumpmsnp are:

    MSNP: Connection data (MSNP24):
    * Status: NetStateDisconnected
    * Current server: s.gateway.messenger.live.com
    * Server registered: s.gateway.messenger.live.com

    Please can anyone help with a solution to these problems?

    Restart your computer in Safe Mode with network and then try to start Skype.

  • Create table error

    Hello
    I get an error like this.

    create the table asgnd_agent_bak as (select * from ASGND_AGENT s, YVERT)
    where
    a.CNTCT_KEY = s.CNTCT_KEY and a.SCN_NUM = s.SCN_NUM
    and a.ACTVTY_DT = to_date (' 03/17/2013 ',' mm/dd/yyyy')
    and s.SCN_OPEN_DT = to_date (' 03/15/2013 ',' mm/dd/yyyy')
    "and a.SRC_SYS_DESC ="FACET");
    create the table asgnd_agent_bak as (select * from ASGND_AGENT s, YVERT)
    *
    ERROR on line 1:
    ORA-00957: duplicate column name

    Please notify

    Kind regards
    Narayan

    user7202581 wrote:

    create table asgnd_agent_bak as (Select * from ASGND_AGENT a, SCN s
    where
    a.CNTCT_KEY = s.CNTCT_KEY and a.SCN_NUM=s.SCN_NUM
    and a.ACTVTY_DT = to_date('03/17/2013','mm/dd/yyyy')
    and s.SCN_OPEN_DT = to_date('03/15/2013','mm/dd/yyyy')
    and a.SRC_SYS_DESC = 'FACET');
    create table asgnd_agent_bak as (Select * from ASGND_AGENT a, SCN s
    *
    ERROR at line 1:
    ORA-00957: duplicate column name
    

    This is because your definition includes duplicate column names: I can see them.
    Your selection includes a.CNTCT_KEY, s.CNTCT_KEY, a.SCN_NUM and s.SCN_NUM.
    You need to show the columns you want, specicfying one only one of each pair.

    Concerning
    Jonathan Lewis

  • How to better describe a Create Table & PK

    Hello

    Can you please advise me on the best method to describe a PK?

    * {color: #0000ff} 1 {color} method *.
    CREATE product TABLE
    (
    ProductID integer NOT NULL,
    ProductName varchar2 (100 BYTE) NOT NULL,
    CONSTRAINT PK_Product PRIMARY KEY (ProductID)
    );

    * {color: #0000ff} 2 {color} method *.
    CREATE product TABLE
    (
    ProductID integer NOT NULL,
    ProductName varchar2 (100 BYTE) NOT NULL
    )
    NOPARALLEL NOMONITORING NOCACHE LOGGING;

    CREATE a UNIQUE INDEX PK_Product ON product (ProductID)
    NOPARALLEL REGISTRATION;

    ALTER TABLE product ADD CONSTRAINT PK_Product PRIMARY KEY (ProductID);

    * {color: #0000ff} 3 {color} method *.
    CREATE product TABLE
    (
    ProductID integer NOT NULL,
    ProductName varchar2 (100 BYTE) NOT NULL
    )
    NOPARALLEL NOMONITORING NOCACHE LOGGING;

    ALTER TABLE product ADD CONSTRAINT PK_Product PRIMARY KEY (ProductID);

    {color: #ff0000} * Q1. * {color} Method3 is similar to Method2, but ignores the CREATE UNIQUE INDEX... y at - it hurt?

    * {color: #ff0000} Q2. {color} * is it recommended to create constraints (PK, FK, and CHECK) in the CREATE TABLE as in Method1?

    * {color: #ff0000} Q3. {color} * what tags to use to quote the code exactly as displayed in the editor? I tried to use the & #91; code & #93; Tag, but everything is reformatted into a single line that is pretty ugly.

    Thank you very much in advance for any help.

    Method 2 allows you to specify the storage - Tablespace and storage Clauses.
    Method 3 allows yout specify the same when you use the HELP INDEXING clause.

    Method 1 implicitly creates the Index in the tablespace and Table.

    I do not have the recommendation to separate indexes of the Tables "of performance. If the Index is located in the Tablespace and Table, backup and recovery, and transport are simplifiied.

    However if you must specify a different tablespace (remember that recovery would be a problem as you would recover two tablespaces before the table can be used), and the different storage settings (for example if still using the DMT distribution and manual), you could opt for the method 2 or 3.
    Oracle provides the syntax depending on the availability of the earlier version (Oracle7 for definitions of constraints), but it is up to you, how to use it.

    Published by: Hemant K grapple Sep 29, 2008 17:16

  • I create a form based on two tables that have sequences also. When I create insert only row is inserted in the fields in table first and second fields of the table are empty. Why?

    Mr President.

    I create a form based on two tables that have sequences also. When I create insert only row is inserted in the fields in table first and second fields of the table are empty. Why?

    formdoubletables.png

    the page source is

    <?xml version='1.0' encoding='UTF-8'?>
    <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
                    xmlns:f="http://java.sun.com/jsf/core">
      <af:panelFormLayout id="pfl1">
        <af:group id="Group">
          <af:inputText value="#{bindings.VoucherId.inputValue}" label="#{bindings.VoucherId.hints.label}"
                        required="#{bindings.VoucherId.hints.mandatory}" columns="#{bindings.VoucherId.hints.displayWidth}"
                        maximumLength="#{bindings.VoucherId.hints.precision}"
                        shortDesc="#{bindings.VoucherId.hints.tooltip}" id="it1">
            <f:validator binding="#{bindings.VoucherId.validator}"/>
            <af:convertNumber groupingUsed="false" pattern="#{bindings.VoucherId.format}"/>
          </af:inputText>
          <af:inputDate value="#{bindings.VoucherDate.inputValue}" label="#{bindings.VoucherDate.hints.label}"
                        required="#{bindings.VoucherDate.hints.mandatory}"
                        columns="#{bindings.VoucherDate.hints.displayWidth}"
                        shortDesc="#{bindings.VoucherDate.hints.tooltip}" id="id1">
            <f:validator binding="#{bindings.VoucherDate.validator}"/>
            <af:convertDateTime pattern="#{bindings.VoucherDate.format}"/>
          </af:inputDate>
          <af:inputText value="#{bindings.Credit.inputValue}" label="#{bindings.Credit.hints.label}"
                        required="#{bindings.Credit.hints.mandatory}" columns="#{bindings.Credit.hints.displayWidth}"
                        maximumLength="#{bindings.Credit.hints.precision}" shortDesc="#{bindings.Credit.hints.tooltip}"
                        id="it2">
            <f:validator binding="#{bindings.Credit.validator}"/>
          </af:inputText>
        </af:group>
        <af:group id="g1">
          <af:inputText value="#{bindings.Lineitem.inputValue}" label="#{bindings.Lineitem.hints.label}"
                        required="#{bindings.Lineitem.hints.mandatory}" columns="#{bindings.Lineitem.hints.displayWidth}"
                        maximumLength="#{bindings.Lineitem.hints.precision}" shortDesc="#{bindings.Lineitem.hints.tooltip}"
                        id="it3">
            <f:validator binding="#{bindings.Lineitem.validator}"/>
            <af:convertNumber groupingUsed="false" pattern="#{bindings.Lineitem.format}"/>
          </af:inputText>
          <af:inputText value="#{bindings.VoucherId1.inputValue}" label="#{bindings.VoucherId1.hints.label}"
                        required="#{bindings.VoucherId1.hints.mandatory}"
                        columns="#{bindings.VoucherId1.hints.displayWidth}"
                        maximumLength="#{bindings.VoucherId1.hints.precision}"
                        shortDesc="#{bindings.VoucherId1.hints.tooltip}" id="it4">
            <f:validator binding="#{bindings.VoucherId1.validator}"/>
            <af:convertNumber groupingUsed="false" pattern="#{bindings.VoucherId1.format}"/>
          </af:inputText>
          <af:inputText value="#{bindings.Debit.inputValue}" label="#{bindings.Debit.hints.label}"
                        required="#{bindings.Debit.hints.mandatory}" columns="#{bindings.Debit.hints.displayWidth}"
                        maximumLength="#{bindings.Debit.hints.precision}" shortDesc="#{bindings.Debit.hints.tooltip}"
                        id="it5">
            <f:validator binding="#{bindings.Debit.validator}"/>
          </af:inputText>
          <af:inputText value="#{bindings.Credit1.inputValue}" label="#{bindings.Credit1.hints.label}"
                        required="#{bindings.Credit1.hints.mandatory}" columns="#{bindings.Credit1.hints.displayWidth}"
                        maximumLength="#{bindings.Credit1.hints.precision}" shortDesc="#{bindings.Credit1.hints.tooltip}"
                        id="it6">
            <f:validator binding="#{bindings.Credit1.validator}"/>
          </af:inputText>
          <af:inputText value="#{bindings.Particulars.inputValue}" label="#{bindings.Particulars.hints.label}"
                        required="#{bindings.Particulars.hints.mandatory}"
                        columns="#{bindings.Particulars.hints.displayWidth}"
                        maximumLength="#{bindings.Particulars.hints.precision}"
                        shortDesc="#{bindings.Particulars.hints.tooltip}" id="it7">
            <f:validator binding="#{bindings.Particulars.validator}"/>
          </af:inputText>
          <af:inputText value="#{bindings.Amount.inputValue}" label="#{bindings.Amount.hints.label}"
                        required="#{bindings.Amount.hints.mandatory}" columns="#{bindings.Amount.hints.displayWidth}"
                        maximumLength="#{bindings.Amount.hints.precision}" shortDesc="#{bindings.Amount.hints.tooltip}"
                        id="it8">
            <f:validator binding="#{bindings.Amount.validator}"/>
            <af:convertNumber groupingUsed="false" pattern="#{bindings.Amount.format}"/>
          </af:inputText>
        </af:group>
        <f:facet name="footer">
          <af:button text="Submit" id="b1"/>
          <af:button actionListener="#{bindings.CreateInsert.execute}" text="CreateInsert"
                     disabled="#{!bindings.CreateInsert.enabled}" id="b2"/>     
          <af:button actionListener="#{bindings.Commit.execute}" text="Commit" disabled="#{!bindings.Commit.enabled}"
                     id="b3"/>
          <af:button actionListener="#{bindings.Rollback.execute}" text="Rollback" disabled="#{!bindings.Rollback.enabled}"
                     immediate="true" id="b4">
            <af:resetActionListener/>
          </af:button>
        </f:facet>
      </af:panelFormLayout>
    </ui:composition>
    
    
    
    

    Concerning

    Go to your VO Wizard, select the tab of the entity and to check if both the EO is editable or not.

    See you soon

    AJ

  • Group by and count on the same table

    Hello

    DB version: 11.2.0.3

    Tried to SQL:

    create table log1 (identification number, status varchar2 (15) date of insert1);

    insert into log1 values (1, 'SUCCESS', sysdate-1);

    insert into log1 values (2, 'SUCCESS', sysdate-2);

    insert into log1 values (3, 'FAIL', sysdate-1);

    insert into log1 values (4, 'FAIL', sysdate-2);

    insert into log1 values (5, 'FAIL', sysdate-1);

    insert into log1 values (6, 'ERROR', sysdate-1);

    insert into log1 values (7, 'ERROR', sysdate-1);

    insert into log1 values (8, 'ERROR', sysdate-1);

    insert into log1 values (9, 'ERROR', sysdate-1);

    WITH AS TBL1

    (SELECT THE STATE OF 'SUCCESS' OF THE DUAL UNION ALL

    SELECT "FAIL" STATUS OF THE DUAL UNION ALL

    SELECT 'PENDING' STATUS OF DOUBLE)

    SELECT NVL (TBL1. STATUS OF STATE, 'TOTAL'), COUNT (LOG1.ID)

    FROM TBL1 JOIN LOG1 FULL EXTERNAL

    ON LOG1. STATUS = TBL1. STATUS

    GROUP BY ROLLUP (TBL1. STATUS)

    STATUSCOUNT (LOG1.ID)
    IN CASE OF FAILURE3
    SUCCESS2
    PENDING0
    TOTAL (*)4
    TOTAL9

    t need only State of SUCCESS, FAILURE, WAITING. and NUMBER of global ID omit the rest of type status as ERROR, etc. EXECUTION in the result set.

    I don't need the TOTAL (*) of the above result set. Which is total (Error).

    Please tell us how the query above can be changed to produce the result to wait.

    Thank you

    Hello

    So, you want to see all the tbl1 lines, if they have a match in log1, and for the grand total of lines, you must count the log1 lines if they have a match with tbl1.  This looks like a job for a FULL OUTER JOIN:

    SELECT t.status

    EARL of (l.status) AS cnt

    OF log1 l

    FULL OUTER JOIN tbl1 t WE t.status = l.status

    GROUP OF ROLLUP (t.status)

    HAVING t.status IS NOT NULL

    OR of a GROUP (t.status) = 1

    ;

  • Creating table and use - part 1

    be no difficulty with arrays in C, etc. but creating tables of LabVIEW poisoned me. Unfortunately, the heart I sure table labs start out with a table already in place is not much help either. For example, in the attachment, I have a simple loop generating a series of figures that I want to put in a picture. I place a table on the block diagram and its type sucks and I can't find a good way to change it. The textbook says to drag an object in the table on the front panel. So, how is - a hang out an integer in an array?

    Thank you

    JVH

    jvh75021 wrote:
    Thanks for the post. Where did you get the constant that you drag in the table?

    I'll try to help in this form:

    Darren wrote:

    If you know the name of the object you want, you don't have to look at all the pallets.

    Amazing that NEITHER use YouTube for video hosting, because it is blocked by the firewall of our company.

    Andrey.

  • CREATE TABLE and INSERT

    Hello

    I am a fairly new user for Oracle and have found this place to be very useful as I'm learning! One of the guidelines is to provide sample CREATE TABLE and INSERT data. I read the FAQ and in other forums to see if I could better understand this process, but I'm still struggeling reflected. Please can someone explain exactly what I do for these data, I want to be sure that I provided as useful information a lot in my posts to get help as soon as possible. I appreciate everything / all the answers!

    Hello

    Daniel Strong wrote:

    So, something like this:

    INSERT INTO skills (mu_id, external_id, skill_nm, skill_level) VALUES(220,AB,FAST,1);

    INSERT INTO skills (mu_id, external_id, skill_nm, skill_level) VALUES(7,BB,SLOW,7);

    INSERT INTO skills (mu_id, external_id, skill_nm, skill_level) VALUES(221,BC,FAST,1);

    INSERT INTO skills (mu_id, external_id, skill_nm, skill_level) VALUES(8,BD,SLOW,2);

    INSERT INTO skills (user_id, skill_nm) VALUES (AB, SLOW);

    INSERT INTO skills (user_id, skill_nm) VALUES (BB, SLOW);

    INSERT INTO skills (user_id, skill_nm) VALUES (BC, DOWN);

    INSERT INTO skills (user_id, skill_nm) VALUES (BD, SLOW);

    DESIRED RESULTS:
    MU_ID EXTERNAL_ID SKILL_NAME SKILL_LEVEL
    220 AB FAST 1
    221 AV FAST 1

    When you get a response, you want it works or is it OK if the answer causes errors?
    Obviously, you want people to post answers that work.  Make sure that the code of that validation works, too.  Test (and, if necessary, correct) your INSERT statements in your own development before posting on this forum system.

    The literal string values must be in single quotes.  I think you meant:

    INSERT INTO skills (external_id, skill_nm, mu_id, skill_level) VALUES (220, "AB", "QUICK", 1);

    Without the single quotes, AB and FAST are considered as column names or function.

  • Nested table and tables nested inside (CREATE TABLE)

    Hi all

    I have a problem of creation of a table with some types defined by the user at several levels (and therefore the nested tables).

    All first of all objects:
    type top_object is object (
        text_top varchar2(100),
        table_a a_object_tbl,
        table_b b_object_tbl
    );
    
    type a_object_tbl is table of a_object;
    type a_object is object (
      text_a varchar2(100)
    );
    
    type b_object_tbl is table of b_object;
    type b_object is object (
      text_b varchar2(100),
      table_c c_object_tbl,
      table_d d_object_tbl
    );
    
    type c_object_tbl is table of c_object;
    type c_object is object (
      text_c varchar2(100)
    );
    
    type d_object_tbl is table of d_object;
    type d_object is object (
      text_d varchar2(100)
    );
    Shortly: the SUPERIOR object contains tables A and B. B includes tables C and D.


    Well, now I want to create a table that contains the TOP level object.
    My attempt:
    create table multilevel_table (
      some_value varchar2(100),
      data top_object
    )
    NESTED TABLE top_object.table_a STORE AS data1,
    NESTED TABLE top_object.table_b STORE AS data2
    (NESTED TABLE table_c STORE AS data3,
    NESTED TABLE table_c STORE AS data4);
    Of course, this does not (otherwise I would not have asked you ;)). If I jump the 'second level', so just deleting table_b top_object and, therefore, the "inner nested table' it works.
    But on this scenario more complex I don't know the right way or the syntax.

    I would be grateful if I get any help or suggestion on your part!

    + 1 for recommendation of Hoek of simply not using TABLEs IMBRIQUEES for persistent structures.

    But:

    create table multilevel_table (
      some_value varchar2(100),
      data top_object
    )
    NESTED TABLE data.table_a STORE AS data1,
    NESTED TABLE data.table_b STORE AS data2
    (NESTED TABLE table_c STORE AS data3,
     NESTED TABLE table_d STORE AS data4) ;
    
  • Creating table in the schema has with the user B and granting permissions to the user C

    Hello, I have a problem fun - we have a large table which requires a batch to make millions of updates, and he needs to finish more quickly. It takes several hours as an update, but a select create table did the same thing in about a minute. Yay! Then we just delete the old table and rename the new table to the former, rebuild all the index and grant select/insert/update/delete permissions to another user who needs access... and there is the problem, Oracle said insufficient privs.

    We have A figure, which is the owner of the table, userid B who done all the stuff of application batch and userid C which performs inserts for a process of middleware. None of them are actual users, of course. We want that user B to do the ETG, rename, rebuild and re-grant of the authorisation of the index. But user B apparently cannot grant permissions on objects in the schema A to user C, even if B has created the table and has the role DBA (not ideal, I know)!

    What's really crazy is that there is no sense unique user b can grant permissions to user C, which is to:

    grant select any table USER c;
    grant insert any table USER c;
    grant update any table USER c;
    Grant delete any table USER c;

    It seems really perverse can create tables in diagram A and even grant C privs "whole table" that user B, but may not grant privs specifically on this object in the schema A, even with DBA privs. I must be missing something... right?

    Yes. By default, the stored procedures are stored procedures from DEFINER rights. If A is the owner of a stored procedure, this stored procedure can do whatever A enjoys the privileges to directly. If A grants B privileges RUN this stored procedure, when B calls the stored procedure, the procedure runs with the privileges.

    I agree point stew, however, re-creating objects in Oracle is generally a bad idea and a TRUNCATE with one insert direct-path, possibly combined with the deactivation and the rebuilding of the index would be more appropriate than a DEC. If you're going to stick with this Assignment, however, that really do in a stored procedure owned by A while B has no need to CREATE ANY TABLE.

    Justin

  • CREATE TABLE to another OWNER/SCHEMA and in a different TABLESPACE?

    I am connected to a user of the SYSTEM. Now, I want to create a table of aaa. The owner of this table should not be SYSTEM but user KARL. and STORAGE space should not be SYSTEM but the tdtc TABLESPACE (existing).

    As far as I know I can do this by running the following command:

    CREATE TABLE KARL.aaa (an INTEGER,...) Tttt TABLESPACE;

    Regarding the TABLESPACE parameter, I'm not sure. Is it possible to return a user Karl TABLE in a TABLESPACE that is not assigned to him?

    In addition, I have another problem.
    I have a script with hundreds of CREATE TABLE, ALTER TABLE + CREATE INDEX DDL statements.
    Each of them are not prefixed with schema/owner and a TABLESPACE clause.

    I can put a single statement at the top of the script somehow that such Oracle
    to use
    -Karl OWNER as a schema/owner for all DDL stements
    -Thomas TABLESPACE as TABLESPACE for all DOF stements
    ?

    In MYsql, there is a statement «use < database >» Is soemthing similar to Oracle?

    Thank you
    Peter

    Yes... you can do. For example, a user who has a secret password that you do not want to give... as a schema of the application. User B needs to make paintings/objects in A schema and you want to follow this as user B. First configure Oracles Fine grain auditing and then grant "connect via" user A to user B as follows:
    -----

    SQL> create user b identified by abc123
      2    quota unlimited on users;
    
    User created.
    SQL> grant create session to b;
    
    SQL> create user a identified by abc123
      2    quota unlimited on users;
    
    User created.
    
    SQL> grant create table
      2      , create session
      3     to a;
    
    Grant succeeded.
    
    SQL> alter user a grant connect through b;
    
    User altered.
    
    SQL> connect b[a]/abc123@a486
    Connected.
    
    SQL> show user
    USER is "A"
    SQL> create table a.my_proxy_table
      2  ( c1 number
      3  , c2 varchar2(50)
      4  , c3 date
      5  );
    
    Table created.
    

    -----
    See I have connected using the syntax "username [proxyuser]." Also note that user B is by proxy user has, as evidenced by my order 'show user '. The connection through can be granted/revoked as needed without disclosing A goes to B. In addition, your audit tables or xml logs will follow the fact that user B created the table a.my_proxy_table.

    Hope this helps,
    John

  • Creating tables with the same Structure and with the remote control FOR the parts database

    Hello

    I have a remote DB connection and a local DB connection in my system
    I want to create the same Table and data from my DB remote to Local Connection DB connection.

    Please tell me how to do this?

    CREATE TABLE LOCAL_TABLE AS SELECT * FROM REMOTE_TABLE@TNS_ALIAS;

  • CFScript to create tables (using MySQL) and configure it to use InnoDB

    I use a cfscript to create my database and the tables using MySQL, and I was able to DO this with success, accept that I'm having a problem. I want to put my tables use InnoDB instead of MyISAM. How to do this?

    That's what I did:

    < cfquery = 'test' datasource name = 'mydatasource' >
    CREATE TABLE Test
    (
    Id int (11) NOT NULL auto_increment,
    Name varchar (20) default NULL,
    Tinyint (4) active default NULL,
    PRIMARY KEY (Id)
    ); ENGINE = InnoDB DEFAULT CHARSET = latin;
    < / cfquery >

    But when I get an error when I run this script. That's what I get:

    -You have an error in your SQL syntax; "check the manual for your version of the MySQL server for the right syntax to use near '; ENGINE = InnoDB DEFAULT CHARSET = latin1'.

    I look and it's the right syntax. Any ideas what I am doing wrong?

    Thanks for any help

    Alfie

    Nevermind, I figured it. I misspelled it.

    ENGINE type = InnoDB... must be before the semicolon.

    :)

  • Is there a way to get the list of hosts and its groups of belonging to the vCenter folder level in 5.5 web vsphere client plugin development?

    Hello

    I need to get the list of all hosts and its groups of belonging to the vcenter folder level.

    1. I created a view giving the extension point: vsphere.core.folder.monitorViews.

    2. After this step, I wrote the constraint as in my class of mediator,

    var ListConstraint:Constraint =

    QuerySpecUtil.createConstraintForRelationship ( _contextObject, 'childEntity');

    I was expecting a list of all child entities such as hosts, dc, cluster... But I have only the immediate child object which is only the Datacenter as my result.

    Is it possible to get all hosts and vCenter folder level Clusters because I need the entire list to vCenter (highest level).

    Other info:

    Object file has only two properties:

    1 childEntity - list of entities

    2 childType in-kind folder ('Virtual Machine', 'Data center'...)

    Is it possible to write a constraint specifying which list of childEntities I need using childType in.

    Example: Make Me childEntities that has a 'Host' and 'Cluster' childType but childType in doesn't have these two types.

    In addition, at this level, I could see the 'Associated objects' tab which has all the information I need, such as Clusters and Cluster tab hosts and host tab respectively.

    So, I think its possible to get this list to vCenter folder level.

    I have attached a screenshot representing the need. Kindly ignore the Conventions of naming in there since I edited the example comes with the sdk program.


    Query:

    1. How can I get the host and Cluster (table of relationship) list to vCenter folder level or even at the level of the vise.global.view?

    2. once I get this list, is it possible for me to manipulate that list and send the new list to IU?

    3. is there another way to do the same thing without the help of model classes and mediator?


    Pointers to this will be very useful.

    It is not possible to obtain all hosts a folder specific vCenter from a single query Data Manager.  You need to get the list of centers of data first and then get a list of data center hosts.

    It is best to make these repeated requests to the java level and return only the list that you want to the user interface.

    You can get all the objects in the host of the system with a simple query using a constraint with targetType = 'HostSystem', but you will need to eliminate those from other vCenter servers.  See how this chassis example queries all hosts the Java later in the getHosts() method: samples/chassis-app/chassisRackVSphere-service/src/main/java/com/vmware/samples/chassisRackVSphere/ChassisRackVSphereDataAdapter.java

    Another option is to use the vSphere Web Services SDK to browse vCenter. See the vSphere management forum for help on these APIs.  See this plugin of the sample using this SDK

    samples/vsphereviews/vsphere-wssdk-provider/src/main/java/com/vmware/samples/wssdkprovider/VmDataProviderImpl.java

  • SQL authentication provider - create table script

    Hi all!
    I would use the SQL provider for my Web application authentication. I can't find the script to create tables of users/roles used by the provider.
    Can you suggest me a link where I can download?
    Thank you
    Frank

    Hi Frank,.

    Configure the SQL authenticator:

    Start Oracle XE DB and open propmt SQL to run commands below:

    CREATE TABLE USERS)
    U_NAME VARCHAR (200) NOT NULL,
    U_PASSWORD VARCHAR (50) NOT NULL,
    U_DESCRIPTION VARCHAR (1000))
    ;
    ALTER TABLE USERS
    ADD CONSTRAINT PK_USERS
    PRIMARY KEY (U_NAME)
    ;
    CREATE TABLE GROUPS)
    G_NAME VARCHAR (200) NOT NULL,
    G_DESCRIPTION VARCHAR (1000) NULL)
    ;
    ALTER TABLE GROUPS
    ADD CONSTRAINT PK_GROUPS
    PRIMARY KEY (G_NAME)
    ;
    CREATE TABLE GROUPMEMBERS)
    G_NAME VARCHAR (200) NOT NULL,
    G_MEMBER VARCHAR (200) NOT NULL)
    ;
    ALTER TABLE GROUPMEMBERS
    ADD CONSTRAINT PK_GROUPMEMS
    (PRIMARY KEY)
    G_NAME,
    G_MEMBER
    )
    ;
    ALTER TABLE GROUPMEMBERS
    ADD CONSTRAINT FK1_GROUPMEMBERS
    FOREIGN KEY (G_NAME)
    REFERENCE (G_NAME) GROUPS
    ON DELETE CASCADE

    Generally, customers can add users directly in DB with help commands below:

    insert into USERS (U_NAME, U_PASSWORD, U_DESCRIPTION) values ('system', 'weblogic', 'user admin');
    insert into GROUPS (G_NAME, G_DESCRIPTION) values ('Administrators', 'Administrators');
    insert into values('Administrators','system') GROUPMEMBERS (G_NAME, G_MEMBER);

    But in this case is not encrypted password then, either you can add users via the console or WLST script to be stored in encrypted form.

    We had performed above commands just to check that the user that is stored directly in the DB gets properly authenticated or not configured SQL authenticator as below

    Now start weblogic admin server and console access to create the data source by the navigation Services-> JDBC-> data sources

    Create the data source named SqlDS

    JNDI: SqlDS

    Type of DB: Oracle

    : DB driver Oracle Thin XA

    Name of the data base: XE

    DB host:

    Port: 1521

    DB user:

    DB password:

    Even the rest of the configuration and click test Configuration. If its success click on next and it targets to "AdminServer.

    Click Finish and activate chnages

    Now navigate to the areas of security-> myrealm-> suppliers

    Click new and supply the names of SqlAuthenticator and select Type of SQLAuthenticator

    Now click on newly created provider and make the indicator of control as "sufficient".

    Go to the specific page of provider:

    1. check on cleartext passwords enabled.

    2. provide a data name source: SqlDS

    Keep the rest of the parameters it is and save this configuration. It will ask you to restart the management server.

    Now, again navigate areas of security-myrealm-> users & groups >

    User created directly in the DB control is listed in the table with SqlAuthenticator, once its list, go ahead and add users as below

    B. Cretae users using the administration console:

    Sign in to the administration console

    Access areas of security-myrealm-> users & groups >

    Click the users tab and try to create the new user

    User name:

    Select authentication provider: SqlAuthenticator

    User password:

    Once the table DB check creating user, this user added with password encypted musted

    C. create multiple users using WLST script:

    File Navigave of $DOMAIN_HOME/bin and run the file setDomainEnv as below:

    UNIX:. ./setDomainEnv.sh (don't forget to put two points before /)

    Windows: setDomainEnv.cmd

    Now, change script depending on your environment below and run as suggested in step 3:

    Connect('weblogic','weblogic123','t3://localhost:7001')
    Edit()
    startEdit(-1,-1,'false')
    serverConfig()
    CD('/SecurityConfiguration/base_domain/Realms/MYREALM/AuthenticationProviders')
    ls()
    CD ('SqlAuthenticator')
    cmo.createUser ('vaishali', 'weblogic123', 'SQLuser')

    cmo.createUser ('pavashe', 'weblogic123', 'SQLuser')
    Edit()
    stopEdit('y')

    NOTE: Change username, password, and ADMIN_URL in 1st line.

    Replace the domain name "base_domain" by your domain online no.: 5

    Authenticator name change SQL online no: 6 by your authenticator name

    Next lines create users. You need to add however to users, you need to create programmatically.

    Syntax: cmo.createUser ('user_name', 'user_password', 'user_description')

    Now, to save these commands in a file with the extension .py and run as below:

    # java weblogic. WLST create_user.py

    If your script does not have to try running each command separately. For this session WLST beginning as below:

    # java weblogic. WLST

    Now run above commands in the script. You will be able to debug if something went wrong during execution of script.

    Kind regards
    Kal

Maybe you are looking for