RE: [U2] Unix copying Universe files {Unclassified}

2005-05-13 Thread Stevenson, Charles
Question (per Mike Henderson's post on this thread):  

If a file has been setup for transaction logging,
and you make a copy of a file using OS-level tools (cp, rcp, ftp, tar,
etc.),
how do you remove the TxLg info buried in the file header of the cloned
file?


Answer:

1. Use filepeek to edit the file header directly.

--- or ---

2. - Edit the UV.TRANS record to point to the new cloned file,
   - then deactivate it using 
  UniAdmin, 
  or the menus in UV home dir,
  or the method described a few days ago 
 in answer to Jeff Fitsgeralds TxLg/resize question, 
   - then restore the UV.TRANS record to what it should be.
This should _probably_ be done with logging disabled for the system,
but I don't know that it _must_ be so (at 10.0, anyway).  If you leave
logging enabled, updates to the original file will continue to be logged
while you are doing all this, since the log number remains in that
file's header and the file header remains flagged for logging.  UV.TRANS
is only used during maintenance and rolls-forward.
Of course, updates to the cloned file will be logged too, until you do
this. Furthermore, if anyone opens the cloned file before you finish
this, their process will continue logging the cloned file until they
close the file.

--- or ---

3. Maybe someone at IBM has a better answer.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Unix copying Universe files {Unclassified}

2005-05-12 Thread Ed Clark
instead of using a unix cp, perhaps you could use uvbackup piped through a
uvrestore? Slower than a cp, but there will be no corruped files or odd
index interactions. I don't know if uvbackup has provisions for re-creating
indexes though.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of HENDERSON MIKE,
MR
Sent: Thursday, May 12, 2005 3:18 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Unix copying Universe files {Unclassified}


Charles,

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Stevenson,
Charles
> Sent: Friday, 13 May 2005 04:49
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2] Unix copying Universe files
>
> Just to pick nits, if you use Transaction Logging, the txlg
> number is in the file header, too.
> Subsequent updates of the cloned file can goof up your logs.

Now that's interesting.

I know how to fix up the Secondary Index pointers (with SET.INDEX)
And how to fix up Distributed Files (by ED &PARTFILES& and REBUILD.DF)

But how would I fix up the transaction log numbers?


Thanks

Mike

> Is there a similar concern with data replication?
>
> Distributed files also have pathnames buried in them.
>
The information contained in this Internet Email message is intended
for the addressee only and may contain privileged information, but not
necessarily the official views or opinions of the New Zealand Defence Force.
If you are not the intended recipient you must not use, disclose, copy or
distribute this message or the information in it.

If you have received this message in error, please Email or telephone
the sender immediately.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Unix copying Universe files {Unclassified}

2005-05-12 Thread HENDERSON MIKE, MR
Charles,

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Stevenson,
Charles
> Sent: Friday, 13 May 2005 04:49
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2] Unix copying Universe files
> 
> Just to pick nits, if you use Transaction Logging, the txlg 
> number is in the file header, too. 
> Subsequent updates of the cloned file can goof up your logs.   

Now that's interesting.

I know how to fix up the Secondary Index pointers (with SET.INDEX)
And how to fix up Distributed Files (by ED &PARTFILES& and REBUILD.DF)

But how would I fix up the transaction log numbers?


Thanks

Mike

> Is there a similar concern with data replication?
> 
> Distributed files also have pathnames buried in them.
> 
The information contained in this Internet Email message is intended
for the addressee only and may contain privileged information, but not
necessarily the official views or opinions of the New Zealand Defence Force.
If you are not the intended recipient you must not use, disclose, copy or 
distribute this message or the information in it.

If you have received this message in error, please Email or telephone
the sender immediately.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Unix copying Universe files

2005-05-12 Thread Stevenson, Charles
Just to pick nits, if you use Transaction Logging, the txlg number is in
the file header, too.   Subsequent updates of the cloned file can goof
up your logs.  
Is there a similar concern with data replication?

Distributed files also have pathnames buried in them.

-Original Message-
From: Martin Phillips

Beware of the big problem

Alternate key index subfiles are located via a pathname stored in the
file header. If you copy a file and then update it, you may be updating
the indices of the original file. See the SET.INDEX command for a
solution to this.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Unix copying Universe files

