Feb 11

iWidget – How To fight with Ibm Connection

This Week I’ve developed my first iWidget for Ibm Connections 5*.
Here you can find my first widget (an “html embedder” for Connections 5), it can be registered in connection using this parameters in “widget-config.xml” ** :

 

 
<widgetDef defId="htmlEmbed" url="https://<HostWhereYouPutWidget>/htmlEmbed/htmlembed20.xml?version=11" modes="view edit" 
	 description="Use to embed html" showFullWidgetDeleteConfirmation="false" uniqueInstance="false"
	 primaryWidget="false" 
	 iconUrl="https://<HostWhereYouPutWidget>/customWidget/htmlEmbed/htmlembed.png"
	 category="Social embedding"
	/>

 

To Download iWidget Example Click Here – > htmlEmbed20

* This widget can be placed only in community.
** To know how to register widget you can follow official documentation.

 

 

 

Nov 10

Db2 : restore a database from an instance to another and set grant to administer database

This post describe how to restore a database backup from an instance to another and set grant; I assume you have successfully installed Db2 and configured a new instance.

Step 1 restore db:

Use this command to restore db*:

db2 restore db <dbname> from <backupdir> ON <datapath> NEWLOGPATH <tranlogpath>

<dbname> = original database name
<backupdir> = path where backup is located (if more then one backup is present you must specify timestamp with comand TAKEN AT)
<datapath> = where you want to store your database path tipically /home/<instancename>/
<tranlogpath> = where you want to store tranlog (I use : /home/<instancename>/tranlog)

* A database backup contains settings for path so if you move Db from one server to another you have to specify new filesystem path

Step 2 grant :

Use this command to set grant:

db2 CONNECT TO <dbname> user <databaseowner> using <databaseownerpassword>;
db2 GRANT DBADM,CREATETAB,BINDADD,CONNECT,CREATE_NOT_FENCED_ROUTINE,IMPLICIT_SCHEMA,LOAD,CREATE_EXTERNAL_ROUTINE,QUIESCE_CONNECT,SECADM ON DATABASE TO USER <newuser>;
db2 CONNECT RESET;

<dbname> = original database name
<databaseowner> = grant must be set from the old db owner, to do this I usually create a new user whit old name on new server.
<databaseownerpassword> = password
<newuser> = new owner

 


Example:

Immagine you have a server named server1 with instance db2inst1 and a database named wpsdb.
Now immagine you have to move a wpsdb to server2 with instance name db2wps.
What you have to do is :

– Restore db: db2 restore db wpsdb from /backup ON /home/db2wps NEWLOGPATH /home/db2wps/tranlog
– create user db2inst1 on server2:(banally “useradd db2inst1″ and “passwd db2inst1″ to set password)
– grant:

db2 CONNECT TO wpsdb user db2inst1 using password
db2 GRANT DBADM,CREATETAB,BINDADD,CONNECT,CREATE_NOT_FENCED_ROUTINE,IMPLICIT_SCHEMA,LOAD,CREATE_EXTERNAL_ROUTINE,QUIESCE_CONNECT,SECADM ON DATABASE TO USER db2wps
db2 CONNECT RESET

Older posts «