Creating user using database link

Hi
I have 11g installed on one of the server
I have created the database link BUGAU to bugau.us.oracle.com
link works fine
select * from table@"Bugau" gives the expected result
I need run the below statement from my server using the dblink.but not sure how to use the dblink for this purpose.Please assit
CREATE USER ABC IDENTIFIED BY welcome DEFAULT TABLESPACE USERS_001 TEMPORARY TABLESPACE temp123;
GRANT DEFAULT TO abc;
ALTER USER abc PROFILE LEVEL_1;
Thanks
Archana

as mentioned in oracle documentation for db link purpose: you can use it for accessing schema objects in remote database..
http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_5005.htm
>
Use the CREATE DATABASE LINK statement to create a database link. A database link is a schema object in one database that enables you to access objects on another database. The other database need not be an Oracle Database system. However, to access non-Oracle systems you must use Oracle Heterogeneous Services.
After you have created a database link, you can use it in SQL statements to refer to tables and views on the other database by appending @dblink to the table or view name. You can query a table or view on the other database with the SELECT statement. You can also access remote tables and views using any INSERT, UPDATE, DELETE, or LOCK TABLE statement.
>
For creating users, you have to login to the remote database itself, You also need to login using the user who has the necessary credentials to create the user.
Regards,
Dipali.

