Skip to main content
Became Hot Network Question
added 39 characters in body
Source Link
folow
  • 540
  • 1
  • 7
  • 25

On single IBM Db2 v11.5 database server we have two databases connected with federated system. On source database there are federated definitions:

CREATE WRAPPER DRDA; CREATE SERVER myserver TYPE DB2/LUW VERSION 11.5 WRAPPER DRDA AUTHORIZATION "myuser" PASSWORD "mypassword" OPTIONS ( DBNAME 'mytargetdb' ) CREATE NICKNAME myschema.mynickname1 FOR myserver.myschema.mytable; CREATE VIEW myschema.myview AS SELECT... FROM myschema.mynickname1; ... several hundreds nicknames and, views, withindex differentspecifications on nicknames, authorizations on nicknames and views etc. 

Note: We are not using any USER MAPPING commands.

QUESTION: I must change userid and password that was created by CREATE SERVER command to "newuser" and "newpassword". How to change userid/password?

I know I can use DROP SERVER and CREATE SERVER again, but using DROP server all dependent objects are just dropped from database (e.g. nicknames) and I would like to avoid recreating them, because of complexity: several hundreds nicknames, views that depend on nicknames, view that depends on views and grants on those objects (maybe even something else).

I am looking at ALTER SERVER command, but I do not understand how to change userid/password.

On single IBM Db2 v11.5 database server we have two databases connected with federated system. On source database there are federated definitions:

CREATE WRAPPER DRDA; CREATE SERVER myserver TYPE DB2/LUW VERSION 11.5 WRAPPER DRDA AUTHORIZATION "myuser" PASSWORD "mypassword" OPTIONS ( DBNAME 'mytargetdb' ) CREATE NICKNAME myschema.mynickname1 FOR myserver.myschema.mytable; CREATE VIEW myschema.myview AS SELECT... FROM myschema.mynickname1; ... several hundreds nicknames and views with different authorizations etc 

Note: We are not using any USER MAPPING commands.

QUESTION: I must change userid and password that was created by CREATE SERVER command to "newuser" and "newpassword". How to change userid/password?

I know I can use DROP SERVER and CREATE SERVER again, but using DROP server all dependent objects are just dropped from database (e.g. nicknames) and I would like to avoid recreating them, because of complexity: several hundreds nicknames, views that depend on nicknames, view that depends on views and grants on those objects (maybe even something else).

I am looking at ALTER SERVER command, but I do not understand how to change userid/password.

On single IBM Db2 v11.5 database server we have two databases connected with federated system. On source database there are federated definitions:

CREATE WRAPPER DRDA; CREATE SERVER myserver TYPE DB2/LUW VERSION 11.5 WRAPPER DRDA AUTHORIZATION "myuser" PASSWORD "mypassword" OPTIONS ( DBNAME 'mytargetdb' ) CREATE NICKNAME myschema.mynickname1 FOR myserver.myschema.mytable; CREATE VIEW myschema.myview AS SELECT... FROM myschema.mynickname1; ... several hundreds nicknames, views, index specifications on nicknames, authorizations on nicknames and views etc. 

Note: We are not using any USER MAPPING commands.

QUESTION: I must change userid and password that was created by CREATE SERVER command to "newuser" and "newpassword". How to change userid/password?

I know I can use DROP SERVER and CREATE SERVER again, but using DROP server all dependent objects are just dropped from database (e.g. nicknames) and I would like to avoid recreating them, because of complexity: several hundreds nicknames, views that depend on nicknames, view that depends on views and grants on those objects (maybe even something else).

I am looking at ALTER SERVER command, but I do not understand how to change userid/password.

Source Link
folow
  • 540
  • 1
  • 7
  • 25

How to change password for federated access between two IBM Db2 databases?

On single IBM Db2 v11.5 database server we have two databases connected with federated system. On source database there are federated definitions:

CREATE WRAPPER DRDA; CREATE SERVER myserver TYPE DB2/LUW VERSION 11.5 WRAPPER DRDA AUTHORIZATION "myuser" PASSWORD "mypassword" OPTIONS ( DBNAME 'mytargetdb' ) CREATE NICKNAME myschema.mynickname1 FOR myserver.myschema.mytable; CREATE VIEW myschema.myview AS SELECT... FROM myschema.mynickname1; ... several hundreds nicknames and views with different authorizations etc 

Note: We are not using any USER MAPPING commands.

QUESTION: I must change userid and password that was created by CREATE SERVER command to "newuser" and "newpassword". How to change userid/password?

I know I can use DROP SERVER and CREATE SERVER again, but using DROP server all dependent objects are just dropped from database (e.g. nicknames) and I would like to avoid recreating them, because of complexity: several hundreds nicknames, views that depend on nicknames, view that depends on views and grants on those objects (maybe even something else).

I am looking at ALTER SERVER command, but I do not understand how to change userid/password.