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.

SOS: lost dump file, have device files intact on NT4/Syb 11.0.2

5 posts in Windows NT Last posting was on 1999-11-29 11:51:55.0Z
FxS Posted on 1999-11-27 05:43:32.0Z
From: "FxS" <sandeepsethi@msn.com>
Subject: SOS: lost dump file, have device files intact on NT4/Syb 11.0.2
Date: Sat, 27 Nov 1999 00:43:32 -0500
Lines: 21
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Message-ID: <lBeojoJO$GA.203@forums.sybase.com>
Newsgroups: sybase.public.sqlserver.nt
NNTP-Posting-Host: 3Cust251.tnt9.det3.da.uu.net 63.27.62.251
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:2919
Article PK: 1090354

Hi,
I rebuilt my Sybase SQL Server 11.0.2 on NT4SP4 , and need to reload a user
database on to this server.
My dump file is corrupt, but I have the database split over two 500 MB data
devices and one 500 MB logdevice (all device files are all intact).


Someone told me that I need to do a disk REinit and a disk refit to get
"master" db to recognize the devices....I need some help on the procedure.

If I do a disk reinit and a disk refit, does that do the job of creating the
database , or do i need to issue a seperate "create database " statement for
the device. Would this be any different from a regular create database
statement ?


thanks! email: SandeepSethi@msn.com


Alan Ramsay Posted on 1999-11-27 18:36:19.0Z
From: "Alan Ramsay" <alan@dotdash.org.uk>
References: <lBeojoJO$GA.203@forums.sybase.com>
Subject: Re: lost dump file, have device files intact on NT4/Syb 11.0.2
Date: Sat, 27 Nov 1999 18:36:19 -0000
Lines: 48
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
Message-ID: <p3WBcbQO$GA.303@forums.sybase.com>
Newsgroups: sybase.public.sqlserver.nt
NNTP-Posting-Host: da133d100.dialup.callnetuk.com 212.67.133.100
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:2915
Article PK: 1090349


"FxS" <sandeepsethi@msn.com> wrote in message
news:lBeojoJO$GA.203@forums.sybase.com...
> Hi,
> I rebuilt my Sybase SQL Server 11.0.2 on NT4SP4 , and need to reload a
user
> database on to this server.
> My dump file is corrupt, but I have the database split over two 500 MB
data
> devices and one 500 MB logdevice (all device files are all intact).

I have been in a similar position with a Unix system, and whilst there are
probably many supported ways to do this (well at least one), I managed to do
it with a desperate measures way.

On the Unix system, we removed the disk which held the user database, and
replaced it with a blank disk.

We knew which partitions had log and data on them, after installing the new
disk, we could then use the normal disk init and create database commands to
create a new exact copy of the database on this disk.

We shutdown the server, removed the 'new' disk, and replaced it with the old
disk, which had the user databases on it.

Now on NT, it's probably easier than that. I assume that you have chosen to
create the databases are files, rather than referencing parts of the disk
directly.

You could just rename these files out of the way, then create the files
again with the old names using the 'disk init' command; use 'create
database' to recreate an empty database, shutdown the server, delete your
'new database devices', and rename the old ones back in.

Just an idea, but it seems that there have been no official answers posted
from Sybase on the correct way to do it, so if you are a desperation states,
it's worth a try.

Word of warning - on NT, Sybase sets some flags when it creates devices so
as it is not cached by the OS. I am not sure if renaming these files clears
the flags, so it may be advantageous to do a database dump once you get it
up, drop the database and devices, re-create the devices and database, and
load the database back from your now good dump.

Of course, you do any of the above at your own risk.

Alan


Arun Kamat Posted on 1999-11-27 09:22:58.0Z
Message-ID: <383FA2F2.1C36CED1@tkg.att.ne.jp>
Date: Sat, 27 Nov 1999 18:22:58 +0900
From: Arun Kamat <annarun@tkg.att.ne.jp>
X-Mailer: Mozilla 4.05 [en] (Win95; I)
MIME-Version: 1.0
To: FxS <sandeepsethi@msn.com>
Subject: Re: SOS: lost dump file, have device files intact on NT4/Syb 11.0.2
References: <lBeojoJO$GA.203@forums.sybase.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.sqlserver.nt
Lines: 46
NNTP-Posting-Host: 182.pool19.tokyo.att.ne.jp 165.76.224.197
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:2917
Article PK: 1090353


FxS wrote:

> Hi,
> I rebuilt my Sybase SQL Server 11.0.2 on NT4SP4 , and need to reload a user
> database on to this server.

