Showing posts with label files. Show all posts
Showing posts with label files. Show all posts

Friday, March 30, 2012

restore DB on SQL 2005 multiple files

Hello,

I have a SQL 2000 DB. Current tables in sql 2000 DB are in single file. I am planningto migrate the DB to sql 2005. I am going to partition the tables in sql 2005 and have multiple files. What is the best way to do this? Would backup/restore work? If I restore onto sql 2005 from sql 2000 backup, will the tables spread over different files automatically or not? Any ideas will be appreciated...

Thanks........

Using Backup/Restore may be the 'safest' method to migrate a database. Be sure to rebuild the indexes and update the statistics after restoring.

Once restored, you can add new files for the database.

Refer to this link for the steps to move tables to the new files.

http://sqljunkies.com/HowTo/B9F7F302-964A-4825-9246-6143A8681900.scuk

(And most likely, you really don't want tables to 'stripe' across multiple files.)

restore db from network drive

All of our database servers are doing backups and saving the .bak files out
on a network share. With SQL 2005, how can I point to that share and restore
the database in SQL 2005 environment?
When I do 'restore database --> From Device --> File; when I click the 'ADD;
button, I only see my local drives on the computer. How can I map to my
network share and point to my restore file on the network?Use UNC names: \\servername\sharename\foldername\file.ext. The
account doing the backups - which is to say the account under which
SQL Server is running - needs appropriate rights to the share.
Roy Harvey
Beacon Falls, CT
On Tue, 5 Jun 2007 12:20:10 -0400, "Mike" <Mike@.community.nospam>
wrote:

>All of our database servers are doing backups and saving the .bak files out
>on a network share. With SQL 2005, how can I point to that share and restor
e
>the database in SQL 2005 environment?
>When I do 'restore database --> From Device --> File; when I click the 'ADD
;
>button, I only see my local drives on the computer. How can I map to my
>network share and point to my restore file on the network?
>|||I've tried the UNC path and I get 'network path not found' message
Beacon falls, ct, your in my nekc of the woods.
"Roy Harvey" <roy_harvey@.snet.net> wrote in message
news:km4b63p0q6hco968a82ngn955tgse4eg47@.
4ax.com...[vbcol=seagreen]
> Use UNC names: \\servername\sharename\foldername\file.ext. The
> account doing the backups - which is to say the account under which
> SQL Server is running - needs appropriate rights to the share.
> Roy Harvey
> Beacon Falls, CT
> On Tue, 5 Jun 2007 12:20:10 -0400, "Mike" <Mike@.community.nospam>
> wrote:
>|||Hello,
In the management studio; go to query window and use RESTORE DATABASE
command. Make sure that you start sql server service using
a domain account which has access to remote share.
RESTORE DATABASE <DBNAME> FROM DISK='\\Servername\Share\filename.bak' with
stats=5
Thanks
Hari
"Mike" <Mike@.community.nospam> wrote in message
news:%23xEIwJ5pHHA.1244@.TK2MSFTNGP04.phx.gbl...
> I've tried the UNC path and I get 'network path not found' message
> Beacon falls, ct, your in my nekc of the woods.
>
> "Roy Harvey" <roy_harvey@.snet.net> wrote in message
> news:km4b63p0q6hco968a82ngn955tgse4eg47@.
4ax.com...
>|||On Tue, 5 Jun 2007 12:56:18 -0400, "Mike" <Mike@.community.nospam>
wrote:

>I've tried the UNC path and I get 'network path not found' message
Perhaps it is an access rights problem. A partial test can be done
using xp_cmdshell:
EXEC master..xp_cmdshell 'dir \\servername\sharename\folder\*.*'

>Beacon falls, ct, your in my nekc of the woods.
Cool! If you ever need more hands-on help remember I'm around!
Hari's advice to use a query window is excellent, by the way.
Roy Harvey
Beacon Falls, CT|||Ok, I think I got it, but now I'm getting this message:
'the media set has 2 media families but only 1 are provided. All members
must be provided.'
"Roy Harvey" <roy_harvey@.snet.net> wrote in message
news:89eb631lpobifjd281tdpma4q57sct745h@.
4ax.com...
> On Tue, 5 Jun 2007 12:56:18 -0400, "Mike" <Mike@.community.nospam>
> wrote:
>
> Perhaps it is an access rights problem. A partial test can be done
> using xp_cmdshell:
> EXEC master..xp_cmdshell 'dir \\servername\sharename\folder\*.*'
>
> Cool! If you ever need more hands-on help remember I'm around!
> Hari's advice to use a query window is excellent, by the way.
> Roy Harvey
> Beacon Falls, CT|||Hello,
Did you strip the backup into multiple files? Can you execute RESTORE
LABELONLY (see books online) and see how many files are associated with the
backup.
Thanks
Hari
"Mike" <Mike@.community.nospam> wrote in message
news:u8sG$y6pHHA.2156@.TK2MSFTNGP03.phx.gbl...
> Ok, I think I got it, but now I'm getting this message:
> 'the media set has 2 media families but only 1 are provided. All members
> must be provided.'
>
> "Roy Harvey" <roy_harvey@.snet.net> wrote in message
> news:89eb631lpobifjd281tdpma4q57sct745h@.
4ax.com...
>|||No, one file. and now I can't even backup the SQL 2000 database version to
do a restore from.
This is driving me nuts.
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:%23Ov2b29pHHA.3264@.TK2MSFTNGP04.phx.gbl...
> Hello,
> Did you strip the backup into multiple files? Can you execute RESTORE
> LABELONLY (see books online) and see how many files are associated with
> the backup.
> Thanks
> Hari
> "Mike" <Mike@.community.nospam> wrote in message
> news:u8sG$y6pHHA.2156@.TK2MSFTNGP03.phx.gbl...
>sql

restore db from network drive

All of our database servers are doing backups and saving the .bak files out
on a network share. With SQL 2005, how can I point to that share and restore
the database in SQL 2005 environment?
When I do 'restore database --> From Device --> File; when I click the 'ADD;
button, I only see my local drives on the computer. How can I map to my
network share and point to my restore file on the network?Use UNC names: \\servername\sharename\foldername\file.ext. The
account doing the backups - which is to say the account under which
SQL Server is running - needs appropriate rights to the share.
Roy Harvey
Beacon Falls, CT
On Tue, 5 Jun 2007 12:20:10 -0400, "Mike" <Mike@.community.nospam>
wrote:
>All of our database servers are doing backups and saving the .bak files out
>on a network share. With SQL 2005, how can I point to that share and restore
>the database in SQL 2005 environment?
>When I do 'restore database --> From Device --> File; when I click the 'ADD;
>button, I only see my local drives on the computer. How can I map to my
>network share and point to my restore file on the network?
>|||I've tried the UNC path and I get 'network path not found' message
Beacon falls, ct, your in my nekc of the woods.
"Roy Harvey" <roy_harvey@.snet.net> wrote in message
news:km4b63p0q6hco968a82ngn955tgse4eg47@.4ax.com...
> Use UNC names: \\servername\sharename\foldername\file.ext. The
> account doing the backups - which is to say the account under which
> SQL Server is running - needs appropriate rights to the share.
> Roy Harvey
> Beacon Falls, CT
> On Tue, 5 Jun 2007 12:20:10 -0400, "Mike" <Mike@.community.nospam>
> wrote:
>>All of our database servers are doing backups and saving the .bak files
>>out
>>on a network share. With SQL 2005, how can I point to that share and
>>restore
>>the database in SQL 2005 environment?
>>When I do 'restore database --> From Device --> File; when I click the
>>'ADD;
>>button, I only see my local drives on the computer. How can I map to my
>>network share and point to my restore file on the network?
>>|||Hello,
In the management studio; go to query window and use RESTORE DATABASE
command. Make sure that you start sql server service using
a domain account which has access to remote share.
RESTORE DATABASE <DBNAME> FROM DISK='\\Servername\Share\filename.bak' with
stats=5
Thanks
Hari
"Mike" <Mike@.community.nospam> wrote in message
news:%23xEIwJ5pHHA.1244@.TK2MSFTNGP04.phx.gbl...
> I've tried the UNC path and I get 'network path not found' message
> Beacon falls, ct, your in my nekc of the woods.
>
> "Roy Harvey" <roy_harvey@.snet.net> wrote in message
> news:km4b63p0q6hco968a82ngn955tgse4eg47@.4ax.com...
>> Use UNC names: \\servername\sharename\foldername\file.ext. The
>> account doing the backups - which is to say the account under which
>> SQL Server is running - needs appropriate rights to the share.
>> Roy Harvey
>> Beacon Falls, CT
>> On Tue, 5 Jun 2007 12:20:10 -0400, "Mike" <Mike@.community.nospam>
>> wrote:
>>All of our database servers are doing backups and saving the .bak files
>>out
>>on a network share. With SQL 2005, how can I point to that share and
>>restore
>>the database in SQL 2005 environment?
>>When I do 'restore database --> From Device --> File; when I click the
>>'ADD;
>>button, I only see my local drives on the computer. How can I map to my
>>network share and point to my restore file on the network?
>>
>|||On Tue, 5 Jun 2007 12:56:18 -0400, "Mike" <Mike@.community.nospam>
wrote:
>I've tried the UNC path and I get 'network path not found' message
Perhaps it is an access rights problem. A partial test can be done
using xp_cmdshell:
EXEC master..xp_cmdshell 'dir \\servername\sharename\folder\*.*'
>Beacon falls, ct, your in my nekc of the woods.
Cool! If you ever need more hands-on help remember I'm around!
Hari's advice to use a query window is excellent, by the way.
Roy Harvey
Beacon Falls, CT|||Ok, I think I got it, but now I'm getting this message:
'the media set has 2 media families but only 1 are provided. All members
must be provided.'
"Roy Harvey" <roy_harvey@.snet.net> wrote in message
news:89eb631lpobifjd281tdpma4q57sct745h@.4ax.com...
> On Tue, 5 Jun 2007 12:56:18 -0400, "Mike" <Mike@.community.nospam>
> wrote:
>>I've tried the UNC path and I get 'network path not found' message
> Perhaps it is an access rights problem. A partial test can be done
> using xp_cmdshell:
> EXEC master..xp_cmdshell 'dir \\servername\sharename\folder\*.*'
>>Beacon falls, ct, your in my nekc of the woods.
> Cool! If you ever need more hands-on help remember I'm around!
> Hari's advice to use a query window is excellent, by the way.
> Roy Harvey
> Beacon Falls, CT|||Hello,
Did you strip the backup into multiple files? Can you execute RESTORE
LABELONLY (see books online) and see how many files are associated with the
backup.
Thanks
Hari
"Mike" <Mike@.community.nospam> wrote in message
news:u8sG$y6pHHA.2156@.TK2MSFTNGP03.phx.gbl...
> Ok, I think I got it, but now I'm getting this message:
> 'the media set has 2 media families but only 1 are provided. All members
> must be provided.'
>
> "Roy Harvey" <roy_harvey@.snet.net> wrote in message
> news:89eb631lpobifjd281tdpma4q57sct745h@.4ax.com...
>> On Tue, 5 Jun 2007 12:56:18 -0400, "Mike" <Mike@.community.nospam>
>> wrote:
>>I've tried the UNC path and I get 'network path not found' message
>> Perhaps it is an access rights problem. A partial test can be done
>> using xp_cmdshell:
>> EXEC master..xp_cmdshell 'dir \\servername\sharename\folder\*.*'
>>Beacon falls, ct, your in my nekc of the woods.
>> Cool! If you ever need more hands-on help remember I'm around!
>> Hari's advice to use a query window is excellent, by the way.
>> Roy Harvey
>> Beacon Falls, CT
>|||No, one file. and now I can't even backup the SQL 2000 database version to
do a restore from.
This is driving me nuts.
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:%23Ov2b29pHHA.3264@.TK2MSFTNGP04.phx.gbl...
> Hello,
> Did you strip the backup into multiple files? Can you execute RESTORE
> LABELONLY (see books online) and see how many files are associated with
> the backup.
> Thanks
> Hari
> "Mike" <Mike@.community.nospam> wrote in message
> news:u8sG$y6pHHA.2156@.TK2MSFTNGP03.phx.gbl...
>> Ok, I think I got it, but now I'm getting this message:
>> 'the media set has 2 media families but only 1 are provided. All members
>> must be provided.'
>>
>> "Roy Harvey" <roy_harvey@.snet.net> wrote in message
>> news:89eb631lpobifjd281tdpma4q57sct745h@.4ax.com...
>> On Tue, 5 Jun 2007 12:56:18 -0400, "Mike" <Mike@.community.nospam>
>> wrote:
>>I've tried the UNC path and I get 'network path not found' message
>> Perhaps it is an access rights problem. A partial test can be done
>> using xp_cmdshell:
>> EXEC master..xp_cmdshell 'dir \\servername\sharename\folder\*.*'
>>Beacon falls, ct, your in my nekc of the woods.
>> Cool! If you ever need more hands-on help remember I'm around!
>> Hari's advice to use a query window is excellent, by the way.
>> Roy Harvey
>> Beacon Falls, CT
>>
>

Restore DB from mdf and ldf

Hello,
i have an mdf and ldf file, is there any way to restore the DB from these two files? ( sp_detach_db is not used)
Pl discussUse sp_attach_db system stored procedure.

OR

Open Enterprise Manager -> Databases -> Right Mouse Key -> All Tasks -> Attach Database.

If you have Backup file than use Restore Backup from query analyzer.

For more information explore Books OnLine from query analyzer...|||i mentioned in my first post. the sp_detach_db is not used. so i cannot attach the db by a call to sp_attach_db

--|||i mentioned in my first post. the sp_detach_db is not used. so i cannot attach the db by a call to sp_attach_db

Can you describe your problem in detail instead of ambiguous information..?|||i mentioned in my first post. the sp_detach_db is not used. so i cannot attach the db by a call to sp_attach_db
--
why is that so?? Help us...|||Restore specific files or filegroups:

RESTORE DATABASE {database_name | @.database_name_var}
<file_or_filegroup> [,...n]
[FROM <backup_device> [,...n]]
[WITH
[DBO_ONLY]
[[,] FILE = file_number]
[[,] MEDIANAME = {media_name | @.media_name_variable}]
[[,] NORECOVERY]
[[,] {NOUNLOAD | UNLOAD}]
[[,] REPLACE]
[[,] RESTART]
[[,] STATS [= percentage]]

For more info try reading this...

http://doc.ddart.net/mssql/sql70/ra-rz_9.htm|||Restore specific files or filegroups:

RESTORE DATABASE {database_name | @.database_name_var}
<file_or_filegroup> [,...n]
[FROM <backup_device> [,...n]]
[WITH
[DBO_ONLY]
[[,] FILE = file_number]
[[,] MEDIANAME = {media_name | @.media_name_variable}]
[[,] NORECOVERY]
[[,] {NOUNLOAD | UNLOAD}]
[[,] REPLACE]
[[,] RESTART]
[[,] STATS [= percentage]]

For more info try reading this...

http://doc.ddart.net/mssql/sql70/ra-rz_9.htm

yeah that works with backup files. for mdf's and ldfs, you use sp_attach_db, but this guy will not giving us the error he is getting so he is getting ignored.|||Hello ppl,

this is not a real life scenario, i was thinking whether i can copy the mdf and ldf file from a DB server and copy it to another machine, and try to restore the Db, from these two files ( i am not taking a backup or detaching the original DB). my question is, whether i can copy the mdf and ldf files to another system, and restore the DB there.

most of the info in wed says that i have to detach the db and attach it in the destination. i just want to know whether any other mechanism is there to restore the db from copied mdf and ldf files

im using MS SQL 2k|||was thinking whether i can copy the mdf and ldf file from a DB server and copy it to another machine, and try to restore the Db, from these two files ( i am not taking a backup or detaching the original DB). my question is, whether i can copy the mdf and ldf files to another system, and restore the DB there.
you can attach .mdf / .ldf files using EXEC SP_ATTACH_DB

most of the info in wed says that i have to detach the db and attach it in the destination. i just want to know whether any other mechanism is there to restore the db from copied mdf and ldf files.
You need to use SP_DETACH_DB, if database is on-line (i.e. in use). If any user is using database than SQL Server will gives you an error for same.

It's quite not necessary that first you have to use sp_detach_db then sp_attach_db stored procedures (As you have written in your previous post), unless your database is online.

Instead of detach then attach database use backup - restore. Backup - Restore will not hurt database availability.

Remember in SQL every command is made for some special purpose. Refer Book OnLine from query analyzer.

And the most important thing : Be Explanatory, specially when you are asking someones help...|||If you copy the datafiles while the server is running, you will likely get junk, unless the database is very small. Even then, you are not guaranteed anything. If you shut down SQL Server entirely, then you can get a consistent set of files. This is usually called a "cold backup", and is extremely rare in the SQL Server world.|||If you copy the datafiles while the server is running, you will likely get junk, unless the database is very small. Even then, you are not guaranteed anything.
We can not copy database while database is 'ONLINE' on the server, if you try SQL Server will gives you 'database being in use' error for same.

If you shut down SQL Server entirely, then you can get a consistent set of files.
For copying single database we don't need to shutdown entire SQL Server, just put the database offline & copy your database.

-- Make sure no any user is using database, else this will not work.
-- Run this command from query analyzer.

-- this will put the database offline.

use Master
GO
sp_dboption 'pubs', 'offline', 'True'

-- Bring database online.

sp_dboption 'pubs', 'offline', 'False'|||While I have not actually tried it, I think xcopy will give you a file regardless of the file being in use. This tends to lead some administrators to think they have a backup solution, when they really do not. Some backup packages may also be able to back up open files, which also leads to this mistaken impression.

Wednesday, March 28, 2012

Restore db and logs from device to a point in time

When restoring a database and log files from a device the point in time
option disappears. How do I restore from a device to a point in time? Is
there an easy way to restore multiple logs from a device? It seems like
doing them one at a time is the only option and it's quite a pain.I recommend that you familiar yourself with the RESTORE command so you can
do this from Query Analyzer.
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"David Morrison" <me@.nospam.com> wrote in message
news:uof2WquuDHA.1596@.TK2MSFTNGP10.phx.gbl...
> When restoring a database and log files from a device the point in time
> option disappears. How do I restore from a device to a point in time? Is
> there an easy way to restore multiple logs from a device? It seems like
> doing them one at a time is the only option and it's quite a pain.
>

Restore Databases in AS 2005 from CAB Files created in AS 2000

I have to restore some analysis services 2000 databases on AS 2005.

Is there some tool which can perform this?

Mathew,

To migrate AS2000 databases to AS2005, you can use the Migration Wizard (MigrationWizard.exe). For more info, please see: <http://msdn2.microsoft.com/en-us/library/ms143409.aspx>.

Hope this helps,

Artur

|||

I have CAB files being created by another team. Previously i used to restore them on my SQL 2000 Analysis Services using msmdarch.

Now i am planning to upgrade to SQL server 2005. But the team which creates the CAB files will continue to be on SQL 2000 Analysis Services for at least 6 months.

Therefore migrationwizard will not be helpful in my case. (I don't have access to their SQL Server or Analysis Server databases)

|||

If your machine already has AS2000 installed, you could install AS2005 on the same machine as a named instance and then restore the CAB files onto your local AS2000 server and use the migration wizard to migrate these databases from your AS2000 instance to the AS2005 instance on the same machine.

--Artur

|||

Hello,

I understand that the solution of Artur will work, if you have access to the relational database from which the cube is calculated because when you finish migrate the cube it has to be recalculated. I have the same problem (a few cubes that I′d like to try in 2005, but I don′t posess the access to the relational database). Is there any way of migrating the cab without the access to the relational db?

Regards

Monday, March 26, 2012

Restore Database with Multiple Files

All
I have a database with multiple files ie. an mdf and two ndf. I have
performed a full database backup using BACKUP DATABASE dbname to DISK =
'filename' and I would like to restore the database to another server and
only have one file ie. PRIMARY mdf instead of the three files. Can anyone
advise how this can be achieved.
Thanks
That is not possible. A SQL Server backup is more or less a binary dump if the data pages, so SQL
Server need to put each page in the same file and on the same page address (as other pages might be
pointing to this page). Restore as original, and do the shuffling after the restore. Or do the
shuffling before the backup.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"David" <David@.discussions.microsoft.com> wrote in message
news:89EB659B-C421-4DB2-BB1B-17D30C6CFB8A@.microsoft.com...
> All
> I have a database with multiple files ie. an mdf and two ndf. I have
> performed a full database backup using BACKUP DATABASE dbname to DISK =
> 'filename' and I would like to restore the database to another server and
> only have one file ie. PRIMARY mdf instead of the three files. Can anyone
> advise how this can be achieved.
> Thanks
>

Restore Database with Multiple Files

All
I have a database with multiple files ie. an mdf and two ndf. I have
performed a full database backup using BACKUP DATABASE dbname to DISK =
'filename' and I would like to restore the database to another server and
only have one file ie. PRIMARY mdf instead of the three files. Can anyone
advise how this can be achieved.
ThanksThat is not possible. A SQL Server backup is more or less a binary dump if t
he data pages, so SQL
Server need to put each page in the same file and on the same page address (
as other pages might be
pointing to this page). Restore as original, and do the shuffling after the
restore. Or do the
shuffling before the backup.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"David" <David@.discussions.microsoft.com> wrote in message
news:89EB659B-C421-4DB2-BB1B-17D30C6CFB8A@.microsoft.com...
> All
> I have a database with multiple files ie. an mdf and two ndf. I have
> performed a full database backup using BACKUP DATABASE dbname to DISK =
> 'filename' and I would like to restore the database to another server and
> only have one file ie. PRIMARY mdf instead of the three files. Can anyone
> advise how this can be achieved.
> Thanks
>

Restore Database with Multiple Files

All
I have a database with multiple files ie. an mdf and two ndf. I have
performed a full database backup using BACKUP DATABASE dbname to DISK = 'filename' and I would like to restore the database to another server and
only have one file ie. PRIMARY mdf instead of the three files. Can anyone
advise how this can be achieved.
ThanksThat is not possible. A SQL Server backup is more or less a binary dump if the data pages, so SQL
Server need to put each page in the same file and on the same page address (as other pages might be
pointing to this page). Restore as original, and do the shuffling after the restore. Or do the
shuffling before the backup.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"David" <David@.discussions.microsoft.com> wrote in message
news:89EB659B-C421-4DB2-BB1B-17D30C6CFB8A@.microsoft.com...
> All
> I have a database with multiple files ie. an mdf and two ndf. I have
> performed a full database backup using BACKUP DATABASE dbname to DISK => 'filename' and I would like to restore the database to another server and
> only have one file ie. PRIMARY mdf instead of the three files. Can anyone
> advise how this can be achieved.
> Thanks
>sql

RESTORE DATABASE Timeout in SQL 2000 with large backup files

Hello,

I am attempting to restore the database from within VB.NET application I am making the following 3 calls:

RESTORE FileListOnly FROM DISK = 'C:\MyDatabase.dat'

USE Master RESTORE DATABASE MyDatabase FROM DISK = 'C:\MyDatabase.dat' WITH NORECOVERY, MOVE 'MyDatabase' TO 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\MyDatabase.mdf', MOVE 'MyDatabase_log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\LDF\MyDatabase.ldf', REPLACE


RESTORE DATABASE MyDatabase FROM DISK = 'C:\MyDatabase.dat'

using SMO. This logic works fine with small *.dat files, however when using *.dat file of about 4Gb I get an error on the 3d restore database call:

ExecuteNonQuery failed for Database 'master'.

An exception occurred while executing a Transact-SQL statement or batch.

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Operator aborted backup or restore. See the error messages returned to the console for more details.

ExecuteNonQuery failed for Database 'master'.

An exception occurred while executing a Transact-SQL statement or batch.

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Operator aborted backup or restore. See the error messages returned to the console for more details.

The same program/logic also works fine when I use MS SQL 2005 and it runs fine from MS SQL 2005 Query Analyzer for both 2005 and 2000 databases. There seem to be only problem with MS SQL 2000 from within VB.NET. Anybody has any idea? I'd appreciate any response. Thanks

Eugene

Have you tried changing the timeout setting of the ADO.NET Command?

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||

As Wesley indicated you should change the query timeout.

SQL 2000 does not have fast file initialization so it can take awhile to create and initialize the files.

|||

Yes I forgot to mention. The object which executes query is SMO.Database and it runs

Smo.Database.ExecuteNonQuery(sSQL)

So I set the timeout on the Smo.Server.Connection = 0.

I've also tried to set it to Smo.Server.Connection=3600 but the timeout occure in about 12 min so

sorry It did not help...

|||

For those of you who might be looking for answer to the similar problem - I found the solution. SMO has StatementTimeout property. This is different from the one I was trying to change - which was a Connection timeout.

That is the one which needed to be increased.

I do appreciate the responses to my post though. It helped. Thanks

sql

RESTORE DATABASE Timeout in SQL 2000 with large backup files

Hello,

I am attempting to restore the database from within VB.NET application I am making the following 3 calls:

RESTORE FileListOnly FROM DISK = 'C:\MyDatabase.dat'

USE Master RESTORE DATABASE MyDatabase FROM DISK = 'C:\MyDatabase.dat' WITH NORECOVERY, MOVE 'MyDatabase' TO 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\MyDatabase.mdf', MOVE 'MyDatabase_log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\LDF\MyDatabase.ldf', REPLACE


RESTORE DATABASE MyDatabase FROM DISK = 'C:\MyDatabase.dat'

using SMO. This logic works fine with small *.dat files, however when using *.dat file of about 4Gb I get an error on the 3d restore database call:

ExecuteNonQuery failed for Database 'master'.

An exception occurred while executing a Transact-SQL statement or batch.

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Operator aborted backup or restore. See the error messages returned to the console for more details.

ExecuteNonQuery failed for Database 'master'.

An exception occurred while executing a Transact-SQL statement or batch.

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Operator aborted backup or restore. See the error messages returned to the console for more details.

The same program/logic also works fine when I use MS SQL 2005 and it runs fine from MS SQL 2005 Query Analyzer for both 2005 and 2000 databases. There seem to be only problem with MS SQL 2000 from within VB.NET. Anybody has any idea? I'd appreciate any response. Thanks

Eugene

Have you tried changing the timeout setting of the ADO.NET Command?

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||

As Wesley indicated you should change the query timeout.

SQL 2000 does not have fast file initialization so it can take awhile to create and initialize the files.

|||

Yes I forgot to mention. The object which executes query is SMO.Database and it runs

Smo.Database.ExecuteNonQuery(sSQL)

So I set the timeout on the Smo.Server.Connection = 0.

I've also tried to set it to Smo.Server.Connection=3600 but the timeout occure in about 12 min so

sorry It did not help...

|||

For those of you who might be looking for answer to the similar problem - I found the solution. SMO has StatementTimeout property. This is different from the one I was trying to change - which was a Connection timeout.

That is the one which needed to be increased.

I do appreciate the responses to my post though. It helped. Thanks

Restore database stuck on (Loading)

I recently installed MSDE on a laptop. I then restored several databases from backup files without problem. However, one database is constantly stuck at the grey colour displaying the (Loading) message.

Why won't this database restore ? It is of course the most important database and I only have the one backup file.

This only appears to fail on his server. Do I need to uninstall MSDE and start over ?It's probably the machine's "critical need detector", it might be a wee bit too sensitive or mis-adjusted.

On a slightly more serious note, what tools are you using to do the restore? The only tool that could do a restore that ships with MSDE is OSQL.EXE, and I'm pretty comfortable that you aren't using that! Enterprise Mangler would be my first guess, but that is still only a guess.

Could the dump (backup) have been made with a later service pack than you are using to restore it? That can make things get really crabby sometimes.

Is the database file one that this instance of MSDE can handle? Depending on the MSDE version, you can handle up to 2 Gb of data (although I've seen data and log dumps over 10 Gb).

If none of those ideas pan out, then my first suggestion would be to:

1 Disable everything you can that uses MSDE (keep notes!)
2 Stop the MSDE service
3 Restart the MSDE service
4 Try to load the offending database
5 If you can't load the database, stop the MSDE service
6 Examine the Errorlog file carefully
7 If you can't find anything in the Errorlog, consider posting it here.
8 if the database can be posted, consider posting the backup too for us to play with!

-PatP|||If it's in Loading state, could it be that you are restoring from a backup device that contained incomplete set of full db backup and some trx logs?|||But it restores without fail on any number of other servers. So I think the backup file is ok.

I have gone through the steps above and can't see anything wrong. I have pasted the errorlog below for perusal.

Yes I am using Enterprise manager. I also tried the restore database command from isqlw utility and that also produced the error :

Processed 8432 pages for database 'IPSHOW_NEW', file 'IPSHOW_Data' on file 1.
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionRead (WrapperRead()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.
Processed 1 pages for database 'IPSHOW_NEW', file 'IPSHOW_Log' on file 1.

Connection Broken

Errorlog
2004-12-23 15:56:36.01 server Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation
Personal Edition on Windows NT 5.1 (Build 2600: Service Pack 2)

2004-12-23 15:56:36.01 server Copyright (C) 1988-2002 Microsoft Corporation.
2004-12-23 15:56:36.01 server All rights reserved.
2004-12-23 15:56:36.01 server Server Process ID is 1392.
2004-12-23 15:56:36.01 server Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL\log\ERRORLOG'.
2004-12-23 15:56:36.09 server SQL Server is starting at priority class 'normal'(1 CPU detected).
2004-12-23 15:56:36.13 server SQL Server configured for thread mode processing.
2004-12-23 15:56:36.13 server Using dynamic lock allocation. [500] Lock Blocks, [1000] Lock Owner Blocks.
2004-12-23 15:56:36.15 spid3 Starting up database 'master'.
2004-12-23 15:56:36.53 server Using 'SSNETLIB.DLL' version '8.0.766'.
2004-12-23 15:56:36.53 spid5 Starting up database 'model'.
2004-12-23 15:56:36.68 spid3 Server name is 'SBUTLER'.
2004-12-23 15:56:36.68 spid3 Skipping startup of clean database id 4
2004-12-23 15:56:36.68 spid3 Skipping startup of clean database id 5
2004-12-23 15:56:36.68 spid3 Skipping startup of clean database id 6
2004-12-23 15:56:36.68 spid3 Skipping startup of clean database id 9
2004-12-23 15:56:36.68 spid3 Skipping startup of clean database id 10
2004-12-23 15:56:36.68 spid3 Starting up database 'IPSHOW_NEW'.
2004-12-23 15:56:36.68 server SQL server listening on 192.168.1.110: 1433.
2004-12-23 15:56:36.69 server SQL server listening on 127.0.0.1: 1433.
2004-12-23 15:56:36.98 spid3 Bypassing recovery for database 'IPSHOW_NEW' because it is marked IN LOAD.
2004-12-23 15:56:37.09 server SQL server listening on TCP, Shared Memory, Named Pipes.
2004-12-23 15:56:37.09 server SQL Server is ready for client connections
2004-12-23 15:56:37.22 spid5 Clearing tempdb database.
2004-12-23 15:56:38.58 spid5 Starting up database 'tempdb'.
2004-12-23 15:56:38.78 spid3 Recovery complete.
2004-12-23 15:56:38.78 spid3 SQL global counter collection task is created.
2004-12-23 15:57:35.63 spid51 Using 'xpstar.dll' version '2000.80.760' to execute extended stored procedure 'sp_MSgetversion'.
2004-12-23 15:57:35.78 spid51 Starting up database 'msdb'.|||Post the statement used in ISQL to restore the database.
And ensure the backup file is stored on the MSDE server and if you are trying to restore from a network location due to th network issues it may be failing with the above error.

Refer to this KBA http://support.microsoft.com/default.aspx?scid=kb;en-us;827452 for relevancy.|||I gave up and uninstalled MSDE. As it turns out he required Reporting Services and a Developer Edition of SQL Server so all for the best in the end. Thanks for the assistance.

Friday, March 23, 2012

RESTORE DATABASE is terminating abnormally.

Hello,

I am getting the rather odd error below; hope you can help.

RESTORE DATABASE is terminating abnormally. File 'C:\Program Files\Microsoft
SQL Server\MSSQL.1\MSSQL\Data\trial_44testingc' is claimed by
'sysft_KB_SearchAssetsCatalog'(65540) and 'sysft_KB_SearchCatalog'(65537).
The WITH MOVE clause can be used to relocate one or more files.

I get this from an app our company uses to programatically restore
databases. Below are the queries we are using:

Create database trial_44testingc
select COUNT(*) as TOTAL from sysdatabases where name = 'trial_44testingc'
RESTORE FILELISTONLY FROM disk =
'C:\HostedTrialManagement\AppSource\db\43_trialmas ter'
RESTORE DATABASE trial_44testingc FROM disk =
'C:\HostedTrialManagement\AppSource\db\43_trialmas ter' WITH RECOVERY , MOVE
'43_trialmaster' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\trial_44testingc.mdf', MOVE '43_trialmaster_log'
TO 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\trial_44testingc.ldf', MOVE
'sysft_KB_SearchCatalog' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\trial_44testingc', MOVE
'sysft_KB_SearchTicketsCatalog' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\trial_44testingc', MOVE
'sysft_KB_SearchTicketsCatalog2' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\trial_44testingc', MOVE
'sysft_KB_SearchAssetsCatalog' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\trial_44testingc'

This had been working great until I made some updates to the table structure
of the db and created a new backup.

Any ideas?

TIA
JakeGitarJake (spamaintme@.oz.net) writes:

Quote:

Originally Posted by

I am getting the rather odd error below; hope you can help.
>
RESTORE DATABASE is terminating abnormally. File 'C:\Program
Files\Microsoft
SQL Server\MSSQL.1\MSSQL\Data\trial_44testingc' is claimed by
'sysft_KB_SearchAssetsCatalog'(65540) and 'sysft_KB_SearchCatalog'(65537).
The WITH MOVE clause can be used to relocate one or more files.


I would not say that this is particularly odd, given:

Quote:

Originally Posted by

'sysft_KB_SearchCatalog' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\trial_44testingc', MOVE
'sysft_KB_SearchTicketsCatalog' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\trial_44testingc', MOVE
'sysft_KB_SearchTicketsCatalog2' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\trial_44testingc', MOVE
'sysft_KB_SearchAssetsCatalog' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\trial_44testingc'


You are trying to place three logical files on the same physical file. That
cannot work out well.

Seems like you need to talk with the person/vendor who wrote the app
that runs your RESTORE commands.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

RESTORE DATABASE is terminating abnormally

Hello,
I am getting the rather odd error below; hope you can help.
RESTORE DATABASE is terminating abnormally. File 'C:\Program Files\Microsoft
SQL Server\MSSQL.1\MSSQL\Data\trial_44testingc' is claimed by
'sysft_KB_SearchAssetsCatalog'(65540) and 'sysft_KB_SearchCatalog'(65537).
The WITH MOVE clause can be used to relocate one or more files.
I get this from an app our company uses to programatically restore
databases. Below are the queries we are using:
Create database trial_44testingc
select COUNT(*) as TOTAL from sysdatabases where name = 'trial_44testingc'
RESTORE FILELISTONLY FROM disk =
'C:\HostedTrialManagement\AppSource\db\43_trialmas ter'
RESTORE DATABASE trial_44testingc FROM disk =
'C:\HostedTrialManagement\AppSource\db\43_trialmas ter' WITH RECOVERY , MOVE
'43_trialmaster' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\trial_44testingc.mdf', MOVE '43_trialmaster_log'
TO 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\trial_44testingc.ldf', MOVE
'sysft_KB_SearchCatalog' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\trial_44testingc', MOVE
'sysft_KB_SearchTicketsCatalog' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\trial_44testingc', MOVE
'sysft_KB_SearchTicketsCatalog2' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\trial_44testingc', MOVE
'sysft_KB_SearchAssetsCatalog' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\trial_44testingc'
This had been working great until I made some updates to the table structure
of the db and creeated a new backup.
Any ideas?
TIA
Jake
Can you try this?
Create database trial_44testingc
select COUNT(*) as TOTAL from sysdatabases where name = 'trial_44testingc'
RESTORE FILELISTONLY FROM disk =
'C:\HostedTrialManagement\AppSource\db\43_trialmas ter'
RESTORE DATABASE trial_44testingc FROM disk =
'C:\HostedTrialManagement\AppSource\db\43_trialmas ter' WITH RECOVERY , MOVE
'43_trialmaster' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\trial_44testingc.mdf', MOVE '43_trialmaster_log'
TO 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\trial_44testingc.ldf', MOVE
'sysft_KB_SearchCatalog' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\trial_44testingc1', MOVE
'sysft_KB_SearchTicketsCatalog' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\trial_44testingc2', MOVE
'sysft_KB_SearchTicketsCatalog2' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\trial_44testingc3', MOVE
'sysft_KB_SearchAssetsCatalog' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\trial_44testingc4'
"GitarJake" <spamaintme@.oz.net> wrote in message
news:j0zVh.17257$OT4.12355@.newsfe19.lga...
> Hello,
> I am getting the rather odd error below; hope you can help.
> RESTORE DATABASE is terminating abnormally. File 'C:\Program
> Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\trial_44testingc' is claimed
> by 'sysft_KB_SearchAssetsCatalog'(65540) and
> 'sysft_KB_SearchCatalog'(65537). The WITH MOVE clause can be used to
> relocate one or more files.
> I get this from an app our company uses to programatically restore
> databases. Below are the queries we are using:
> Create database trial_44testingc
> select COUNT(*) as TOTAL from sysdatabases where name = 'trial_44testingc'
> RESTORE FILELISTONLY FROM disk =
> 'C:\HostedTrialManagement\AppSource\db\43_trialmas ter'
> RESTORE DATABASE trial_44testingc FROM disk =
> 'C:\HostedTrialManagement\AppSource\db\43_trialmas ter' WITH RECOVERY ,
> MOVE '43_trialmaster' TO 'C:\Program Files\Microsoft SQL
> Server\MSSQL.1\MSSQL\Data\trial_44testingc.mdf', MOVE '43_trialmaster_log'
> TO 'C:\Program Files\Microsoft SQL
> Server\MSSQL.1\MSSQL\Data\trial_44testingc.ldf', MOVE
> 'sysft_KB_SearchCatalog' TO 'C:\Program Files\Microsoft SQL
> Server\MSSQL.1\MSSQL\Data\trial_44testingc', MOVE
> 'sysft_KB_SearchTicketsCatalog' TO 'C:\Program Files\Microsoft SQL
> Server\MSSQL.1\MSSQL\Data\trial_44testingc', MOVE
> 'sysft_KB_SearchTicketsCatalog2' TO 'C:\Program Files\Microsoft SQL
> Server\MSSQL.1\MSSQL\Data\trial_44testingc', MOVE
> 'sysft_KB_SearchAssetsCatalog' TO 'C:\Program Files\Microsoft SQL
> Server\MSSQL.1\MSSQL\Data\trial_44testingc'
> This had been working great until I made some updates to the table
> structure of the db and creeated a new backup.
> Any ideas?
> TIA
> Jake
>
>

Restore database from only log file (.ldf) no backup

I have a log file for a database, the .mdf file was deleted, there are no
backup files for the database. How can I use the log file to restore the
database?
Basically you can't. The log file generally does not include all the
information to recreate an entire database. That is why backups are so
important.
Did you try UNDELETE at the OS level or from Norton?
Andrew J. Kelly SQL MVP
"g2g" <g2g@.discussions.microsoft.com> wrote in message
news:C071BFAB-22FC-482C-A4BD-FF4FEC8452E7@.microsoft.com...
>I have a log file for a database, the .mdf file was deleted, there are no
> backup files for the database. How can I use the log file to restore the
> database?
|||Thanks Andrew, I have a script to recreate the database and the table, it
only had a single table.. I recreated the database and the table but now
can't figure out how to get the transactions in from the saved log file. Yes
tried undelete - its not there.
"Andrew J. Kelly" wrote:

> Basically you can't. The log file generally does not include all the
> information to recreate an entire database. That is why backups are so
> important.
> Did you try UNDELETE at the OS level or from Norton?
> --
> Andrew J. Kelly SQL MVP
>
> "g2g" <g2g@.discussions.microsoft.com> wrote in message
> news:C071BFAB-22FC-482C-A4BD-FF4FEC8452E7@.microsoft.com...
>
>
|||> Thanks Andrew, I have a script to recreate the database and the table, it
> only had a single table.. I recreated the database and the table but now
> can't figure out how to get the transactions in from the saved log file.
Yes
> tried undelete - its not there.
You could try to use Log Explorer - check www.lumigent.com.
Dejan Sarka, SQL Server MVP
Associate Mentor
www.SolidQualityLearning.com
|||If you still have all the information in the log you may be able to get it
back with some 3rd party tools. One is www.lumigent.com as Dejan mentioned
and another I know of is available at http://www.logpi.com/.
Andrew J. Kelly SQL MVP
"g2g" <g2g@.discussions.microsoft.com> wrote in message
news:1E042AAC-2F02-4BEF-A103-4B7830ED771D@.microsoft.com...[vbcol=seagreen]
> Thanks Andrew, I have a script to recreate the database and the table, it
> only had a single table.. I recreated the database and the table but now
> can't figure out how to get the transactions in from the saved log file.
> Yes
> tried undelete - its not there.
> "Andrew J. Kelly" wrote:

Restore database from only log file (.ldf) no backup

I have a log file for a database, the .mdf file was deleted, there are no
backup files for the database. How can I use the log file to restore the
database?Basically you can't. The log file generally does not include all the
information to recreate an entire database. That is why backups are so
important.
Did you try UNDELETE at the OS level or from Norton?
--
Andrew J. Kelly SQL MVP
"g2g" <g2g@.discussions.microsoft.com> wrote in message
news:C071BFAB-22FC-482C-A4BD-FF4FEC8452E7@.microsoft.com...
>I have a log file for a database, the .mdf file was deleted, there are no
> backup files for the database. How can I use the log file to restore the
> database?|||Thanks Andrew, I have a script to recreate the database and the table, it
only had a single table.. I recreated the database and the table but now
can't figure out how to get the transactions in from the saved log file. Yes
tried undelete - its not there.
"Andrew J. Kelly" wrote:
> Basically you can't. The log file generally does not include all the
> information to recreate an entire database. That is why backups are so
> important.
> Did you try UNDELETE at the OS level or from Norton?
> --
> Andrew J. Kelly SQL MVP
>
> "g2g" <g2g@.discussions.microsoft.com> wrote in message
> news:C071BFAB-22FC-482C-A4BD-FF4FEC8452E7@.microsoft.com...
> >I have a log file for a database, the .mdf file was deleted, there are no
> > backup files for the database. How can I use the log file to restore the
> > database?
>
>|||> Thanks Andrew, I have a script to recreate the database and the table, it
> only had a single table.. I recreated the database and the table but now
> can't figure out how to get the transactions in from the saved log file.
Yes
> tried undelete - its not there.
You could try to use Log Explorer - check www.lumigent.com.
--
Dejan Sarka, SQL Server MVP
Associate Mentor
www.SolidQualityLearning.com|||If you still have all the information in the log you may be able to get it
back with some 3rd party tools. One is www.lumigent.com as Dejan mentioned
and another I know of is available at http://www.logpi.com/.
--
Andrew J. Kelly SQL MVP
"g2g" <g2g@.discussions.microsoft.com> wrote in message
news:1E042AAC-2F02-4BEF-A103-4B7830ED771D@.microsoft.com...
> Thanks Andrew, I have a script to recreate the database and the table, it
> only had a single table.. I recreated the database and the table but now
> can't figure out how to get the transactions in from the saved log file.
> Yes
> tried undelete - its not there.
> "Andrew J. Kelly" wrote:
>> Basically you can't. The log file generally does not include all the
>> information to recreate an entire database. That is why backups are so
>> important.
>> Did you try UNDELETE at the OS level or from Norton?
>> --
>> Andrew J. Kelly SQL MVP
>>
>> "g2g" <g2g@.discussions.microsoft.com> wrote in message
>> news:C071BFAB-22FC-482C-A4BD-FF4FEC8452E7@.microsoft.com...
>> >I have a log file for a database, the .mdf file was deleted, there are
>> >no
>> > backup files for the database. How can I use the log file to restore
>> > the
>> > database?
>>

Restore database from only log file (.ldf) no backup

I have a log file for a database, the .mdf file was deleted, there are no
backup files for the database. How can I use the log file to restore the
database?Basically you can't. The log file generally does not include all the
information to recreate an entire database. That is why backups are so
important.
Did you try UNDELETE at the OS level or from Norton?
--
Andrew J. Kelly SQL MVP
"g2g" <g2g@.discussions.microsoft.com> wrote in message
news:C071BFAB-22FC-482C-A4BD-FF4FEC8452E7@.microsoft.com...
>I have a log file for a database, the .mdf file was deleted, there are no
> backup files for the database. How can I use the log file to restore the
> database?|||Thanks Andrew, I have a script to recreate the database and the table, it
only had a single table.. I recreated the database and the table but now
can't figure out how to get the transactions in from the saved log file. Ye
s
tried undelete - its not there.
"Andrew J. Kelly" wrote:

> Basically you can't. The log file generally does not include all the
> information to recreate an entire database. That is why backups are so
> important.
> Did you try UNDELETE at the OS level or from Norton?
> --
> Andrew J. Kelly SQL MVP
>
> "g2g" <g2g@.discussions.microsoft.com> wrote in message
> news:C071BFAB-22FC-482C-A4BD-FF4FEC8452E7@.microsoft.com...
>
>|||> Thanks Andrew, I have a script to recreate the database and the table, it
> only had a single table.. I recreated the database and the table but now
> can't figure out how to get the transactions in from the saved log file.
Yes
> tried undelete - its not there.
You could try to use Log Explorer - check www.lumigent.com.
Dejan Sarka, SQL Server MVP
Associate Mentor
www.SolidQualityLearning.com|||If you still have all the information in the log you may be able to get it
back with some 3rd party tools. One is www.lumigent.com as Dejan mentioned
and another I know of is available at http://www.logpi.com/.
Andrew J. Kelly SQL MVP
"g2g" <g2g@.discussions.microsoft.com> wrote in message
news:1E042AAC-2F02-4BEF-A103-4B7830ED771D@.microsoft.com...[vbcol=seagreen]
> Thanks Andrew, I have a script to recreate the database and the table, it
> only had a single table.. I recreated the database and the table but now
> can't figure out how to get the transactions in from the saved log file.
> Yes
> tried undelete - its not there.
> "Andrew J. Kelly" wrote:
>

Restore Database FROM MDF/LDF, then apply Transaction Log From POint of Failure? Is it pOs

If I have a database backup from sunday, and a failure occurs monday... Can the backup .mdf and .ldf files be attached, and the backup log after the point of failure be applied to them?

The problem I am having is it looks like you can only restore from a .bak file, and then apply the log at the point of failure. IT doesn't look like you can restore the .ldf/.mdf files, and then apply the backup log from the point of failure.

Can someone please help? I'm in desparate need of fixing this !

Thanks,
dp


You can restore from backup and apply your log files to recover up to failure unless it is a transactional database you can restore almost everything but you are also supposed to keep a DR(disaster recovery) copy of your database. Try the link below. Hope this helps.

http://www.sql-server-performance.com/log_explorer_spotlight.asp

sql

Restore database from mdf and ldf files

Is there a way to restore a database only have the .mdf and .ldf files and
not having a .bak
Anthony
Look up sp_attach_db in Books On-Line.
"Anthony" <anthony@.computerpundits.com> wrote in message
news:#8t4YAWKEHA.1764@.TK2MSFTNGP12.phx.gbl...
> Is there a way to restore a database only have the .mdf and .ldf files and
> not having a .bak
> Anthony
>
|||Just create the Database with the name desired. Stop the database service. Go to the data folder of the Sql Server installed in your program files. Delete the existing .mdf and .ldf files which would be created because of creation of the database. Copy yo
ur (the required) .mdf and .ldf files which you want to restore. Restart the database service, open SQL Server Enterprise Manager, your database will be populated with the tables and stored procs.
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.

Wednesday, March 21, 2012

Restore Database FILESIZE

Hi,
I have a database that has 2 files each one with 50 GB - 20 GB used in each
file ! So I have 30 GB free in each file ! I wanna make a restore in another
machine ! And I have the same volume letters, but in one volume I have only
45 GB free ! and in the ot
her I have 90 GB ! Is there a way to decrease the file while making a restor
e so the file can fit in the unit that has only 45 GB free !
Thank's
Carrasco> Is there a way to decrease the file while making a restore
quote:

> so the file can fit in the unit that has only 45 GB free !

You can move database files during the restore but the number and size of
the files will be exactly like the original. If you need to restore to a
server that doesn't have enough space, you'll need to restore to an
adequately sized machine, shrink the files, backup the smaller db and then
restore to the desired server.
Hope this helps.
Dan Guzman
SQL Server MVP
"Carrasco" <anonymous@.discussions.microsoft.com> wrote in message
news:4A0862C9-822C-4603-9E00-6546C5FCE56F@.microsoft.com...
quote:

> Hi,
> I have a database that has 2 files each one with 50 GB - 20 GB used in

each file ! So I have 30 GB free in each file ! I wanna make a restore in
another machine ! And I have the same volume letters, but in one volume I
have only 45 GB free ! and in the other I have 90 GB ! Is there a way to
decrease the file while making a restore so the file can fit in the unit
that has only 45 GB free !
quote:

> Thank's
> Carrasco