Archive for Oracle

Deleting docbases, D5.3 D6(Maybe) Schema cleana.

After running the uninstaller clean up the schema. Useful in cases of migration when sysadmin’s password can’t be legally extracted from the Oracle dba and you need to crack on.

set heading off
set feedback off
spool dropobj_x.sql
select ‘drop ‘||object_type||’ ‘||object_name||’ ;’
from user_objects
where object_type <> ‘INDEX’
and object_type <> ‘DATABASE LINK’
and object_type <> ‘PACKAGE BODY’
and object_type <> ‘TRIGGER’
and object_type <> ‘LOB’
order by created;
spool off
set heading on
set feedback on

Leave a Comment

Default schema for Content Server repository

If you have to have your schema created for you by the hosting company then this is what is required.
Make sure to ask the developers if any triggers will be required as you may wish to add this at the same time.

Schema Parameters        (Tried, tested and in use)
GRANT ALTER SESSION TO xy_resource;
GRANT CREATE DATABASE LINK TO xy_resource;
GRANT CREATE INDEXTYPE TO xy_resource;
GRANT CREATE OPERATOR TO xy_resource;
GRANT CREATE PROCEDURE TO xy_resource;
GRANT CREATE PUBLIC SYNONYM TO xy_resource;
GRANT CREATE ROLE TO xy_resource;
GRANT CREATE SEQUENCE TO xy_resource;
GRANT CREATE SESSION TO xy_resource;
GRANT CREATE SYNONYM TO xy_resource;
GRANT CREATE TABLE TO xy_resource;
GRANT CREATE TYPE TO xy_resource;
GRANT CREATE VIEW TO xy_resource;
GRANT SELECT_CATALOG_ROLE TO xy_resource;

Comments (1)

SQLPLUS stuff

Set Line width (number of columns)

SQL> set lin 250

Spooling to a file then viewing it

SQL> spool “test.txt”
SQL> select * from user_users;

USERNAME                         ……… deleted

SQL> spool off

SQL> ed test.txt
Shelling out to the host

SQL> host

In Windows launches a new DOS session.  In Unix launches the shell

Formatting output from an SQL query
- useful for generating DQL  on the back of an oracle query:

select ‘Name ‘ || object_name from dm_sysobject_s

Most importantly …

SQL>help set

Lists all the commands available to make presentation of information more pleasing to the eye.

Get tablespace sizes

select file_name,  tablespace_name, bytes from dba_data_files;

Leave a Comment

Documentum D6 Database prereq’s

In the case that the service provider maintains the Oracle instance which you are to use and wishes to create the database in advance, they will need to create the database

SQL> CREATE TABLESPACE DM_TEST_02_docbase DATAFILE ‘/U02/ORADATA/DM1/dm_TEST_0220071018141334_db.dbf’ SIZE 250M REUSE;

Then
SQL> ALTER DATABASE DATAFILE ‘/U02/ORADATA/DM1/dm_TEST_0220071018141334_db.dbf’ AUTOEXTEND ON NEXT 10M MAXSIZE 2048M;

Then grant essential privs to the docbase owner (schema account) so that the installation can commence:

SQL>GRANT CREATE ANY VIEW,RESOURCE,UNLIMITED TABLESPACE to TEST_02 ;

Leave a Comment

Troubleshooting Documentum 6 startup, installation, reconfiguration AND the Windows Registry

Platform

In these notes I am using Documentum 6 on Windows XP Prof with Oracle 10. something.

It is of course far easier to break a system than to fix it. If you go changing the ip address on a system (See my thing on reconfiguring Solaris) or the hostname then it is likely some applications are going to kick up a stink about it.

Here’s my Documentum and Oracle trip-me-ups for various things. This is live content that I intend to manage as time goes on.

1. DOCBASE OWNER NOT FOUND (docbase log):

Thu Sep 13 19:59:26 2007[DM_STARTUP_I_DOCBASE_OWNER_NOT_FOUND]: The database user (Kevin) is not a valid NT User. This is the user specified in your server.ini file as the database_owner attribute. If you are running the optional Replication Services package you will need to create a valid NT User account for this user.

Easy to fix – though I am not actually using NT. In fact, Documentum 6 does’t even appear to want to run on anything less than XP (a few tried it on W2000 and discovered it wouldn’t install). This applies in both the Unix and Windows environments. Nobody could ever tell me why this user needs to be created and I’ve heard theories but none plausable enough to publish. In this case the name Kevin is an OS user, Kevin is also the name of the docbase (Oops, need to break the habit – even if Documentum won’t), it’s a REPOSITORY.So the fix is in Windows XP to open the Control Panel and add a user. In Unix ‘useradd’ will do this or you can use some fancy gui tool. The user doesn’t need a home dir or any further config, the Content Server stops complaining in the knowledge this user exists. Couple of things: 1. Seen systems running happily without the user except for a message at the top of the log and 2. I don’t even think I’ve set a password for this user in the past either. So.. answers on a postcard please.

