I am trying to create a application that will export ddl for the given schema.
I created sample in java using ddlgen command. In which, I can get ddl for all objects for the schema of logged. Command is:
java -cp "C:/Users/admin/Desktop/lib/jconn4.jar;C:/Users/admin/Desktop/lib/dsparser.jar;C:/Users/admin/Desktop/lib/DDLGen.jar" com.sybase.ddlgen.DDLGenerator -Usybase1 -Psybase1 -Sserver-name -Ddatbase1 -Ooutput.sql
In the above command I need do give for UserName and Password.
Now I have second another user sybase2, who is a grantee and sybase1 user grants access of all objects to sybase2 user. Here I want get ddl of sybase1 user from the sybase2 user's account.
Same thing I have done in oracle where we have two users user1 and user2 . The user1 grant all permission to access all objects to user2. I can successfully getList of all granted objects.
Query:-
select object_name from dba_objects where owner = 'user1';
and after that using get_ddl functions, I am getting ddl of all objects.
The above method of ddlgen, I did not find a way to pass schema name, for which I want to get ddl.
Is ddlgen does not support this ? If not then please suggest us other way to get ddl for the given schema.
We also do not found 'How to create new schema except 'dbo' ?'