2005-05-12 Thread iggchamp
Excellent answer Manu.  I will give it a look.

-- Original message -- 

> Did you try a sequence like : 
> 
> cd `cat .uvhome` ; uvsh SUSPEND.FILES ON 
> sync 
> cp . . 
> cd `cat .uvhome` ; uvsh SUSPEND.FILES OFF 
> 
> Why not ? 
> 
> Manu Fernandes Infodata S.`r.l. Tel : (352) 33 16 48 Fax : (.352) 33 75 55 
> - Original Message - 
> From: 
> To: "u2-Users" 
> Sent: Thursday, May 12, 2005 1:52 AM 
> Subject: [U2] Unix copying Universe files 
> 
> 
> > Hi All, 
> > 
> > UV9.6 
> > HPUX 11 
> > 
> > I have a program that I use to update our test account from time to time 
> > using the unix cp command. It works fine except... Every once in a while 
> > I run into a corrupted file. I am guessing that it is because the file 
> > has yet to be written to disk. Has anyone out there had success in 
> > routinely copying files in this manner? Would it help if I issued a sync? 
> > 
> > Any help would be greatly appreciated. 
> > 
> > Thanks, 
> > 
> > Scott 
> > --- 
> > u2-users mailing list 
> > u2-users@listserver.u2ug.org 
> > To unsubscribe please visit http://listserver.u2ug.org/ 
> --- 
> u2-users mailing list 
> u2-users@listserver.u2ug.org 
> To unsubscribe please visit http://listserver.u2ug.org/ 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Unix copying Universe files

2005-05-12 Thread Robert.Porter2
This is a good point! It's also true if you restore a previous backup
say from tape, to an alternate location then put a VOC pointer to it so
you can see what the file looked like back when... If you do anything
with the old copy of the file, it can mess up your current file's
indexes. It's one of those things that if you do it once, you probably
won't do it a second time.

Robert 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Martin Phillips
Sent: Thursday, May 12, 2005 10:27 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Unix copying Universe files

Beware of the big problem

Alternate key index subfiles are located via a pathname stored in the
file
header. If you copy a file and then update it, you may be updating the
indices of the original file. See the SET.INDEX command for a solution
to
this.


Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Unix copying Universe files

2005-05-12 Thread iggchamp
Good point.  My routine takes care of that as well as distributed files.

Thanks for the heads up.

I did make that mistake when I first started at this company some years ago.  I 
had never worked with secondary indices prior to coming here.  After copying 
all of our production files into a test account on a weekend, I came into the 
office on Monday to a horrible mess.  I didn't even know what was happening for 
the first 1/2 hour or so. Wow, that was a bad day!

-- Original message -- 

> Beware of the big problem 
> 
> Alternate key index subfiles are located via a pathname stored in the file 
> header. If you copy a file and then update it, you may be updating the 
> indices of the original file. See the SET.INDEX command for a solution to 
> this. 
> 
> 
> Martin Phillips 
> Ladybridge Systems 
> 17b Coldstream Lane, Hardingstone, Northampton NN4 6DB 
> +44-(0)1604-709200 
> --- 
> u2-users mailing list 
> u2-users@listserver.u2ug.org 
> To unsubscribe please visit http://listserver.u2ug.org/ 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Unix copying Universe files

2005-05-12 Thread Martin Phillips
Beware of the big problem

Alternate key index subfiles are located via a pathname stored in the file
header. If you copy a file and then update it, you may be updating the
indices of the original file. See the SET.INDEX command for a solution to
this.


Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Unix copying Universe files

2005-05-12 Thread iggchamp
Thanks chuck, that sounds like a good plan.  Maybe I will look at using fuser 
to see if anyone is attached to the file at copy time too.
-- Original message -- 

> I don't necessarily log people off when I do this, but I check the 
> modification time before I start the copy, do the copy, and then check the 
> mod. time after the copy. If it hasn't changed, you're safe .. This works 
> well on smaller and low traffic files .. 
> -Chuck 
> 
> -Original Message- 
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] Behalf Of 
> [EMAIL PROTECTED] 
> Sent: Wednesday, May 11, 2005 10:29 PM 
> To: u2-users@listserver.u2ug.org 
> Subject: Re: [U2] Unix copying Universe files 
> 
> 
> Thanks for responding Bruce. The last time that I did it, I was sure that 
> all users had logged off. 
> 
> -- Original message -- 
> 
> > Goo'day, Scott 
> > 
> > At 23:52 11/05/05 +, you wrote: 
> > 
> > >Hi All, 
> > > 
> > >UV9.6 
> > >HPUX 11 
> > > 
> > >I have a program that I use to update our test account from time to time 
> > >using the unix cp command. It works fine except... Every once in a while 
> > >I run into a corrupted file. I am guessing that it is because the file 
> > >has yet to be written to disk. Has anyone out there had success in 
> > >routinely copying files in this manner? Would it help if I issued a sync? 
> > > 
> > >Any help would be greatly appreciated. 
> > 
> > Are you sure everybody's logged off.. and kept off.. for the 
> > duration of "cp"??? 
> > 
> > 
> > >-- 
> > >No virus found in this incoming message. 
> > >Checked by AVG Anti-Virus. 
> > >Version: 7.0.308 / Virus Database: 266.11.8 - Release Date: 10/05/05 
> > 
> > Regards, 
> > 
> > Bruce Nichol 
> > Talon Computer Services 
> > ALBURY NSW 2640 
> > Australia 
> > 
> > http://www.taloncs.com.au 
> > 
> > Tel: +61 (0)411149636 
> > Fax: +61 (0)260232119 
> > 
> > If it ain't broke, fix it till it is! 
> > 
> > 
> > -- 
> > No virus found in this outgoing message. 
> > Checked by AVG Anti-Virus. 
> > Version: 7.0.308 / Virus Database: 266.11.8 - Release Date: 10/05/05 
> > 
> > 
> > 
> > 
> > -- 
> > No virus found in this outgoing message. 
> > Checked by AVG Anti-Virus. 
> > Version: 7.0.308 / Virus Database: 266.11.8 - Release Date: 10/05/05 
> > --- 
> > u2-users mailing list 
> > u2-users@listserver.u2ug.org 
> > To unsubscribe please visit http://listserver.u2ug.org/ 
> --- 
> u2-users mailing list 
> u2-users@listserver.u2ug.org 
> To unsubscribe please visit http://listserver.u2ug.org/ 
> --- 
> u2-users mailing list 
> u2-users@listserver.u2ug.org 
> To unsubscribe please visit http://listserver.u2ug.org/ 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Unix copying Universe files

2005-05-12 Thread Manu Fernandes
Did you try a sequence like :
cd `cat .uvhome` ; uvsh SUSPEND.FILES ON
sync
cp . .
cd `cat .uvhome` ; uvsh SUSPEND.FILES OFF
Why not ?
Manu Fernandes Infodata S.`r.l. Tel : (352) 33 16 48 Fax : (.352) 33 75 55
- Original Message - 
From: <[EMAIL PROTECTED]>
To: "u2-Users" 
Sent: Thursday, May 12, 2005 1:52 AM
Subject: [U2] Unix copying Universe files