11.0.2 is not a y2k compliant version you need to upgrade this to at least
11.0.3.2. Why did you rebuild the server, was there problem with the master
database?

> My dump file is corrupt, but I have the database split over two 500 MB data
> devices and one 500 MB logdevice (all device files are all intact).

Since your dump is no good, you need to fallback on a valid dump file to restore
the database.

> Someone told me that I need to do a disk REinit and a disk refit to get
> "master" db to recognize the devices....I need some help on the procedure.

Have you recreated the master database? If no then thats not right. If yes then
you have to use the above commands. These procedures are needed if you have
problems with master db or are moving it to a new location. I would suggest you
to contact sybase tech support for more help - check up whether you need to use
the above steps and if yes, then you need to be careful about few more things
while executing these commands.

Later since you need to restore a user database - you need to use a valid dump
file or use valid table images created earlier using bcp - out.

> If I do a disk reinit and a disk refit, does that do the job of creating the
> database , or do i need to issue a seperate "create database " statement for
> the device. Would this be any different from a regular create database
> statement ?

Disk reinit and refit update master database tables to store info about device
usage etc. The device file headers are read and master database is updated.
Since the physical devices are fine, you do not have to issue 'create database'
statements.

cheers,
arun


FxS Posted on 1999-11-27 12:48:46.0Z
From: "fxs" <sandeepsethi@msn.com>
References: <lBeojoJO$GA.203@forums.sybase.com> <383FA2F2.1C36CED1@tkg.att.ne.jp>
Subject: Re: SOS: lost dump file, have device files intact on NT4/Syb 11.0.2
Date: Sat, 27 Nov 1999 07:48:46 -0500
Lines: 141
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Message-ID: <oXLnVZNO$GA.204@forums.sybase.com>
Newsgroups: sybase.public.sqlserver.nt
NNTP-Posting-Host: eta-232.fuse.net 216.68.168.232
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:2916
Article PK: 1090352

thanks for the prompt response....read below...

> 11.0.2 is not a y2k compliant version you need to upgrade this to at least
> 11.0.3.2. Why did you rebuild the server, was there problem with the
master
> database?
>

that was the idea. we were running 11.0.2 and were upgrading to 11.5.1, I
was on the horn with Sybase techsupport, and they suggested reinstalling the
11.5.1 engine and loading the one and only database from the dump. So when
we brought the new database online, it would do an auto-upgrade of the
database...
So we got the 11.5.1 engine up, but when it was time to load the dump, we
figured that it was corrupt.
So back we go to 11.0.2 !
Now that was the ONLY dump we have. We do however have the device files.
Please advise.


> Since your dump is no good, you need to fallback on a valid dump file to
restore
> the database.
>
Unfortunately, that option is ruled out. This is the only dump.


> > Someone told me that I need to do a disk REinit and a disk refit to get
> > "master" db to recognize the devices....I need some help on the
procedure.
>
> Have you recreated the master database? If no then thats not right. If yes
then
> you have to use the above commands. These procedures are needed if you
have
> problems with master db or are moving it to a new location. I would
suggest you
> to contact sybase tech support for more help - check up whether you need
to use
> the above steps and if yes, then you need to be careful about few more
things
> while executing these commands.
>

I tried disk reinit with a dummy database on a dummy device...and it seemed
to do the trick even with a new master database (just installed with
11.0.2). But here's the catch....the only way it would recognize the new
device and recognize the database in it was if in disk reinit I used the
same vdevno and same "size" as was used in creatng the device in the first
place.

With my user-database devices, I know the sizes are 512 MB/device...but
don't know the vdevnos that were used to create it.

I don't have a dump of master, I do have a master.dat. is there anyway I
could restore master ?




> Later since you need to restore a user database - you need to use a valid
dump
> file or use valid table images created earlier using bcp - out.
>

I think I might have that, i'll email you back on that in a bit.

thanks,
Sunny.










