Designer export reinstall

This document to indicate the steps required to re-install a backup from the designer repository

Two scenario's are possible:
- import into a new schema
- import into an old schema - first clean the schema

logic:

B
A --< > D --> B --> D .....
C
A. Decide on the scenario

The first thing to do is to decide on wheather to reinstall the existing schema or create a new one. The result of the decision will depend on the reason for reinstallation.
If you are reinstalling from scratch you will need to create everything again.
In case something went wrong or as for the reason I am currently writing this guide, with a patchset, it may come out handy to keep the complete schema and create a new one too.
If however you created a new environment and something went wrong during the import for example, you will need to clean up the schema again.

B. Clean the schema

In order to reinstal in the same schema, all the objects of the schema must be dropped.
Run the next script and make sure the number of bytes in the dbms_output buffer is high enough.


set serveroutput on

declare
cursor c_obj
is
select object_name
, object_type
from user_objects
where object_type in ('TABLE', 'VIEW', 'PACKAGE', 'SEQUENCE', 'FUNCTION', 'SYNONYM', 'TYPE')
order by decode ( object_type
, 'FUNCTION', 1
, 'PACKAGE', 2
, 'SEQUENCE', 3
, 'VIEW', 4
, 'SYNONYM', 5
, 'TABLE', 8
, 'TYPE', 9
)
, object_name
;
begin
--
for r_obj in c_obj
loop
if ( r_obj.object_type = 'TABLE' )
then
dbms_output.put_line ( 'Drop '
|| r_obj.object_type
|| ' '
|| r_obj.object_name
|| ' cascade constraint purge;'
);
else
dbms_output.put_line ( 'Drop '
|| r_obj.object_type
|| ' '
|| r_obj.object_name
|| ';'
);
end if;
end loop;
--
end;


Paste the output into a new script file and ... execute this script.
Repeat this process until only two objects remain.


B. Create a new environment

B.0 Create the tablespaces

First create the tablespaces that are required.
Here are scripts ... change where needed

create tablespace designer_data datafile 'd:\oracle\product\10.2.0\oradata\jhelling\designer_data1.dbf' size 200M autoextend on next 100M maxsize 512M / create tablespace designer_index datafile 'd:\oracle\product\10.2.0\oradata\jhelling\designer_index1.dbf' size 200M autoextend on next 100M maxsize 512M /

B.1 Create the user

Alternatively you can create a new repository owner.

create user des identified by oradev default tablespace users temporary tablespace temp;
alter user des default tablespace designer_data;

B.2 Assign the correct roles:

grant connect, resource to des;
-- grant dba to des; // not realy needed so leave it out

B.3 Give system privileges

grant alter session to des;
grant create any synonym to des;
grant drop any synonym to des;
grant create database link to des;
grant create procedure to des;
grant create role to des;
grant create sequence to des;
grant create table to des;
grant create trigger to des;
grant create type to des;
grant create view to des;
grant select any sequence to des;
grant unlimited tablespace to des;

B.4 Give sys privileges

grant select on dba_rollback_segs to des;
grant select on dba_segments to des;
grant execute on dbms_lock to des;
grant execute on dbms_pipe to des;
grant execute on dbms_rls to des;
grant select on v_$nls_parameters to des;
grant select on v_$parameter to des;

C Importing the dump file.

C.1 Create types.

When creating two repositories on the same database while using imp, the import will fail during the first lines with the error ORA-2304 which is caused by the 'stupid' constraint that object types must have a unique ID within the same database instance. See herefor notes 1066139.1 and 113335.

Currently looking for a workaround ...

These are the types that are defined in script jrtypes.sql in the repadmxx directory of the installation. Seems that the export of the designer does not take these types as user objects and they are therefor lost in the export (create any type privilege)
The content of the scripts is as follows :

create or replace type jr_num_list as table of number
/
create or replace type jr_str_list as table of varchar2(300)
/
create or replace type sdd_acc_priv_list as varray(25) of varchar(1)
/
create or replace type sdd_sys_priv_list as varray(25) of varchar(1)
/

C.x Create role CKR_DESIGNER

Create this role before import because a lot of grants are done to this role.

C.2 Verify tablespaces

This is a step you should not foreget, surely when you are installing an additional schema.
As you will have noticed I explicitely changed the default tablespace of the owner to designer_data. I use to have an other tablespace designer_indexes.
The import will assume the tablespaces exist so, verify into detail what your requirements on this will be.

C.3 Start the import

Now it is time to import the backup-export from the designer owner.
Here you can use the following command

imp userid=system/xxxx@xxxxx fromuser=designer touser=des file=desdump.dmp log=import.log