Hi All,
UV9.6
HPUX 11
I have a program that I use to update our test account from time to time 
using the unix cp command.  It works fine except...  Every once in a while 
I run into a corrupted file.  I am guessing that it is because the file 
has yet to be written to disk.  Has anyone out there had success in 
routinely copying files in this manner?  Would it help if I issued a sync?

Any help would be greatly appreciated.
Thanks,
Scott
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/ 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Unix copying Universe files

2005-05-12 Thread Chuck Mongiovi
I don't necessarily log people off when I do this, but I check the
modification time before I start the copy, do the copy, and then check the
mod. time after the copy.  If it hasn't changed, you're safe .. This works
well on smaller and low traffic files ..
-Chuck

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
[EMAIL PROTECTED]
Sent: Wednesday, May 11, 2005 10:29 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Unix copying Universe files


Thanks for responding Bruce.  The last time that I did it, I was sure that
all users had logged off.

-- Original message --

> Goo'day, Scott
>
> At 23:52 11/05/05 +, you wrote:
>
> >Hi All,
> >
> >UV9.6
> >HPUX 11
> >
> >I have a program that I use to update our test account from time to time
> >using the unix cp command. It works fine except... Every once in a while
> >I run into a corrupted file. I am guessing that it is because the file
> >has yet to be written to disk. Has anyone out there had success in
> >routinely copying files in this manner? Would it help if I issued a sync?
> >
> >Any help would be greatly appreciated.
>
> Are you sure everybody's logged off.. and kept off.. for the
> duration of "cp"???
>
>
> >--
> >No virus found in this incoming message.
> >Checked by AVG Anti-Virus.
> >Version: 7.0.308 / Virus Database: 266.11.8 - Release Date: 10/05/05
>
> Regards,
>
> Bruce Nichol
> Talon Computer Services
> ALBURY NSW 2640
> Australia
>
> http://www.taloncs.com.au
>
> Tel: +61 (0)411149636
> Fax: +61 (0)260232119
>
> If it ain't broke, fix it till it is!
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.308 / Virus Database: 266.11.8 - Release Date: 10/05/05
>
>
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.308 / Virus Database: 266.11.8 - Release Date: 10/05/05
> ---
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Unix copying Universe files