If you go mucking about with host names then you need to plough through a number of files to make the content server run again…

2. server.ini

Usually found in $DOCUMENTUM/dba/config/<repository name>/server.ini
If you are on Windows you can use the Windows Server manager to locate it easily. the above unix path gives you a clue for the Windows environment.

If you renamed a system or removed it from the domain, the least you will have to do is change the docbroker projection target:

[DOCBROKER_PROJECTION_TARGET]
host = yoyo
port = 1489

Check the hostname is at least ping-able from the DOS prompt or shell. If it aint then fix it. I’m not going there – there are plenty of Google searches you can do to figure this out. One thing I will say is watch out for things like…

3. Firewall Warning

Norton Protection Center which has a hideously unfriendly and unintuitive UI and can be a right hinderance to a working system, blocking ports and all that, just watch out for it and turn it off if you run into problems (obviously not if you are directly connected to the the Tinterweb).

4. The Windows Registry – NASTY.

I don’t know about version 5.3 or before because I’ve not used Windows in the Documentum world since last century but I do know Documentum pumps stuff into the Windows registry. So even if you think you’ve been prudent with your files and see stuff appearing in the server log which didn’t aughta be there then you need to open regedt32.

HKEY_LOCAL_MACHINE\SOFTWARE\Documentum\

Reveals a lot of interesting things.

I installed a Content Server and repository without reading the instructions simply because I wanted to break the install. Anyway, I decided to change the hostname and ip address then make the content server run (because that certainly broke the install). Well, I did this without editing the registry but had to go through \windows\system32\drivers\etc\hosts and update ip and hostname here as well as edit

C:\oracle\product\10.2.0\db_1\network\admin\listener.ora
C:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora

(You will have to find your own files, this is just my ‘out of the box’ personal config)

Just because you can connect to SQLPLUS and hack into the repository schema, doesn’t mean Documentum can do the same, so, you need to make sure to fix these files also.

5. dfc.properties

On your system you will find not 1 or 2 or even 3 dfc.properties files. On my system I found millions of them.

Some were in subdirs of c:\Documentum\bea9.2\domains\DctmDomain\upload\MethodServer\*…
…. and as the folderpath will tell you these have something to do with the java methodserver which, in D6, is no longer Tomcat and now a BEA thing.

There were others in my Webtop and DA deployments. anyway, keep as close an eye on these as you did with your dmcl.ini files. They are equally as important and configurable.

6. Oracle Connection Errors

Jumping back… SQLNET.log – which you will find in tnsnames.ora. If you have mucked up your connection sufficiently by tinkering around without writing stuff down then you may find this file will throw you a bone as to how to fix stuff.

Leave a Comment

Tablespaces in Oracle (Documentum)

Connect as the sysdba to do admin stuff

C:\Documents and Settings\Kevin>sqlplus connect as sysdba
SQL*Plus: Release 10.2.0.1.0 – Production on Thu Oct 18 14:16:43 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Enter password:

Look at existing tablespaces

SQL> select * from v$tablespace;

TS# NAME INC BIG FLA ENC
———- —————————— — — — —
0 SYSTEM YES NO YES
1 UNDOTBS1 YES NO YES
2 SYSAUX YES NO YES
4 USERS YES NO YES
3 TEMP NO NO YES
6 DM_KEVIN_DOCBASE YES NO YES

Create Tablespace

SQL> create tablespace ABC datafile ‘c:\tc\test_02.dbf’ size 60M reuse;
Tablespace created.

Leave a Comment

64 Bit Oracle on 64 Bit linux

Getting Oracle to install on many of the distro’s can be a headache.
I was surprised that Oracle’s own ‘Unbreakable Linux’ (64 bit) was an ‘unsupported platform’ of their database product.

Frigging the installer to believe the OS is supported when clearly it is not (as can be seen from the error message) is one of the first obstacles. Many will tell you to run the installer with -IgnoreSysPrereqs and fewer will tell you this is not a good idea.

I’m with the smaller crowd that says do this during the install:

echo 'Red Hat Linux release 4.1' > /etc/redhat-release

While SuSe Enterprise, RedHat and Asian Linux are supported, the closest distro’s I got to the defacto RedHat standard was ‘Centos’ and ‘Oracle Unbreakable Linux’ (which I broke instantaneously by trying to install it on an Asus mb with 4GB Ram – there is a bug in the dma and it needs to be installed with mem=3095 or remove 2GB of Ram during the install of the OS, once installed, drop the memory back in).

Oracle Unbreakable Linux didn’t seem to offer more compatibility with Oracle 10 which was a surprise and disappointment.

Leave a Comment