dbTalk Databases Forums  

[Info-Ingres] DDBs and yet another way they suck...

comp.databases.ingres comp.databases.ingres


Discuss [Info-Ingres] DDBs and yet another way they suck... in the comp.databases.ingres forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Martin Bowes
 
Posts: n/a

Default [Info-Ingres] DDBs and yet another way they suck... - 03-21-2011 , 05:48 AM






Hi All,

Using Ingres10.0 I've just discovered that an unloaddb of a distributed database in which a procedure has been registered will generate errors at the command line. Furthermore, the copy.in generated will have an erroneous PROCEDURES section containing a 'create procedure' and associated grant commands which are both illegal in a DDB.

Try this:
#! /bin/sh

NODE=`uname -n`
# I'm assuming you have an installation password defined. If not just hardcode a suitable vnode.

destroydb bowtest > /dev/null
destroydb bowtest_ddb > /dev/null

echo "Create the databases: bowtest, bowtest_ddb/star..."
createdb bowtest > /dev/null
createdb bowtest_ddb/star > /dev/null

echo "Create the procedure in the loacal database (bowtest)..."
sql bowtest << PROC
create procedure get_1 as
declare
one integer not null not default;
begin
select 1 into ne;
end
\p\g
\q
PROC

echo "And now register the procedure in the ddb (bowtest_ddb/star)..."
sql bowtest_ddb/star << REGIT
register procedure get_1 as link
with node = '$NODE', database = 'bowtest', dbms = 'INGRES'
\p\g
\q
REGIT

echo "Now do the unloaddb bowtest_ddb/star..."
unloaddb bowtest_ddb/star

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.