In this example you should specify the system connect string, the correct owner of the exported objects (fromuser) and the future owner of the newobjects (touser). The filename, desdump.dmp, should be changed to the correct value.

Start this command.
In parallel you will be able to find the results of the import in the import.log file.

D Upgrade to the correct version.

If your software is of a higher version than the one loaded ...

D.1 Be sure to use the correct imp.exe.
Before you do so however, you should check if it is not required to perform the steps indicated in the chapter on import problems. See below for this.

D.2 Upgrade the repository

Go the RAU (repository administration utility)
Normally you will only see some buttons enabled if the version of the repository is not compatible with the version of the designer software installation.
Press the upgrade button and the upgrade of the repository will start.

D.3 Verify all the objects.
On the RAU press the 'view objects' button and select then 'all objects'.
You should see the number 5711 of objects.
When you select the invalid and missing objects from the dropdown, no objects may be shown.

Problems encountered

IMP hangs when upgrading the repository

When upgrading repository the import hangs
I guess this is documented in note 5236740 bug 5236740 base bug 5225496
The import loaded data in two tables and then stopped ... and waits ...
I clicked in the cmd window and pressed ctrl-c ... which made the import stop and the real upgrade of the repository start.
These are the symptoms of the problem.
The solution is to set registry variables to point to an other version of imp and exp.
It comes to this:
Lookup the registry key for the iDS s
- HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_\REPOS61
Now change the values of the string values EXECUTE_EXPORT and EXECUTE_IMPORT to the full path of imp.exe and exp.exe to be used, so the one in the different Oracle_Home.
Be aware that the path for this variable can be too long. You should than solve this by creating a subst drive ...
subst :
for example subst x: D:\Oracle\product\10.2.0\db_1
The command to put into the EXECUTE_EXPORT and EXECUTE_IMPORT entries becomes rather simple : x:\bin\exp.exe and x:\bin\imp.exe
Remember however that a 'subst'ed drive is only valid until you reboot the windows OS.

ORA-28100
While opening my ER diagram I got the error ora-28100.
The sql statement that failed was:
SELECT cel.id, cel.ivid, cel.name, cel.container_subtype FROM ci_container_elements cel WHERE cel.root_flag = 'Y' ORDER BY 3;
Running this script in sql gave the following error:
ORA-28100: policy function schema DESIGNER is invalid

The original owner of the designer repostitory, so the one owning the original objects, was designer. I imported the export into the des schema.
On metalink you can look for note 602437.

Execute the following sql statement (change designer in your provious repository owner)
select * from dba_policies where pf_owner = 'DESIGNER'

Ubuntu Server - Defining Screen resolution

Problem Statement

After installation Ubuntu servers screen is not in synch with the resolution of the display

Solution

Found this document on the internet.
Thanks to the author ...

The resume of this article is as follows:

Howto

The screen resolution is determined at startup ... when the kernel is loaded.
An option can be specified to the kernel to indicate the required screen resolution.
So ... three steps:
- determine parameter
- change menu.lst and the parameter
- reboot the system

Determine the correct vga parameter

Determine the argument using the following table
          640x400 640x480 800x600 1024x768 1152x864 1280x1024 1600x1200
--------+--------------------------------------------------------------
4 bits | ? ? 0x302 ? ? ? ?
8 bits | 0x300 0x301 0x303 0x305 0x161 0x307 0x31C
15 bits | ? 0x310 0x313 0x316 0x162 0x319 0x31D
16 bits | ? 0x311 0x314 0x317 0x163 0x31A 0x31E
24 bits | ? 0x312 0x315 0x318 ? 0x31B 0x31F
32 bits | ? ? ? ? 0x164 ?
Look up the coorect vga indicator in the following table:

Edit the menu.lst file

Edit the /boot/grub/menu.lst file
Look for the correct line that defines the kernel to use with the correct options and if not already present add a parameter vga=0xyyy
The value 0xyyy is the vga parameter that you determined in step 1.

Reboot the system

Enter the following command:

#> reboot


A reboot is required to enable the setting.

Ubuntu Server - SSH configuration

Found the information on the following this link
Here follows a resume where I left out the sudo command because personally I always set a root password.

Check sshd service is running:

#> netstat -tulpln | grep -i ssh

Configure ssh port to something nonstandard

go to /etc/ssh
edit the sshd_config file (with vi for example)
Search for the keyword 'Port' which will be followed with 22 because this is the default
Change 22 to for example 512

Restart SSH deamon

#> /etc/init.d/ssh restart

Verify that the port is enabled by running netstat -tulpn | grep -i ssh again.

Firewall blocking

Verify with the following command that the port is open for connection through the firewall

#> iptables -L -n

This should give a list of all listening ports ... including as in the example 512.

