Can't move logging to a new device :-(

Can't move logging to a new device :-(

Post by Andrew Mack » Thu, 04 Jul 1996 04:00:00



Hi.

I created a small db with data and logging on the same device.  I now want
to modify this so that logging is on a seperate device.  I re-created the
db and loaded from tape but the same device fragments are created with log
segments on the default device (even though I created the db with
'log on Mydev=4')

I followed the procedure in the Admin book, using sp_logdevice, dump trans,
sp_helplog etc but this had no effect.  All logging still goes to the
default device.

Sybase 10.0.2.   Any suggestions ??      thanks

Andrew Mackay
Newfoundland Hydro

 
 
 

Can't move logging to a new device :-(

Post by Bret Halfo » Fri, 05 Jul 1996 04:00:00


|> Hi.
|>
|> I created a small db with data and logging on the same device.  I now want
|> to modify this so that logging is on a seperate device.  I re-created the
|> db and loaded from tape but the same device fragments are created with log
|> segments on the default device (even though I created the db with
|> 'log on Mydev=4')
|>
|> I followed the procedure in the Admin book, using sp_logdevice, dump trans,
|> sp_helplog etc but this had no effect.  All logging still goes to the
|> default device.
|>
|> Sybase 10.0.2.   Any suggestions ??      thanks

System 10+ does alter segements on load to match the image of the
database being loaded.  You should be able to drop the log segment
using various stored procedures.  You can also do it by directly
updating sysusages.segmap (be careful!).  Change the "7" for that
device fragment to a "3", then run dbcc dbrepair(dbname, remap).

--
---------------------------------------------------------------------

| Sybase Technical Support         fax (510)-922-3911         __|  
| 6475 Christie Avenue                                       |__  
| Emeryville, CA 94608 USA         exec sp_realitycheck()       |___
|                                                                   |
#####################################################################

 
 
 

Can't move logging to a new device :-(

Post by Joe Fernle » Mon, 08 Jul 1996 04:00:00



> ... You can also do it by directly
> updating sysusages.segmap (be careful!).  Change the "7" for that
> device fragment to a "3", then run dbcc dbrepair(dbname, remap).

You could, of course, be a lot safer and BCP out all your data, then drop and recreate the database
from scratch. Recreate your tables and simply BCP the data back in.

Much safer than playing with system tables I think ;-}

Joe

--

------------ Joe Fernley ------------

Tel: 0956 271890

 
 
 

Can't move logging to a new device :-(

Post by John Bish » Wed, 10 Jul 1996 04:00:00


: Hi.

: I created a small db with data and logging on the same device.  I now want
: to modify this so that logging is on a seperate device.  I re-created the
: db and loaded from tape but the same device fragments are created with log
: segments on the default device (even though I created the db with
: 'log on Mydev=4')

: I followed the procedure in the Admin book, using sp_logdevice, dump trans,
: sp_helplog etc but this had no effect.  All logging still goes to the
: default device.

: Sybase 10.0.2.   Any suggestions ??      thanks

: Andrew Mackay
: Newfoundland Hydro

Just to make sure, you did sp_dropsegmeng logsegment, 'device'

JB

 
 
 

Can't move logging to a new device :-(

Post by Andrew Mack » Fri, 12 Jul 1996 04:00:00



Quote:

>Just to make sure, you did sp_dropsegmeng logsegment, 'device'

Yup, that works. Thanks.

Andrew

 
 
 

1. Problem-- Move Transaction Log to New Device

We have SQL 6.5 with SP#3 installed and wanted to move the transaction log.

MYDATABASE       ;the daabase name
OLD_LOG               ;The old log device
NEW_LOG              ;The new log device

 The transaction log was already on a seperate device from the database so
we followed the directions for moving a trasaction log in MS SQL Server
Administrators Companion as follows:

1. Create new device  'NEW_LOG'

2. Ran sp_log MYDATABASE,NEW_LOG      and the response was as follows:

No action needed or taken, because all fragments for database 'MYDATABASE'
on device 'NEW_LOG' are already dedicated for log usage only.

(This didn't sound really good but we continued anyhow...can anybody tell us
what this means?)

3. Wrote a script to insert 10,000 records into the database and then
deleted them.  We did this to complete enough transactions to fill the
extent of 8-pages (plus more than that) that the database was currently
using so that it would move to the new log device.  We ran DCCC Checktable
(syslogs) to determine that we had filled at least 8-pages (more like 1,200
pages).

4.  We are sure that all active transactions on the old database device had
completed.  We were in single user mode and there were no queries or
applications being run.

5. We dumped the transaction log.

6. Finally we ran SP_HELPLOG and the reponse was as follows...
In database 'MYDATABASE', the log starts on device 'OLD_LOG'.

We had fully expected to see the new log device getting used as in....
In database 'MYDATABASE', the log starts on device NEW_LOG'...but  this is
not hapening!

Can anyone help us with this.  Any response would be greatly appreciated

2. Recordsets on same connection ADO

3. Problem -- Move Log to New Device

4. SQL on NAS

5. Moving a Log to a new device

6. DC-Washington-112817--ORACLE-DBA Skills-Oracle DBA, THE MYTA CORPORATION

7. Moving database from shared device to new device

8. FS; "Oracle Performance Tuning Tips & Techniques"

9. Data/Log devices on new Sun fast wide SCSI MultiPack don't work

10. Moving the log from a log and data device

11. i'dont know the device sizes, I've data device & log device , how to get data back to a new database

12. Altering a Database to log to a new Log Device

13. Moving Devices and SQL Server to a New Physical Location