2005-05-11 Thread iggchamp
Thanks for responding Bruce.  The last time that I did it, I was sure that all 
users had logged off. 

-- Original message -- 

> Goo'day, Scott 
> 
> At 23:52 11/05/05 +, you wrote: 
> 
> >Hi All, 
> > 
> >UV9.6 
> >HPUX 11 
> > 
> >I have a program that I use to update our test account from time to time 
> >using the unix cp command. It works fine except... Every once in a while 
> >I run into a corrupted file. I am guessing that it is because the file 
> >has yet to be written to disk. Has anyone out there had success in 
> >routinely copying files in this manner? Would it help if I issued a sync? 
> > 
> >Any help would be greatly appreciated. 
> 
> Are you sure everybody's logged off.. and kept off.. for the 
> duration of "cp"??? 
> 
> 
> >-- 
> >No virus found in this incoming message. 
> >Checked by AVG Anti-Virus. 
> >Version: 7.0.308 / Virus Database: 266.11.8 - Release Date: 10/05/05 
> 
> Regards, 
> 
> Bruce Nichol 
> Talon Computer Services 
> ALBURY NSW 2640 
> Australia 
> 
> http://www.taloncs.com.au 
> 
> Tel: +61 (0)411149636 
> Fax: +61 (0)260232119 
> 
> If it ain't broke, fix it till it is! 
> 
> 
> -- 
> No virus found in this outgoing message. 
> Checked by AVG Anti-Virus. 
> Version: 7.0.308 / Virus Database: 266.11.8 - Release Date: 10/05/05 
> 
> 
> 
> 
> -- 
> No virus found in this outgoing message. 
> Checked by AVG Anti-Virus. 
> Version: 7.0.308 / Virus Database: 266.11.8 - Release Date: 10/05/05 
> --- 
> u2-users mailing list 
> u2-users@listserver.u2ug.org 
> To unsubscribe please visit http://listserver.u2ug.org/ 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Unix copying Universe files

2005-05-11 Thread Bruce Nichol
Goo'day, Scott
At 23:52 11/05/05 +, you wrote:
Hi All,
UV9.6
HPUX 11
I have a program that I use to update our test account from time to time 
using the unix cp command.  It works fine except...  Every once in a while 
I run into a corrupted file.  I am guessing that it is because the file 
has yet to be written to disk.  Has anyone out there had success in 
routinely copying files in this manner?  Would it help if I issued a sync?

Any help would be greatly appreciated.
Are you sure everybody's logged off.. and kept off.. for the 
duration of "cp"???


--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.11.8 - Release Date: 10/05/05
Regards,
Bruce Nichol
Talon Computer Services
ALBURYNSW 2640
Australia
http://www.taloncs.com.au
Tel: +61 (0)411149636
Fax: +61 (0)260232119
If it ain't broke, fix it till it is! 

--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.11.8 - Release Date: 10/05/05

--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.11.8 - Release Date: 10/05/05
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/