Arun Kamat <annarun@tkg.att.ne.jp> wrote in message
news:383FA2F2.1C36CED1@tkg.att.ne.jp...
> FxS wrote:
>
> > Hi,
> > I rebuilt my Sybase SQL Server 11.0.2 on NT4SP4 , and need to reload a
user
> > database on to this server.
>
> 11.0.2 is not a y2k compliant version you need to upgrade this to at least
> 11.0.3.2. Why did you rebuild the server, was there problem with the
master
> database?
>
> > My dump file is corrupt, but I have the database split over two 500 MB
data
> > devices and one 500 MB logdevice (all device files are all intact).
>
> Since your dump is no good, you need to fallback on a valid dump file to
restore
> the database.
>
> > Someone told me that I need to do a disk REinit and a disk refit to get
> > "master" db to recognize the devices....I need some help on the
procedure.
>
> Have you recreated the master database? If no then thats not right. If yes
then
> you have to use the above commands. These procedures are needed if you
have
> problems with master db or are moving it to a new location. I would
suggest you
> to contact sybase tech support for more help - check up whether you need
to use
> the above steps and if yes, then you need to be careful about few more
things
> while executing these commands.
>
> Later since you need to restore a user database - you need to use a valid
dump
> file or use valid table images created earlier using bcp - out.
>
> > If I do a disk reinit and a disk refit, does that do the job of creating
the
> > database , or do i need to issue a seperate "create database " statement
for
> > the device. Would this be any different from a regular create database
> > statement ?
>
> Disk reinit and refit update master database tables to store info about
device
> usage etc. The device file headers are read and master database is
updated.
> Since the physical devices are fine, you do not have to issue 'create
database'
> statements.
>
> cheers,
> arun
>


Arun Kamat Posted on 1999-11-29 11:51:55.0Z
Message-ID: <384268DB.A1BB5340@tkg.att.ne.jp>
Date: Mon, 29 Nov 1999 20:51:55 +0900
From: Arun Kamat <annarun@tkg.att.ne.jp>
X-Mailer: Mozilla 4.05 [en] (Win95; I)
MIME-Version: 1.0
Subject: Re: SOS: lost dump file, have device files intact on NT4/Syb 11.0.2
References: <lBeojoJO$GA.203@forums.sybase.com> <383FA2F2.1C36CED1@tkg.att.ne.jp> <oXLnVZNO$GA.204@forums.sybase.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.sqlserver.nt
Lines: 74
NNTP-Posting-Host: 57.pool22.tokyo.att.ne.jp 165.76.227.72
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:2912
Article PK: 1090345

hi sunny,

> that was the idea. we were running 11.0.2 and were upgrading to
> 11.5.1, I was on the horn with Sybase techsupport, and they suggested
> reinstalling the 11.5.1 engine and loading the one and only database from the
dump.
> So when we brought the new database online, it would do an auto-upgrade of the

> database...So we got the 11.5.1 engine up, but when it was time to load the
dump,
> we figured that it was corrupt. So back we go to 11.0.2 !
> Now that was the ONLY dump we have. We do however have the device
> files.Please advise.

Did you create the new 11.5.1 server with all new devices and new
master database master.dat file? If yes then I think we should be ok.

> Unfortunately, that option is ruled out. This is the only dump.

> I tried disk reinit with a dummy database on a dummy device...and it
> seemed to do the trick even with a new master database (just installed
> with 11.0.2). But here's the catch....the only way it would recognize
> the new device and recognize the database in it was if in disk reinit
> I used the same vdevno and same "size" as was used in creatng the
> device in the first place.

> With my user-database devices, I know the sizes are 512
> MB/device...but don't know the vdevnos that were used to create it.
> I don't have a dump of master, I do have a master.dat. is there anyway
> I could restore master ?

I assume your old 11.0.2 master.dat file is intact and the new ASE
11.5.1 master database is a different file. If this is true then change
your old RUN_SERVER file to point to the same old master.dat
1) shutdown your server with nowait
2) modify RUN_SERVER file as dataserver ... -d <old master.dat> ....
3) start the server
4) This should work fine.

If the old master.dat is gone or over written by ASE 11.5.1 version
then:
1) check your sysusages, sysdevices, sysdatabases - for the dbid, device in
question
2) These if are correct you should not have problems accessing the database
3) I think 2 does not apply, so you need to re-create the master database as:
0) shut down server with nowait
a) buildmaster ... point to a <fresh master file>
b) change RUN_SERVER to point to fresh server
c) start up the server
d) do disk reinit for all devices,
e) if tempdb is on a seperate device ensure that your tempdb fragments are
exactly
the same as earlier - disk reinit updates sysdevices
f) select * from sysdevices and confirm - this has to be accurate else would

cause further damage
g) do a disk refit - which would update sysdatabases and sysusages, the
server reboots
h) if everything is ok then you would see everything intact else start from
step 0)
i) run dbcc on the databases

Check system admin guide - restoring databases for little more info. I suspect
your old user database was corrupt hence the dump file is also corrupt.

cheers,
arun