문제

I'd like to create a user on another server using a db link. Is this possible? (Lets assume I have permission)

Here's the syntax for creating a user on the local server

create user TEST_USER 
identified by TEST_USER_PW 
default tablespace USERS 
temporary tablespace TEMP;

How could it be done with a db link?

Thank you (Feel free to migrate this to DBA if it's off topic)

Edit: Haki brought up that DDL operations are not allowed on a remote database. I'll post an alternative once I find one.

도움이 되었습니까?

해결책

You can execute DDL on over a database link using DBMS_UTILITY.EXEC_DDL_STATEMENT:

begin
    dbms_utility.exec_ddl_statement@myself(
        'create user TEST_USER 
        identified by TEST_USER_PW 
        default tablespace USERS 
        temporary tablespace TEMP');
end;
/
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top