Showing posts with label mssql. Show all posts
Showing posts with label mssql. Show all posts

Friday, March 9, 2012

Restore Problem

MSSQL 2000 SP3A

I'm trying to restore a database with the following commands.

restore database Test
from disk = 'D:\backups\9pm.bak'
WITH RECOVERY,

move 'DEV_Data' to 'c:\Program Files\Microsoft SQL
Server\MSSQL\data\Test_Data.MDF',
move 'DEV_Log' to 'c:\Program Files\Microsoft SQL
Server\MSSQL\data\Test_log.LDF'

The database doesn't exist on the restore server destination.

The size of the bak file is 681 mb.

The restore process never finishes or at least I've canceled after 30
minutes.

I do see the mdf file being created at 811 mbs.

I also see a log file for the database being created, its 17gb. I have 30
gbs of disk space when I initiate the restore.

Is this normal?Terri (terri@.cybernets.com) writes:
> MSSQL 2000 SP3A
> I'm trying to restore a database with the following commands.
> restore database Test
> from disk = 'D:\backups\9pm.bak'
> WITH RECOVERY,
> move 'DEV_Data' to 'c:\Program Files\Microsoft SQL
> Server\MSSQL\data\Test_Data.MDF',
> move 'DEV_Log' to 'c:\Program Files\Microsoft SQL
> Server\MSSQL\data\Test_log.LDF'
> The database doesn't exist on the restore server destination.
> The size of the bak file is 681 mb.
> The restore process never finishes or at least I've canceled after 30
> minutes.
> I do see the mdf file being created at 811 mbs.
> I also see a log file for the database being created, its 17gb. I have 30
> gbs of disk space when I initiate the restore.
> Is this normal?

17 GB of disk could take some time to initiate, so I would restart
the restore, and leave it running.

Once you are up, you should probably take action to shrink the
transaction log. Exactly how do to this, depends on your requirements
for up-to-the-point recovery.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Wednesday, March 7, 2012

Restore MSSQL Database, lost LDF-File

Hi.
I've following problem:
- Customer played with his logical drives in a CPQ smart array
- He played too much: he lost the drive with the LDF-File
- Now the SQL-Server is in a kind of wired mode; you can
start and stop it, but you cannot connect to (neiter 'sa' nor
any other user available before)
In fact the mode is not wired: what shall he do other when
most important file is missing... :o
- The problem for me now is:

> How can I get the Enterprise Manager or Query Analyzer
up and running again to start a restore?

PS: The restore is to be done from a tape-library running
Veritas Backup Exec + SQL-Agent

PPS: Error-log says (what I already know):
2005-10-04 17:18:02.69 spid11 Device activation error. The physical file name 'H:\DEVLOG1\DEVLOG1.ldf' may be incorrect.

Thanks in advance for assistance.

Regards,
Carsten Loefflerdid you try to connect with osql?|||Sounds like someone played with the default database of sa and BUILTIN\ADMINISTRATORS. That's bad. You can see if any of the local administrators can connect to the SQL Server with WndowsNT authentication, but it sounds like you have already tried that.|||If nobody can connect to SQL Server, maybe you want to run rebuildm, then restore the last good master database and other databases as needed.|||Hi Everyone,
thanks for the assistance.

Brett:
No, I didnt try it with OSQL. But thats a good idea. Any hints so far
before I go and investigate myself too much??

MCrowley:
Yip. You're right and I didnt mention it. Yes - I tried it with "sa" and
I tried it with all the others I knew that they were there.
The thing that confuses me: master-DB is still there and running
and didnt get touched...

Tomh:
Mmmh. Do you think I have to do it anyway. I think that master-DB
is up and running.

Regards,
Carsten Loeffler|||The thing that confuses me: master-DB is still there and running
and didnt get touched...

When you log into SQL Server, you always go to your default database first thing. If it is not there, then you get the error "Can not open default database". Has the same thing happened to BUITLIN\ADMINISTRATORS, or can a local Windows admin log in with Windows Authentication?|||Hi.
I've following problem:
<snip>
- Now the SQL-Server is in a kind of wired mode; you can
start and stop it, but you cannot connect to (neiter 'sa' nor
any other user available before)
</snip>

Since we know MCrowley is right, and if the statement above is true, then **all** users were defaulted to the database where the ldf is missing.

If I'm reading the quoted part right, not a single user can log in. If that is the case, then master will have to be restored. And since you have to be able to log in to rebuild master, rebuildm will be needed to get back to a place where a system admin can login. So maybe rebuildm, restore database where .ldf is missing, them restore master.|||And ->immediately<- reset sa's default database back to master. As well as BUILTIN\ADMINISTRATORS.|||And ->immediately<- reset sa's default database back to master. As well as BUILTIN\ADMINISTRATORS.
I am gonna bet all the whisky lying in my almirah it will be possible to login using BUILTIN\ADMINISTRATORS. It just seems that the guy is not aware of the account.