Similar Messages

  • Creating trigger using database link

    I need to create the trigger from local server B using Dblink(whereas the dblink points to the remote server A)
    Action of the trigger:
    After every insertion of the record in the 'Table1' from the Remote DB Server A , the newly inserted record should parallely inserted into the 'Table 2' of the local server B
    Kindly help me out to do
    _ BY
    Rajan

    I tried to create the trigger but it throws like DDL operations are not allowed in the remote database.
    Following is the script, I have tried
    CREATE OR REPLACE TRIGGER ROUTE_TRIGGER AFTER INSERT ON ROUTEDECISION@DBLINK1
    FOR EACH ROW
    DECLARE
    BEGIN
    INSERT INTO routedecision_rptdb(a1,a2) values(:new.a1,:new2.a2);
    END;

  • Adding user to the oracle database using database link - is it possible?

    Hi, i wolud like to manage my databases using one client. I easilly operate on my distriubuted tables but i have problem with creating users in distribiuted database. Is it possible to create users in distributed database using database links? or it have to be done locally using some stored procedures or sth similar?

    The SQL syntax of the CREATE USER statement doesn't support DB links, the only way to do it would be with stored procedures. There might be an Oracle SP for that or for generic remote execution of SQL, but I'm not familiar with such.

  • How to Execute a Remote Procedure in Portal using Database Link

    Hi,
    I followed the instructions to create a Portal form for a remote procedure. But I am encountering the following error. Can someone advise what may be the cause?
    Failed to execute - Missing string(create_package_body) language(us) domain (wwv) sub_domain (wwv_builder) (WWV-04300)
    ORA-04020: deadlock detected while trying to lock object PUBLIC.PORTLET_SCHEMA (WWV-11230)
    Failed to parse as PORTAL - (WWV-08300)
    PURPOSE
    How to execute a remote procedure in Portal using Database Link.
    DESCRIPTION
    This procedure assumes that you have two databases, one of which is remote, and Portal is configured in the other.
    Remote Database A:
    ==================
    1) Create a procedure as follows: Create or Replace PROCEDURE SCOTT.ADD_TWO_VALUES ( v_one IN NUMBER, v_two IN NUMBER, v_result OUT NUMBER) as begin v_result :=v_one+v_two; end; 2) Grant execute privileges to PUBLIC on the procedure.
    Database B (where Portal is configured): ========================================
    1) Create a public database link and choose to connect as a specific user (say SYSTEM). By default, in an Oracle 8i database, the "global_names" parameter in initSID.ora (or init.ora) file is set to "true". This Global Naming parameter enforces that a dblink has the same name as the database it connects to. Therefore, if the remote global database (A) name is "ora8.acme.com" then the database link should also be named as "ora8.acme.com".
    2) Create a synonym for the procedure in Database A. Make sure you fully qualify the procedure name in the remote database (like SCOTT.ADD_TWO_VALUES).
    3) Create a dynamic page to execute the procedure. The ORACLE tags in the dynamic page will look similar to the following: <ORACLE> DECLARE v_total NUMBER; BEGIN ADD_TWO_VALUES(:v_one,:v_two, v_total); htp.p('The total is => '); htp.p('<input type="TEXT" VALUE='||v_total||'>'); htp.para; htp.anchor('http://<machine.domain:port#>/pls/portal30/SCOTT.DYN_ADD_TWO_VALUES.show_parms', 'Re-Execute Procedure'); END; </ORACLE>
    4) Portal does not have an option to create a form based on a synonym. Therefore, if you want to create a form instead of a dynamic page, create a wrapper procedure and then create a form based on this procedure. For example: Create or Replace PROCEDURE PORTAL30.ADD_TWO_VALUES_PR ( v_one IN NUMBER, v_two IN NUMBER, v_total OUT NUMBER) as begin add_two_values(v_one, v_two, v_total); end;
    5) Grant execute privileges to PUBLIC on the procedure.

    hello...
    any input will welcomed... Thanks..

  • Using Database link in applications

    Hi,
    i just configured and created a PUBLIC database link on my 10g oracle. I can use it successfully from sqlplus doing some simple select like:
    SQL> select * from "table"@dblink
    The query returns all the result as expected.
    Now I would like to use this public link in my applications but the problem is that the link seems to be only available in the SYS schema.
    Ho can I access from other schema?
    In other words, in need to do some select (and insert) from my APEX applications using the db link. If I try the said select, all I obtain is
    ORA-02019: connection description for remote database not found

    Is that the actual command or what you believe you issued? Can you pull the entry from dba_db_links to verify the problem is not something as simple as you left off the word 'public' in the command?
    In the old days when you used HS you also had to create an hs_tnsnames.ora, hs_listener, and an hs_initsql.ora file. Do you still create these with DG4ODBC? What about the file permissions, are there any requirements to set these in order to allow use?
    I found an internet article you can check you actions against and two threads here on OTN that may be of help.
    http://www.pythian.com/news/1554/how-to-access-mysql-from-oracle-with-odbc-and-sql/
    How to connect to Oracle from MySQL
    Oracle to connect MySQL
    HTH -- Mark D Powell --

  • How to create User and Database in different Table spaces

    How to create User and Database in different Table spaces using oracle 10g
    Regards
    daya

    I am sorry but your question does not seem to make much sense.
    Can you please rephrase your question?

  • How to use database link in from6i?

    I can use database link in sql plus,but i can't use it in forms6i,why? thanks

    Don't know why.
    What I always do is create a synonym on the local database which points (through the db link) to the object on the other database.
    Regards,
    Meine

  • How to create user using Form Builder

    How can use Oracle Developer2000 Form6 to create user in database (oracle 8i) from Trigger of Form6. I've try to use statement "create user ..... identified by ...." in PL/SQL editor of When-Button-Pressed trigger and it had complilation error with that statement.

    Probably best not to create the user directly from Forms.
    Create a DB Package with a procedure to create a user. This proc should take, e.g. username & password as parameters (& maybe other things - default tablespace, etc.):
    PROCEDURE cre_user(p_username VARCHAR2, p_password VARCHAR2) IS
    BEGIN
    EXECUTE IMMEDIATE('CREATE USER '||p_username||' IDENTIFIED BY '||p_password);
    END cre_user;
    Give the package the correct user creation privileges & DEFINER or INVOKER s rights.
    Grant EXECUTE on the package (or its SYNONYM) to the appropriate end-users
    Finally, call the packaged procedure from your Form with the appropriate parameters.
    If you need to return info. to the Form, use OUT parameters.
    Also, consider the security implications of sending the password in an unencrypted form.

  • TNS-12666 error occures when using database link

    When I am trying to use database link
    defined in my database the following error occures:
    TNS-12666 Dedicated server: outbound transport protocol different from inbound.
    In documentation is stated to resolve such an error to
    specify the same protocol in the SQL*Net connect string or alias for the outbound connection as that used for the inbound connection.
    I have in tnsnames.ora defined network service name
    by which I can connect to such a database by SQL*Plus
    without any problems, why can I not do such a thing
    via database link?
    Thanks a lot for advise, ...

    Could you change the following entry in your 'sqlnet.ora' file and try?
    SQLNET.AUTHENTICATION_SERVICES = (NONE)

  • Cant Create User using Delegated Admin Console

    Hi All,
    ./imsimta version
    Sun Java(tm) System Messaging Server 6.2-3.04 (built Jul 15 2005)
    libimta.so 6.2-3.04 (built 01:30:02, Jul 15 2005)
    Linux nile.jlcc.com 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686 athlon i386 GNU/Linux
    I configured DA ..and all the things were working fine including the error im facing now..
    for the past two days
    I couldnt create user using DA console..but I can able to create from commadmin
    the log shows..
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Uncaught exception
         com.iplanet.jato.ApplicationServletBase.onUncaughtException(ApplicationServletBase.java:1415)
         com.sun.comm.da.WizardWinServlet.onUncaughtException(WizardWinServlet.java:98)
         com.iplanet.jato.ApplicationServletBase.fireUncaughtException(ApplicationServletBase.java:1164)
         com.iplanet.jato.ApplicationServletBase.processRequest(ApplicationServletBase.java:639)
         com.iplanet.jato.ApplicationServletBase.doPost(ApplicationServletBase.java:473)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
         com.sun.comm.da.WizardWinServlet.service(WizardWinServlet.java:111)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
         java.security.AccessController.doPrivileged(Native Method)
         com.sun.comm.da.LoginFilter.doFilter(LoginFilter.java:128)
    root cause
    com.iplanet.jato.NavigationException: Exception encountered during forward
    Root cause = [java.lang.NullPointerException]
         com.iplanet.jato.view.ViewBeanBase.forward(ViewBeanBase.java:380)
         com.iplanet.jato.view.ViewBeanBase.forwardTo(ViewBeanBase.java:261)
         com.sun.web.ui.view.wizard.CCWizard.handleNextButtonRequest(CCWizard.java:730)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         com.iplanet.jato.view.command.DefaultRequestHandlingCommand.execute(DefaultRequestHandlingCommand.java:183)
         com.iplanet.jato.view.RequestHandlingViewBase.handleRequest(RequestHandlingViewBase.java:308)
         com.iplanet.jato.view.ViewBeanBase.dispatchInvocation(ViewBeanBase.java:802)
         com.iplanet.jato.view.ViewBeanBase.invokeRequestHandlerInternal(ViewBeanBase.java:740)
         com.iplanet.jato.view.ViewBeanBase.invokeRequestHandlerInternal(ViewBeanBase.java:760)
         com.iplanet.jato.view.ViewBeanBase.invokeRequestHandler(ViewBeanBase.java:571)
         com.iplanet.jato.ApplicationServletBase.dispatchRequest(ApplicationServletBase.java:957)
         com.iplanet.jato.ApplicationServletBase.processRequest(ApplicationServletBase.java:615)
         com.iplanet.jato.ApplicationServletBase.doPost(ApplicationServletBase.java:473)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
         com.sun.comm.da.WizardWinServlet.service(WizardWinServlet.java:111)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
         java.security.AccessController.doPrivileged(Native Method)
         com.sun.comm.da.LoginFilter.doFilter(LoginFilter.java:128)
    root cause
    java.lang.NullPointerException
         com.sun.comm.da.view.NewUserSummaryPageViewBean.beginDisplay(NewUserSummaryPageViewBean.java:223)
         com.sun.web.ui.taglib.wizard.CCWizardTag.getWizardPageHTML(CCWizardTag.java:1560)
         com.sun.web.ui.taglib.wizard.CCWizardTag.appendPageletBodyContentHTML(CCWizardTag.java:668)
         com.sun.web.ui.taglib.wizard.CCWizardTag.appendWizardBodyHTML(CCWizardTag.java:658)
         com.sun.web.ui.taglib.wizard.CCWizardTag.getHTMLStringInternal(CCWizardTag.java:469)
         com.sun.web.ui.taglib.common.CCTagBase.doEndTag(CCTagBase.java:114)
         org.apache.jsp.com_005fsun_005fweb_005fui.jsp.wizard.WizardWindow_jsp._jspx_meth_cc_wizard_0(WizardWindow_jsp.java:301)
         org.apache.jsp.com_005fsun_005fweb_005fui.jsp.wizard.WizardWindow_jsp._jspService(WizardWindow_jsp.java:209)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:251)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         sun.reflect.GeneratedMethodAccessor131.invoke(Unknown Source)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
         java.security.AccessController.doPrivileged(Native Method)
         java.security.AccessController.doPrivileged(Native Method)
         com.iplanet.jato.view.ViewBeanBase.forward(ViewBeanBase.java:340)
         com.iplanet.jato.view.ViewBeanBase.forwardTo(ViewBeanBase.java:261)
         com.sun.web.ui.view.wizard.CCWizard.handleNextButtonRequest(CCWizard.java:730)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         com.iplanet.jato.view.command.DefaultRequestHandlingCommand.execute(DefaultRequestHandlingCommand.java:183)
         com.iplanet.jato.view.RequestHandlingViewBase.handleRequest(RequestHandlingViewBase.java:308)
         com.iplanet.jato.view.ViewBeanBase.dispatchInvocation(ViewBeanBase.java:802)
         com.iplanet.jato.view.ViewBeanBase.invokeRequestHandlerInternal(ViewBeanBase.java:740)
         com.iplanet.jato.view.ViewBeanBase.invokeRequestHandlerInternal(ViewBeanBase.java:760)
         com.iplanet.jato.view.ViewBeanBase.invokeRequestHandler(ViewBeanBase.java:571)
         com.iplanet.jato.ApplicationServletBase.dispatchRequest(ApplicationServletBase.java:957)
         com.iplanet.jato.ApplicationServletBase.processRequest(ApplicationServletBase.java:615)
         com.iplanet.jato.ApplicationServletBase.doPost(ApplicationServletBase.java:473)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
         com.sun.comm.da.WizardWinServlet.service(WizardWinServlet.java:111)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
         java.security.AccessController.doPrivileged(Native Method)
         com.sun.comm.da.LoginFilter.doFilter(LoginFilter.java:128)
    Please Help me on this..
    Ashik

    you may want to post this to the email forum.

  • Creating user using IDXML

    Hi All,
    Any idea how can i create user using IDXML, any sample IDXML format to refer for creating a user using IDXML.....
    Regards,
    Nitin

    you can extract an example from a blog post I wrote here:
    http://coreidng.blogspot.com/2008/07/oam-identity-xml-idxml-via.html
    this presumes that you understand workflow and you have setup a working create user workflow.
    I think the developer's guide is pretty good in this area know as well.
    hope that helps,
    Mark

  • Create user using ldapmodify

    Hi,
    I was trying to use below to create user "test1000" but could not succeed and getting error. I want to create users using DS CLI.
    ./ldapmodify -h webmail.example.com -p 389 -D "cn=Directory Manager" -w admin123
    dn: uid=test1000,ou=People,o=example.com,dc=example,dc=com
    changetype: modify
    add: uid
    objectClass: top
    objectClass: person
    objectClass: organizationalPerson
    objectClass: inetorgperson
    objectClass: inetUser
    objectClass: inetSubscriber
    uid: test1000
    givenName: test1000
    sn: t1000
    mailUserStatus: active
    mail: [email protected]
    mailHost: webmail.example.com
    userPassword: test@1000
    Please advise me where i'm doing mistake
    TIA,
    Regards,
    Praveen RK

    Adding an user through the command line works usually like this:
    $ ./ldapmodify -l localhost -p 389 -D "cn=Directory Manager" -w - <<\!
    dn: uid=ACapone,ou=People, dc=example,dc=com
    changetype: add
    givenName: Al
    sn: Capone
    telephoneNumber: 123456789
    mail: [email protected]
    facsimileTelephoneNumber: 987654321
    objectClass: top
    objectClass: person
    objectClass: organizationalPerson
    objectClass: inetorgperson
    uid: ACapone
    cn: Al Capone
    userPassword: password
    Enter bind password:
    adding new entry uid=ACapone,ou=People, dc=example,dc=com
    $
    For each attribute you want to add you also need to add the objectclass that attribute belongs to - otherwise you will get "Object class violation" errors. In your case you need to add "objectclass: inetLocalMailRecipient" for attribute 'mailHost' and "objectclass: inetMailUser" for attribute 'mailUserStatus'.
    Stefan

  • Error while creating materialized view which using database link

    Helo!
    I'm getting error "ORA-00942: table or view does not exist" when I want to create materialized view.
    Details:
    1. On destination database I create a database link:
    CREATE DATABASE LINK SDATABASE
    CONNECT TO MYUSER
    IDENTIFIED BY MYUSERPASS
    USING 'ORCL';
    => Command "SELECT * FROM TABLE1@SDATABASE" returns data normally!
    2. On source database I create MATERIALIZED VIEW LOG:
    CREATE MATERIALIZED VIEW LOG
    ON TABLE1
    WITH PRIMARY KEY
    INCLUDING NEW VALUES;
    3. Now, when I want to create MATERIALIZED VIEW on destination database:
    CREATE MATERIALIZED VIEW TABLE1
    REFRESH FAST
    START WITH SYSDATE
    NEXT SYSDATE + 1/1440
    WITH PRIMARY KEY
    AS SELECT * FROM TABLE1@SDATABASE;
    ...I get error "ORA-00942: table or view does not exist"!
    How is that possible if command "SELECT * FROM TABLE1@SDATABASE" returns data normally?
    Thanks,
    Voranc

    And, I'm using Oracle 10g.
    Voranc

  • How to use database link to create table in other database?

    e.g., java jdbc is connected to the database A.
    i want to create one table (Table1)in database B, and then insert data into Table1 select ....from Table2 which is in database A.
    i used the create database link (database name) connect to (database) indentified by .....
    but ...i got the sqlException as i wrote before.
    Thanks again.

    http://forum.java.sun.com/thread.jspa?threadID=656868&messageID=3860293#3860293

  • How to create & use database links

    i have 2 databases (oracle 8.1.6) and (oracle8.1.5)
    i want to call a function of one d/b from another
    i think this is possible via databse links.
    how do i go about creating and using them
    can someone guide me to a site or post an example .
    what all changes do i need to make in my configuration settings of the databases
    null

    Yes, you can do this with database links.
    Please see: http://otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/server.817/a76960/ds_admin.htm#22393
    null

Maybe you are looking for

  • ?xml version="1.0"? tag not appearing as first characters in document

    Hi, JSP below successfully creates a XML document but it includes a blank line before the <?xml version="1.0"?> tag. This causes my PL/SQL to return a "ORA-20100: Error occurred while parsing: PI names starting with 'xml' are reserved." error when us

  • Podcast Not Marked as Played

    I download many podcasts and move them to my iPod. I usually play them straight from the computer and then disconnect it to listen to as I walk my dogs so I know which ones were played or not. Before iTunes 10 I was able to disconnect and just select

  • How do email messages end up in the "Important" folder?

    I never created a folder labled "important" so I don't know the rules about how things end up here. I am generally confused as to why thunderbird retains messages in an "all mail" folder when I set up rules to parcel these messages into discrete fold

  • Safari is running SO slow since i updated it!

    I updated my mac, nothing unusual. But since i updated it this time, Safari has been running painfully slow.  What do i do?!

  • Excluding particular Company Code

    Hi Experts, We have Company Code as one of the selection field in the Info Package (In Data Selection Tab) . Now we need to load data Excluding one particular Company Code. Do we have any option in the Info-Package level to Exclude specific Comapny C