If it is not in, configure it <>

Now you should configure your SSH client tool to connect to the server.

Look at this link to see how to configure PuTTY


Howto install Joomla on your very own Ubuntu Server

Credits for the one who earns it ...

I found this article on the internet and found it so interesting that I copied it to this blog.
Thanks for the person who wrote it : Mr Percival on the following link: http://www.parcival.org/2006/07/14/howto-install-joomla-on-your-very-own-ubuntu-server/
July 14, 2006 on 12:58 pm | In Computing |

You have a spare computer, you know that Joomla is a fairly powerful CMS, that Ubuntu is a really nice Linux distribution, and you’d like to combine all these things. So here is how it’s being done:

Make sure you are firewalled

We are going to install various services that can be accessed from users all over your network. However, I assume you want to keep out unwanted guests from the internet. Before you proceed, make sure that all ports are firewalled that connect you with the internet and no critical forwarding is active.

Download the necessary software

Download the Ubuntu server edition and the latest stable Joomla CMS.

Install Ubuntu

Burn the downloaded Ubuntu image onto a CD-R with your favorite CD writing program. (in most cases, burning an image to a CD is somewhere in the advanced section) On your spare computer boot from the newly created CD and pick the ‘Install LAMP’ option. This will install the Linux Apache Mysql PHP environment we are going to need to host our Joomla testsite.

Disclaimer: In the following sections, you are going to see the sudo command a couple times. sudo is used in Linux (and in Ubuntu particularly) so that an ordinary user can get admin/root privileges to maintain the system. I created a true root account (sudo passwd) in my Ubuntu so I don’t have to mess with sudo all the time. I tried to put the sudo into the following code wherever necessary, but I probably forgot it a couple times. If you want to execute a command and your Ubuntu refuses to do it, you probably need to add a sudo in front of it. :D

Upgrade Ubuntu

Free software is good, but it also has security problems just like any software that is being written. However, the good thing about free software is that those problems are minimal if you regularly update it. Luckily, this is fairly easy with Ubuntu, all you need is two commands:


#This will check online for the latest
#software packages and security fixes
sudo aptitude update
#This will download the latest packages of
#the software you already have installed
sudo aptitude upgrade

Repeat this regularly to ensure you have always the latest software and are protected from known exploits.

Optional: Add software that makes life easier

Sitting in front of that bare Linux screen may not exactly be what you consider to be fun and you probably want to manage and edit things from your own main desktop computer. To do so we need to install two more things and you can manage everything from your Mac/Windows/Linux computer. OpenSSH allows an encrypted = secure remote connection to your Ubuntu server. Samba allows you to access shares on your Ubuntu server similarly to remote Windows shares. We proceed to install:

sudo aptitude install ssh samba

You can also solely type sudo aptitude and browse a GUI to add/remove software if you prefer that.

Now you can remotely access your Ubuntu server with your Ubuntu username and password.

On a Mac, open the Terminal application (it’s in Utilities) and enter

ssh your_username@ubuntus_IP_address

On a Linux computer, proceed the same as on the Mac - I believe you already know where your terminal is. ;)

On a Windows computer, install putty and use this tool to connect to your Ubuntu server.

Now we still need to configure Samba so we are able to easily upload files onto our Ubuntu server. For this purpose we are going to edit /etc/samba/smb.conf with the nano editor (if it hasn’t been installed yet, do it with aptitude as explained above):

sudo nano -w /etc/samba/smb.conf

Now in this file you specifically want to pay attention to the to the homes share:

[homes]
comment = Home Directories
browseable = yes
writable = yes

Before anyone can do anything with Samba, we also have to create the necessary Samba account first:

smbpasswd -a your_username

This will enable access for remote users to their home directories. Let’s assume Slartibartfast has a Windows computer where he logs in with his name and password. He also has an account on your Ubuntu server with the same username and password and obviously also a matching Samba account. If that’s the case, Slartibartfast will be able to find in his Ubuntu home directory in his Explorer’s network neighborhood. (Mac Users: just hit Apple-K to mount the Samba share)

Setting up a place for your files to reside

Okay, now we have the Apache webserver installed. You can verify if it’s up and running by pointing your webbrowser to the IP address of your Ubuntu machine, e.g. http://192.168.0.1 This should load the generic Apache welcome site in your browser.

Next we need a place where you can store your (Joomla) files so they are being displayed when you attempt to open your site with your browser. In Ubuntu this is being done by creating a public_html directory in your /home directory. So do

mkdir public_html

in a terminal in your home directory or mount the samba share and create the directory in the file browser of your prference. When you have it, extract your Joomla files into it so that the index.php file and its fellows come to reside in your shiny new public_html.