Suggestion : Try logging in with the radio button set to Windows Authentictation while you are logged in with a Windows System Administrator account ...

restore MSSQL BAK file by TSQL

Hi,

I need an application with asp.net that let me restore database by getting .bak file and database name and database user and user password, my database is SQL Server 2005.

There is an open source one named

Database Publishing Services 1.1

Google it or search Microsoft site about it

HTH
Regards

restore mssql 7.0. database

When I try to restore mssql 7.0 database,I got strange error :

The database you are attempting to restore was backed up under a different sort order ID (52) than the one currently runing on the server (106), and at least one of them is a non-binary sort order.
Backup or restore operation terminating abnormally.

Is there a way how i can fix it ?
Thanks a lot !You need to change sort order by using REBUILDM utility to rebuild the master database, refer to books online for more information.

Or rebuild the target server with source server's collation settings.

restore MSSQL 7 backup to MSSQL 2000?

There is one lonely database sitting on a SQL Server 7 instance running on a
Windows 2000 server. I would like to retire that box and put the database on
the new Windows 2003 server running SQL Server 2000. Can I just copy a backup
of the SQL 7 database and restore it on the SQL 2000 instance? Thanks.
You can use BACKUP and RESTORE or sp_detach_db and sp_attach_db to move the
database. There is lots of "how to" information regarding these commands
available within Books Online.
Keith
"J Jetson" <JJetson@.discussions.microsoft.com> wrote in message
news:101335D5-98F5-498F-8D03-7297BABCDBBE@.microsoft.com...
> There is one lonely database sitting on a SQL Server 7 instance running on
a
> Windows 2000 server. I would like to retire that box and put the database
on
> the new Windows 2003 server running SQL Server 2000. Can I just copy a
backup
> of the SQL 7 database and restore it on the SQL 2000 instance? Thanks.
|||Thank you - I have copied databases between servers before, but not between
different versions of SQL Server. I was just checking that I wouldn't have
problems migrating a 7 database to a 2000 version.
Thanks again!
"Keith Kratochvil" wrote:

> You can use BACKUP and RESTORE or sp_detach_db and sp_attach_db to move the
> database. There is lots of "how to" information regarding these commands
> available within Books Online.
> --
> Keith
>
> "J Jetson" <JJetson@.discussions.microsoft.com> wrote in message
> news:101335D5-98F5-498F-8D03-7297BABCDBBE@.microsoft.com...
> a
> on
> backup
>
|||Migrating from 7.0 to 2000 is fully supported.
You cannot restore or attach a SQL Server 2000 databaes to SQL Server 7. If
you need to move your data from 2000 to 7.0 (or any previous version) you
will need to find another method such as DTS or BCP.
Keith
"J Jetson" <JJetson@.discussions.microsoft.com> wrote in message
news:FFE80829-23E3-456F-AB95-A3B3761C6F96@.microsoft.com...
> Thank you - I have copied databases between servers before, but not
between[vbcol=seagreen]
> different versions of SQL Server. I was just checking that I wouldn't have
> problems migrating a 7 database to a 2000 version.
> Thanks again!
> "Keith Kratochvil" wrote:
the[vbcol=seagreen]
commands[vbcol=seagreen]
running on[vbcol=seagreen]
database[vbcol=seagreen]

restore MSSQL 7 backup to MSSQL 2000?

There is one lonely database sitting on a SQL Server 7 instance running on a
Windows 2000 server. I would like to retire that box and put the database on
the new Windows 2003 server running SQL Server 2000. Can I just copy a backu
p
of the SQL 7 database and restore it on the SQL 2000 instance? Thanks.You can use BACKUP and RESTORE or sp_detach_db and sp_attach_db to move the
database. There is lots of "how to" information regarding these commands
available within Books Online.
Keith
"J Jetson" <JJetson@.discussions.microsoft.com> wrote in message
news:101335D5-98F5-498F-8D03-7297BABCDBBE@.microsoft.com...
> There is one lonely database sitting on a SQL Server 7 instance running on
a
> Windows 2000 server. I would like to retire that box and put the database
on
> the new Windows 2003 server running SQL Server 2000. Can I just copy a
backup
> of the SQL 7 database and restore it on the SQL 2000 instance? Thanks.|||Thank you - I have copied databases between servers before, but not between
different versions of SQL Server. I was just checking that I wouldn't have
problems migrating a 7 database to a 2000 version.
Thanks again!
"Keith Kratochvil" wrote:

> You can use BACKUP and RESTORE or sp_detach_db and sp_attach_db to move th
e
> database. There is lots of "how to" information regarding these commands
> available within Books Online.
> --
> Keith
>
> "J Jetson" <JJetson@.discussions.microsoft.com> wrote in message
> news:101335D5-98F5-498F-8D03-7297BABCDBBE@.microsoft.com...
> a
> on
> backup
>|||Migrating from 7.0 to 2000 is fully supported.
You cannot restore or attach a SQL Server 2000 databaes to SQL Server 7. If
you need to move your data from 2000 to 7.0 (or any previous version) you
will need to find another method such as DTS or BCP.
Keith
"J Jetson" <JJetson@.discussions.microsoft.com> wrote in message
news:FFE80829-23E3-456F-AB95-A3B3761C6F96@.microsoft.com...
> Thank you - I have copied databases between servers before, but not
between[vbcol=seagreen]
> different versions of SQL Server. I was just checking that I wouldn't have
> problems migrating a 7 database to a 2000 version.
> Thanks again!
> "Keith Kratochvil" wrote:
>
the[vbcol=seagreen]
commands[vbcol=seagreen]
running on[vbcol=seagreen]
database[vbcol=seagreen]

restore MSSQL 7 backup to MSSQL 2000?

There is one lonely database sitting on a SQL Server 7 instance running on a
Windows 2000 server. I would like to retire that box and put the database on
the new Windows 2003 server running SQL Server 2000. Can I just copy a backup
of the SQL 7 database and restore it on the SQL 2000 instance? Thanks.You can use BACKUP and RESTORE or sp_detach_db and sp_attach_db to move the
database. There is lots of "how to" information regarding these commands
available within Books Online.
--
Keith
"J Jetson" <JJetson@.discussions.microsoft.com> wrote in message
news:101335D5-98F5-498F-8D03-7297BABCDBBE@.microsoft.com...
> There is one lonely database sitting on a SQL Server 7 instance running on
a
> Windows 2000 server. I would like to retire that box and put the database
on
> the new Windows 2003 server running SQL Server 2000. Can I just copy a
backup
> of the SQL 7 database and restore it on the SQL 2000 instance? Thanks.|||Thank you - I have copied databases between servers before, but not between
different versions of SQL Server. I was just checking that I wouldn't have
problems migrating a 7 database to a 2000 version.
Thanks again!
"Keith Kratochvil" wrote:
> You can use BACKUP and RESTORE or sp_detach_db and sp_attach_db to move the
> database. There is lots of "how to" information regarding these commands
> available within Books Online.
> --
> Keith
>
> "J Jetson" <JJetson@.discussions.microsoft.com> wrote in message
> news:101335D5-98F5-498F-8D03-7297BABCDBBE@.microsoft.com...
> > There is one lonely database sitting on a SQL Server 7 instance running on
> a
> > Windows 2000 server. I would like to retire that box and put the database
> on
> > the new Windows 2003 server running SQL Server 2000. Can I just copy a
> backup
> > of the SQL 7 database and restore it on the SQL 2000 instance? Thanks.
>|||Migrating from 7.0 to 2000 is fully supported.
You cannot restore or attach a SQL Server 2000 databaes to SQL Server 7. If
you need to move your data from 2000 to 7.0 (or any previous version) you
will need to find another method such as DTS or BCP.
--
Keith
"J Jetson" <JJetson@.discussions.microsoft.com> wrote in message
news:FFE80829-23E3-456F-AB95-A3B3761C6F96@.microsoft.com...
> Thank you - I have copied databases between servers before, but not
between
> different versions of SQL Server. I was just checking that I wouldn't have
> problems migrating a 7 database to a 2000 version.
> Thanks again!
> "Keith Kratochvil" wrote:
> > You can use BACKUP and RESTORE or sp_detach_db and sp_attach_db to move
the
> > database. There is lots of "how to" information regarding these
commands
> > available within Books Online.
> >
> > --
> > Keith
> >
> >
> > "J Jetson" <JJetson@.discussions.microsoft.com> wrote in message
> > news:101335D5-98F5-498F-8D03-7297BABCDBBE@.microsoft.com...
> > > There is one lonely database sitting on a SQL Server 7 instance
running on
> > a
> > > Windows 2000 server. I would like to retire that box and put the
database
> > on
> > > the new Windows 2003 server running SQL Server 2000. Can I just copy a
> > backup
> > > of the SQL 7 database and restore it on the SQL 2000 instance? Thanks.
> >
> >