Create synonym everytime a new table/record is created

Hi
Is there a way of specifying within the peoplecode/Application designer to ensure that a synonym is created everytime a table/record object is created atleast for the Oracle database.
I am looking for a solution within the peoplecode/Application designer since currently we are hand-coding it from outside using shell scripts and sql*plus.
Thanks
Cyril
PS: sorry for the repeat post..the other was wrong

Since I don't see what was wrong there, I'll repeat my answer from the other :
"You should create a trigger on schema level (most probably on SYSADM).
In that trigger (BEFORE CREATE), create a job (to be execute immediately, without recurrence), that job will call a procedure with the object name in input parameter. The procedure will grant and create synonym with in dynamic sql for that object."
That said, why do you want to manage it in Peoplesoft, tables are hosted by Oracle, when something is changed in AppDesigner, you should rebuild this object, the rebuild will affect the Oracle object, then the trigger can be fired.
Nicolas.

Similar Messages

  • How to show the new table record after creating

    I have a table form. After creating a new record to the table, the page go back to the same page. I wanta know how to show the new record after click 'Create' button. Right now, all the items will be cleared.
    Thanks.

    The button submits the page so just create a branch that directs to a new page (which you'll have to create if you have not already done so) after submission which directs to a new page and uses the newly generate PK to display the row you've generated. You'll need to make the branch conditional on that press of the Create button.
    Phil

  • How can I create a new table from a filed cell?

    Every time that I fill a row of cells I want to creat a new table with the content of that cells.
    How can I do it?
    Donw here it´s the example.
    From the top table, I want to fill these rows, and everytime that it´s done, I want that a new table apears like the cells under.
    There is any Way to do it?
    In the Spanish version of Number I found in the references formulas, one formula called "DIRECTION" that describes to do this.
    But I found no way to do it.
    The above formula it´s this:
    =DIRECCION(row; collumn; type of direction; stile of direction; table name)
    Anyone can help me?
    I really need this solution.

    Otto,
    Based on the syntax you quoted for that function, the english equivalent is "Address". It doesn't create a Table, but rather it creates an Address that references a Cell, in the form of a String. The common, and only, use that I am aware of for Address is to use it as the parameter for INDIRECT. For example: INDIRECT(ADDRESS)) will produce a reference to a table cell, but it will not produce a table.
    Jerry

  • Creat new table from multiple tables in same DB?

    Trying to create a new table bringing in all the records from
    3 old tables. All three old tables have common foreign key fields.
    I'm not sure how the syntax would look like, but something
    like:
    <cfquery name="qCreateTable" datasource="somedb">
    CREATE TABLE newtable
    AS
    SELECT old_ID as new_ID,
    FROM oldtable1, oldtable2, oldtable3 etc.</cfquery
    Is this possible in one step, or would I need to create the
    new table with data from oldtable1, then update with data from 2, 3
    etc.? BTW I already tried that with no success (syntax errors).
    For now, this is in Access.
    Thanks for your help.
    rinorman

    Phil:
    <cfquery name="qCreateTable" datasource="somedb">
    CREATE TABLE vendor_new2
    AS
    SELECT
    vendor_ID as old_vendor_ID,
    company_name as vendor_company,
    DBA_name as vendor_dba,
    web_URL as vendor_url,
    AdminID as old_admin_ID,
    Comment as old_comment,
    BillingLocationID as old_billing_ID
    FROM vendor_old
    UNION
    SELECT
    UserID as old_user_ID,
    EmailAddress as vendor_email,
    Password as vendor_pw,
    LastName as contact_lname,
    FirstName as contact_fname,
    PhoneNum as contact_tele,
    PhoneExt as vendor_phonex,
    FaxNum as contact_fax
    FROM main_contact
    UNION
    SELECT
    PhysicalLocationID as old_location_ID,
    Street1 as vendor_address1,
    Street2 as vendor_address2,
    City as vendor_city,
    StateID as vendor_state,
    Zip as vendor_zip,
    Zip4 as vendor_zip4,
    Phone as vendor_tele,
    Fax as vendor_fax
    FROM PhysicalLocation
    </cfquery>
    Result: Syntax error in CREATE TABLE statement.

  • Creating new tables

    Hi Every one,
    I am new to SAP.Please some one can explain,if new table is to be  created,( as it is not in SAP tables), the what is the process of creating new table and how it is used for specific customer.
    I hope some one will help me.
    Thanks in advance.
    VM

    If a new table is to be created for Pricing, it is as under:
    Condition table (T.Code: V/04): If existing condition table meets the requirement, we need not create a new condition table. Considering the requirement for new condition table, the configuration will be done in spro as follows: IMG --> Sales & Distribution --> Basic Function --> Pricing Control --> Condition Table (select the required fields combination, which will store condition record). To save the Table click o the Generate button, which is round in shape on upper left hand side of the screen.
    If any 'Z; Table is required, it has to be developed by Abaper.
    Regards,
    Rajesh Banka

  • Creating a new table, to replace an old one

    Hi experts;
    I'm looking for an advice about what I'm going to do.
    This is the situation;
    I got a production table with more than 1,000,000,000 of records.
    the queries to this table are too slow, and I decided to create a new table, to replace this one.
    But my doubts are:
    How can I create a new table including the same structure as the old one, and with some data.
    I got this query:
    Create new_table as select * from old_table
    where trans_year = '2012';
    I know with this I got the structure, but what about indexes?
    My other doubt is, to replace the old one, just I drop it, and rename the new one?
    This table belong to an oracle 9i DB.
    Thanks for your comments.
    Al

    >
    How can I create a new table including the same structure as the old one, and with some data.
    I got this query:
    Create new_table as select * from old_table
    where trans_year = '2012';
    I know with this I got the structure, but what about indexes?
    My other doubt is, to replace the old one, just I drop it, and rename the new one?
    This table belong to an oracle 9i DB.
    >
    You could export the table metadata and then import it as a renamed table. That would keep the indexes, triggers, constraints.
    But for one table it may be easier to just recreate the indexes and other objects.
    For the query you may want to disable logging of the INSERT.
    Create table new_table NOLOGGING as select * from old_table where trans_year = '2012';
    -- set the table back to logging mode
    ALTER table new_table LOGGING;Then you can drop the old table (if you already have a backup of it) and rename the new one to the old name.
    The create will perform much better with NOLOGGING but because it is not logged you will not be able to recover the data from the log files.
    So you should take a backup afterward.

  • What index will be created by default when new table is created

    Hi Team,
    1.  When creating new table, what type of index wil be created in sql server ?
    2.  what is the table name if we create new table without primary key?
    Please help me on this
    Anand Rajagopal

    Hi Anand,
                    Your Question is quite wide in range and I am agree the other answers too. I would like to talk about your second question first because it will depend upon the first one.
                    When we creating a fresh table without specified any primary key it is called "Heap" table. A Heap table is not containing clustered index but it can non-clustered index (but not automatically we have
    to create explicitly). It means the data is not in order and we have to apply ORDER BY clause to short the data. Heap structure is not good for big tables which requires filtration frequently. 
                     When we create a table without specifying primary key, then none of indexes created on table. but if we specify primary key then it will create a clustered index with it. It means it is now physically
    shorted. But It doesn't guarantees that if you fire SELECT statement then It will fetch record in same order (It seems but it is not) because the RDBMS is based on "SET THEORY" and it doesn't guarantee the shorting order or records.
                     Also have a look on "Create Table", "Indexes" & "Table Scan", "Table Seek" for better understanding.
    Shivendra

  • Creating an intersection table record

    I want to add an intersection table record and the related FK record at the same time. I have three tables with cardinality shown below:
    Restaurants 1:N RestaurantRatings 0..1:1 Ratings
    Thus, a restaurant can have zero or more customer ratings (i.e. restaurant reviews).
    We use an intersection table (i.e. "RestaurantRatings") because table "Ratings" is also used for rating food items, which involves another intersection table (not mentioned above) to keep track of the food
    ratings.
    I followed the instruction in the ADF Developers Guide 11g Release 1 (11.1.1) for the following sections:
    38.8 Controlling Entity Posting Order to Avoid Constraint Violations
    39.9 Creating a View Object with Multiple Updatable Entities
    Per section 38.8, I created the following override of EO method RestaurantRatingsImpl::postChanges for intersection table RestaurantRatings.
    public void postChanges(TransactionEvent e) {
    //If current entity is new or modified
    if (getPostState() == STATUS_NEW ||
    getPostState() == STATUS_MODIFIED)
    //Get the associated restaurant for this intersection-table row
    EntityImpl restaurants = this.getRestaurants();
    //If there is an associated restaurant
    if (restaurants != null)
    //And if it's post-status is NEW
    if (restaurants.getPostState() == STATUS_NEW)
    * Post the restaurant first, before posting this
    * entity by calling super below
    restaurants.postChanges(e);
    EntityImpl rating = this.getRatings();
    //If there is an associated rating
    if (rating != null)
    //And if it's post-status is NEW
    if (rating.getPostState() == STATUS_NEW)
    * Post the rating first, before posting this
    * entity by calling super below
    rating.postChanges(e);
    super.postChanges(e);
    Then I use RestaurantRatingsViewLink, in the "Oracle Business Component Browser", to create a new Ratings record that is linked to an existing Restaurants record. My debugging session reveals that line
    "this.getRatings();" returns null when I create a new Ratings record.
    Any ideas, or better examples for how to properly create an intersection table record or update a view object with multiple entities objects.
    Thanks,
    Travis

    Setting Composition on RestaurantRatingsRatingFk1Assoc didn't fix the problem. This association defines "Ratings.id" as the source and "RestaurantRatings.RatingId" as the destination.
    Using the Oracle Business Component Browser, I attempted to insert a new row in the ResataurantRatings intersection table. I get the following error:
    (oracle.jbo.AttrValException) JBO-27014: Attribute RatingId in AppModule.RestaurantRaitingsView1 is required.
    I suspect we can't use composition because we have two associations from intersection table "RestaurantRatings". That is, table "RestaurantRatings" has two foreign keys. One to table "Restaurants". The other to table "Ratings".
    Our RestaurantRatingsView has "Restaurant" as the master EO and "Ratings" as the detail EO. They are both set as "Updatable" in the view's "Entity Objects" tab.
    Is composition really usable in this situation? Is there a similar example?
    Travis

  • How can I create a new table in a MySQL database in MVC 5

    I have an MVC 5 app, which uses MySQL hosted in Azure as a data source. The point is that inside the database, I want to create a new table called "request". I have already activated migrations for my database in code. I also have the following
    code in my app.
    Request.cs: (inside Models folder)
    public class Request
    public int RequestID { get; set; }
    [Required]
    [Display(Name = "Request type")]
    public string RequestType { get; set; }
    Test.cshtml:
    @model Workfly.Models.Request
    ViewBag.Title = "Test";
    <h2>@ViewBag.Title.</h2>
    <h3>@ViewBag.Message</h3>
    @using (Html.BeginForm("SaveAndShare", "Home", FormMethod.Post, new { enctype = "multipart/form-data" }))
    @Html.AntiForgeryToken()
    <h4>Create a new request.</h4>
    <hr />
    @Html.ValidationSummary("", new { @class = "text-danger" })
    <div class="form-group">
    @Html.LabelFor(m => m.RequestType, new { @class = "col-md-2 control-label" })
    <div class="col-md-10">
    @Html.TextBoxFor(m => m.RequestType, new { @class = "form-control", @id = "keywords-manual" })
    </div>
    </div>
    <div class="form-group">
    <div class="col-md-offset-2 col-md-10">
    <input type="submit" class="btn btn-default" value="Submit!" />
    </div>
    </div>
    @section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
    HomeController.cs:
    [HttpPost]
    public ActionResult SaveAndShare(Request request)
    if (ModelState.IsValid)
    var req = new Request { RequestType = request.RequestType };
    return RedirectToAction("Share");
    The point is that, I want the user to fill the form inside the Test view and click submit, and when the submit is clicked, I want a new entry in the new table to be created. But first of course I need to create the table. Should I create it using SQL query
    through MySQL workbench? If yes, then how can I connect the new table with my code? I guess I need some DB context but don't know how to do it. If someone can post some code example, I would be glad.
    UPDATE:
    I created a new class inside the Models folder and named it RequestContext.cs, and its contents can be found below:
    public class RequestContext : DbContext
    public DbSet<Request> Requests { get; set; }
    Then, I did "Add-Migration Request", and "Update-Database" commands, but still nothing. Please also note that I have a MySqlInitializer class, which looks something like this:
    public class MySqlInitializer : IDatabaseInitializer<ApplicationDbContext>
    public void InitializeDatabase(ApplicationDbContext context)
    if (!context.Database.Exists())
    // if database did not exist before - create it
    context.Database.Create();
    else
    // query to check if MigrationHistory table is present in the database
    var migrationHistoryTableExists = ((IObjectContextAdapter)context).ObjectContext.ExecuteStoreQuery<int>(
    string.Format(
    "SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = '{0}' AND table_name = '__MigrationHistory'",
    // if MigrationHistory table is not there (which is the case first time we run) - create it
    if (migrationHistoryTableExists.FirstOrDefault() == 0)
    context.Database.Delete();
    context.Database.Create();

    Hello Toni,
    Thanks for posting here.
    Please refer the below mentioned links:
    http://azure.microsoft.com/en-us/documentation/articles/web-sites-dotnet-deploy-aspnet-mvc-app-membership-oauth-sql-database/
    http://social.msdn.microsoft.com/Forums/en-US/3a3584c4-f45f-4b00-b676-8d2e0f476026/tutorial-problem-deploy-a-secure-aspnet-mvc-5-app-with-membership-oauth-and-sql-database-to-a?forum=windowsazurewebsitespreview
    I hope that helps.
    Best Regards,
    Sadiqh Ahmed

  • Error while creating new table

    Hi
    First I had deleted one custom table. Then I try to create the same table with different fields. Now I am gettinh the errors.
    1.    ZLV_COMP_TABLE: Inconsistency DD <-> DB (check table with analysis tool)
    2.   A table called ZLV_COMP_TABLE exists in the database
    3.   No active nametab exists for ZLV_COMP_TABLE
    4.   Termination due to inconsistencies
    5.  Table ZLV_COMP_TABLE (Statements could not be generated)
      6.  Error number in DD_DECIDE (9)
    Please help me ... how can I create a table with same name.
    thanks
    Subhankar

    Hello,
    goto SE14 -- Give the table name
    use Tables Radio button
    click on Edit
    check the Delete Data Radio button
    click on ACTIVATE AND ADJUST DATABASE.
    Now check the table in SE11.
    If it still exits you can change the same table or Delete it again & create a new table with Same Name.
    This might help your query.
    Anil.

  • How to create / populate new table in MaxDB?

    Dear All,
    I'm a newbies in using MaxDB and still learning on it.
    I've installed MaxDB Database Manager 7.6
    I need help from all the experts here on the following "dumb" questions from me.
    1) I can't create, modify or delete any table / data with Database Manager, am I right?
    2) Should I start creating / populating tables with sqlcli or dbmcli? I was informed that I should use sqlcli instead or dbmcli.
    3) What is the syntax for me to create new table, as well as add, modify and delete data within it?
    Please assist to provide some guidance or at least point me to the right direction interm of documentation available.
    THANK YOU VERY MUCH!!!
    Much appreciated,
    -Deric-

    > I've installed MaxDB Database Manager 7.6
    >
    > I need help from all the experts here on the following "dumb" questions from me.
    >
    > 1) I can't create, modify or delete any table / data with Database Manager, am I right?
    Nope - the Database Manager is not able to to "sql-stuff".
    You would want to use the Database Studio or the SQL Studio for that.
    But as you're starting to learn anyhow, just go for the more modern Database Studio.
    It combines the features of Database Manager and SQL Studio into one tool.
    > 2) Should I start creating / populating tables with sqlcli or dbmcli? I was informed that I should use sqlcli instead or dbmcli.
    Why would you want to learn SQL by working with command line tools?
    Really, go for the Database Studio instead.
    For simple SQL stuff via command line you may use sqlcli.
    > 3) What is the syntax for me to create new table, as well as add, modify and delete data within it?
    > Please assist to provide some guidance or at least point me to the right direction interm of documentation available.
    You definitively need
    a) read the tutorial in the [documentation|http://maxdb.sap.com/doc/7_7/d0/3e345709c044d4a954e3a8d0be0867/content.htm]
    and
    b) get a SQL learning book to really understand the concepts behind relational databases and the query language.
    Learning SQL is not about knowing how to type the commands.
    Most users learn the commands rather quickly.
    But fully understanding the set-approach of relational databases and how to create and use those databases correctly is often not learned.
    So make sure not to fall into this trap!
    regards,
    Lars

  • I don't have the option to create a new table in my database

    Hi, I have SQL 2014, for some reason, a few weeks ago I was able to create a new table for my databases, now, I don't have the option to do so, all I get when I right click on tables is "Tables..." instead of "New Table", when I select
    "Tables..." it allows me to write my codes but it doesn't save except in a text files witch doesn't want to open when I want to resume my work.
    Is there any option in SQL to activate the "New Table" by right clicking on Tables? I have all the rights and permissions available to my use as it's my computer and my own server. 
    To fix the issue I tried
    -Re-installing SQL
    -Changed for 4 different versions
    -Allowing more than necessary permissions 
    -Making it public to use (it's only to test it, anyway, I'm in the learning phase)
    Any kind of help or advice will be welcome and much appreciated.
    Thank you!

    I don't know the reason why you are experiencing this, so what I am describing below are just some steps that you can take to diagnose the problem if it is related to a permissions issue.
    1. If you are not already on the computer where SQL Server is installed, login on that box and launch SQL Server Management Studio and run it as Administrator.
    2. Connect to the Server and open up the object explorer and expand the Security node that is directly under the Sever tab.
    3. Under logins, find your login, right-click properties and see what kind of server level permissions you have, and which databases you are mapped to and what kind of permissions you have on those.
    It may just be that this is not related to permissions at all, but I can't think of what that would be. To test whether it is a SSMS GUI problem or not, open up a query window and select a database on which you think you have permissions to create tables.
    Then create a test table using T-SQL, for example:
    create table dbo.MyTestTable( col1 int);

  • Is it possible to create a new table in the master database with SSMS ?

    Hello ,
    I have problems with this thread :
    http://social.msdn.microsoft.com/Forums/en-US/sqlexpress/thread/5153c43b-7844-41c4-a414-d14730abe435/
    If no user database has been created , in SSMS , we can see only the 5 system databases ( master, msdb , tempdb... ).
    Logically , the user should connect automatically on the Master database ( if the user is the same as this used to install a new SQL Server instance, this user should be sysadmin that's to say he/she has all possible permissions and especially dbcreator ).
    Is it true that it is impossible to create a new table on the master database ?
    I have done many researches about this possibility , all I have found is the advice : don't touch to the master database. This database is used to store critical information about the instance and its user databases. Even in the last book of Kalen Delaney
    about SQL Server 2012 Internals , I have found nothing clear about the creation of tables in this database ( and what about the other system databases ? I am excluding tempdb ).
    If someone has an idea about this thread and my questions , I would be thankful for a reply on this thread or on the related thread in the SQL Server Express Forum ( with my poor written English , I am not sure to have poster in a correct and understandable
    way ).
    If you think that this thread is not in the good forum , a moderator of this forum can move this related thread ( I have not done the move as I am not sure which is the good forum Database Engine or Transact-SQL ... )
    Thanks beforehand and have a nice day.
    Mark Post as helpful if it provides any help.Otherwise,leave it as it is.

    >>Logically , the user should connect automatically on the Master database ( if the user is the same as this used
    to >>install a new SQL Server instance, this user should be sysadmin that's to say he/she has all possible permissions and >>especially dbcreator ).
    If you add the current user during the installation you can have it as system admin , or you can add him/her later on
    in SQL Server. BTW regarding dbcreator I have wrote some blog , need to read... :-)
    http://sqlblog.com/blogs/uri_dimant/archive/2010/09/02/be-careful-to-grant-dbcreator-server-role-to-the-user.aspx
    You can (if you have needed permissions) to create objects in master database, usually I create objects for instance maintenance (like rebuild indexes...) 
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • New field catalog VOLEH does not display while creating a new table

    Dear Gurus,
    I added new field as VOLEH in field catalog. However while I am creating a new table, new field (VOLEH) does not showed in field catalog...
    How can I fix this error?
    Kind Regards,

    HI
    Check once again in IMG>SD>Basic func>Pricing >Pricing control>define condition table>conditions : allowed fields> go to new entries then press F4
    check here newly created field is there or not
    (or) when creation of condition table check properly next page button in menu bar
    still if its not found
    Note 21040 - Allowed Fields not appearing for condition table
    or check this link
    http://www.sap-basis-abap.com/sd/how-to-add-new-fields-to-field-catalog.htm
    Regards,
    Krishna.

  • Create a new table style based on an existing table in a document

    Hi,
    In a document I'm working on, there is a specific table. It is made in the past by a colleague, and it has a very suitable format.
    Therefore I would like to use the layout of this table on all future tables in my document (or even in others).
    Is there an option to select my table, and create a new table style with it, so that I can use it over and over again? That would be very helpful.
    I'm working in MS Word, MS Office Professional Plus 2010, on a Windows 7 64-bit OS.
    Best regards, Sietske
    Ps.: I know
    a question like this was already asked, but the answer was quite dissatisfying (because it was not answering the question)
    Pps: Note that I'm now creating a new table style from scratch, so an answer to the above question is not that urgent, but it would still be nice to know for future use.

    you can  use format painter
    i hope that you already know about it.
    Nope, not the right answer. With Format Painter, you can copy the format of the table, but you can't create a new Table Style with it. I am looking for a solution as well.

Maybe you are looking for

  • Mobile Banking BOA...This is a Killer App!

    Man, I LOVE this one. *Mobile Banking*. My bank is Bank of America and I pay all bills through BOA Online Banking. What a great time saving feature. I also try and receive as MANY e-bills as I can. This is an email alert directly to you of a bill. So

  • MRKO Consignment by Sales

    We got a deal with a supplier where we get consignment raw material, and pay it after we sell the finished product. The problem its that the quantities for the sales will never be the same as the MIGO documents or the tranfsfer movements. (Since the

  • Help - Nokia N8 will not notify me when I have a m...

    Help please... My Nokia N8 does not notify me when I have a message or a missed call. The only way I know is that the indicator light will flash but it says nothing on my home screeen so I have to go into log or inbox to check what it is notifying me

  • Rebuild the index form brtools ended with error

    Dear all, I am getting error in db13 Update Stats  there error is BR0884I Statistics collected for table: SAPDEV.TCX00, rows old/new: 24117/24117 BR0986W Index SAPDEV.TCX00~0 is unbalanced - please rebuild the index I have try to rebuild for brtools

  • How to format XML file as in JDeveloper's style?

    I'm trying to output XML by using oracle.xml.parser.v2.XMLOutputStream. There are three possible output styles: COMPACT, DEFAULT, PRETTY. I tried all of them, but none of them can give me the exact fromatting style as in JDeveloper. What output style