In your home directory, also recursively set the proper read/write permissions (this is to ensure that Joomla can write the settings to disk):

chmod -R ugo+rwx public_html/

If it worked, the command ls -l will display read/write/execute permissions for all users on your public_html folder.

Next we are going to check if we can access the site in our web browser by adressing it with the proper username in the URL.


#generic
http://your_ubuntu_IP/~username
#example for user Slartibartfast
http://192.168.0.1/~Slartibartfast

Now you should be greeted with the screen that lets you start with the Joomla configuration. Before we can start the Joomla configuration, there is one important step left.

Create the necessary database

Joomla stores its content in a database, so we still need to setup the MySQL database in Ubuntu. First we need to create a valid MySQL user: (see also this and this chapter of the MySQL documentation)


#first we log into the MySQL shell
mysql --user=root mysql
#now we create same user TWICE
GRANT ALL PRIVILEGES ON *.* TO 'your_username'@'localhost' IDENTIFIED BY 'your_password' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'your_username'@'%' IDENTIFIED BY 'your_password' WITH GRANT OPTION;
#we exit the MySQL shell again
exit

According to mkr it’s also okay to add only the localhost user as long as the Apache, PHP and MySQL are hosted on the same machine. I haven’t tested that, but it does make sense. :)
Furthermore, it’s also wise to set a password for the root user in MySQL:


mysql -u root
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyPW');
exit

Once we have the user we need to create the tables that belong to him/her: (see also the Ubuntu server guide on Joomla)


#we create the database for your user
mysqladmin -u your_username -p create your_database_name
#we log into our database
mysql -u db_user -p
#we set the priviledges
GRANT ALL PRIVILEGES ON your_database_name.* TO 'your_username' IDENTIFIED BY 'your_password';
#we activate the new permissions
flush privileges;
#we leave the MySQL shell again
exit

Optional: phpmyadmin

You may be one of those users who doesn’t like managing MySQL databases in a terminal very much. Well, you are in good company. If you prefer to manage your MySQL from now on by means of your webbrowser, those additional steps will take you there:

nano -w /etc/apt/sources.list

remove the comment marks for the universe repository. This will allow you to install phpmyadmin:

aptitude update
aptitude search phpmyadmin
aptitude install phpmyadmin

After that you can connect to your MySQL Server and do all admin tasks by visiting the URL

http://localhost/phpmyadmin/

This is it

Now you should be able to setup Joomla in your webbrowser and start developping your website. If you ever feel like shutting down your server or rebooting it, this is how it’s being done:

#shutdown and turn off
shutdown -h now
#reboot
shutdown -r now

If you want to upload your website later on a professionally hosted machine where it’s accessible to the entire world, you need to perform the following steps:

  • In your Joomla settings, reconfigure the database name, database username, and database password to match the values provided by the hosting company. (see also the Joomla FAQ)
  • Load your files in public_html into the corresponding location provided by your hosting company by means of an FTP program.
  • Export your database as SQL syntax. Paste and execute the syntax into the database provided by your hosting company.
  • If everything went well, your Joomla should now properly work on the hosting company’s server.

With your little Ubuntu server you could also keep hosting your Joomla yourself and make it accessible to the entire world if you open the port in your firewall that Apache listens to. However, if you decide to do this be prepared to get attacked by those sick minds who have fun ruining other people’s property, so don’t do it yourself unless you are skilled enough to handle that kind of server yourself.

Update on hosting

I am done with my Joomla project and I am thrilled about it. However, I ran into a problem I originally did not consider: version conflicts. Doing your Joomla project on your Ubuntu server is a nice thing since you have a wonderful development environment - you have the latest stable version of everything. However, my hosting company does not. When I uploaded Joomla and wanted to make it run there, I first had to wade through a series of “has been depreceated” errors. Slowly I understand why one would want to host his websites on his very own server - it saves a couple headaches.

Brother DCP-6690CW Nice-To-Knows

This hawtoe to document some things about the nice A3 printer, new from brother...

Nicely installed ... but always those firewalls.
Those who created the need for a firewall should be ....

But back to the facts ...

After installation it may be (you may be dammned sure you will have to ... ) required to configure the firewall.
On the Brother support web site there is a document on it in the FAQ.
This document is based on the **-Windows Firewall ...
But you must configure your computer to be open for local area network traffic on the ports 54925 and 137, both for the UDP protocol and duplex ... so in and out ... otherwise configure one for the inward and one for the outbound traffic.

An other problem I am currently looking in to is what makes the pc's on which you installed the Brother software register themselves with the printer. This is a problem that you encounter when you want to scan a document from the DCP to a pc on which the soft was installed.

Keep U posted.
Me