Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

help - removing device

4 posts in ,  Windows NT Upgrades and Configuration Last posting was on 2000-12-19 02:12:52.0Z
Jon Posted on 2000-10-11 15:39:25.0Z
Message-ID: <39E489AD.E9793E5D@alleghany.co.k>
Date: Wed, 11 Oct 2000 16:39:25 +0100
From: Jon <jonathan.meads@alleghany.co.k>
Organization: Alleghany underwrting Ltd
X-Mailer: Mozilla 4.72 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
Subject: help - removing device
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.sqlserver.nt,sybase.public.sqlserver.upgrades+configuration
Lines: 18
NNTP-Posting-Host: lolgate.lloyds.uk.ibm.net 195.212.5.4
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:1585 sybase.public.sqlserver.upgrades+configuration:231
Article PK: 1085103

We have a bit of a problem,

We created a new device, altered the database to use it. We then noticed
we had used size = 5120 instead of size = 51200 when using disk init!!!

We dropped the segments from the device (logsegment, default and system)
and then attempted to use sp_dropdevice to remove it and start over.

The problem is sp_dropdevice will not remove the device as it complains
that the database is using it, even thou sp_helpdb database shows it as
being totally unused by the database (free kbytes = device size)

Does anyone know how to correct this problem, is there a way to either
drop the device, or enlarge the device?


Many thanks
Jonathan Meads


Bret Halford Posted on 2000-10-11 17:37:12.0Z
Message-ID: <39E4A548.B90F22FF@sybase.com>
Date: Wed, 11 Oct 2000 11:37:12 -0600
From: Bret Halford <bret@sybase.com>
Organization: Sybase, Inc.
X-Mailer: Mozilla 4.5 [en]C-CCK-MCD (WinNT; I)
X-Accept-Language: en,ja
MIME-Version: 1.0
Subject: Re: help - removing device
References: <39E489AD.E9793E5D@alleghany.co.k>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.sqlserver.nt,sybase.public.sqlserver.upgrades+configuration
Lines: 40
NNTP-Posting-Host: bret-pc.sybase.com 157.133.80.211
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:1582 sybase.public.sqlserver.upgrades+configuration:230
Article PK: 1085102


Jon wrote:

> We have a bit of a problem,
>
> We created a new device, altered the database to use it. We then noticed
> we had used size = 5120 instead of size = 51200 when using disk init!!!
>
> We dropped the segments from the device (logsegment, default and system)
> and then attempted to use sp_dropdevice to remove it and start over.
>
> The problem is sp_dropdevice will not remove the device as it complains
> that the database is using it, even thou sp_helpdb database shows it as
> being totally unused by the database (free kbytes = device size)
>
> Does anyone know how to correct this problem, is there a way to either
> drop the device, or enlarge the device?
>
> Many thanks
> Jonathan Meads

Yes, if indeed the device is unused (I would run dbcc usedextents to be
sure, rather
than relying on the sp_helpdb output, which is not necessarily up to date),
then,
assuming it is the last row in sysusages (ordered by dbid,lstart) for this
database,
then you can delete the row in sysusages, cycle the ASE, and the database
will be
"shrunk" down. You can then sp_dropdevice. See my writeup on how to shrink

a database at http://www.isug.com/Sybase_FAQ.

You can also enlarge the device by directly modifying the sysdevices.high
column
to a larger value (within the constraints of the actual partition size if
useing raw partitions,
the limits on device sizes, and the free space available if using file
systems). Device
size in MB is ((high-low)+1) / 512. No reboot is needed using this
approach.

-bret


Anonymous Posted on 2000-12-19 02:12:52.0Z
From: Anonymous@sybase.com
Date: Mon, 18 Dec 2000 21:12:52 -0500
Newsgroups: sybase.public.sqlserver.nt
Subject: Re: help - removing device
Message-ID: <A6FD1CF991E5AE23000C2A06852569BA.0058D6D085256975@webforums>
References: <39E489AD.E9793E5D@alleghany.co.k>
Lines: 5
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.sqlserver.nt:1384
Article PK: 1088844

In my case I made a mistake in the "path"
The size was correct. Dropping the device gave a message in use by
database. From what I read . the database must first be dropped then the
device. which I do not want to do. If you found an answer let me knoe
lvaleros@fisci.com


Anonymous Posted on 2000-11-07 10:07:57.0Z
From: Anonymous@sybase.com
Date: Tue, 7 Nov 2000 05:07:57 -0500
Newsgroups: sybase.public.sqlserver.nt
Subject: Re: help - removing device
Message-ID: <613DB1ED89A3A4A70037A8FD85256990.0058D6D085256975@webforums>
References: <39E489AD.E9793E5D@alleghany.co.k>
Lines: 2
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.sqlserver.nt:1513
Article PK: 1088989

Dump the database. Drop the database and then drop the devices. Recreate
the devices and create the database. Load the database from the dump.