How To Verify The Validity Of A File Prior To Attempting Restore?

Mar 22, 2007

Hello,

I would like a way to check a file before attempting to restore it. I want to be able to tell that this is a valid SQL backup file and not just some random file before I attempt a restore.

Any help would be appreciated!

hassiah

View 5 Replies


ADVERTISEMENT

How To Verify The Integrity Of A Back-up File Prior To Restore?

Mar 22, 2007

Hello,

I have some C# (.NET 2.0) code that performs back-ups and also can perform restores of back-up files. I would like to validate the integrity of a file prior to initiating a restore operation. In other words, I want to know, before I try to restore, if the file is just a random file (picture, work doc, zipped backup, etc.) or if it is a valid SQL backup file.

Any help would be greatly appreciated.

Thanks,

hassiah

View 3 Replies View Related

Error 4064 After Attempting Restore Backup?!

Sep 16, 2006

Hi,

We have a little problem for you:

We have 2 servers both running sqlexpress2005, both have service pack 1 installed, both have the same db (same tables etc.) both have the same users with the same passwords. Everything is identical.

What I want to do is move the db. I am attempting to do this by making a backup of the db and restoring it into the second machine. (I am not sure of a more practical way to do this without stopping the SQL server).

This is the problem, the backup process works fine, without error, but when restoring the copy to the other server ,it loses the dbowner property and all default users when attempting to connect recieve a 4064 error even though all the password for users are there. Very strange.

I tried to restore the copy to to the same server that I made the copy and everything works, this only happens when attempting to restore the copy on another machine.

Do you know if this is a possible bug? I have tried to do further test on 4 different machines now and the same happens.

The objective is to be able to send the data from sqlexpress server to another by making a backup and without the need t stop the sql server. Any suggestion would be appreciated.

Adam

View 5 Replies View Related

Using SqlCeEngine To Verify/Restore A Database

Jul 31, 2006

I have a compact pc program that uses a sql server database (sdf file).
I want to check the database integrity when program starts so I added a call to veriy method of SqlCeEngine

string dbFullName = System.IO.Path.GetDirectoryName(
System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) + "NessDB.sdf";
SqlCeEngine engine = new SqlCeEngine("Data Source = " + dbFullName);
engine.Verify();

The call to verify always returning false and when I call repair

string dbFullName = System.IO.Path.GetDirectoryName(
System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) + "NessDB.sdf";
SqlCeEngine engine = new SqlCeEngine("Data Source = " + dbFullName);
engine.Repair(null, RepairOption.RecoverCorruptedRows);

the program crashes and I get an exception "The specified module could not be found"
Why this happen and how can I check database corruption.

View 7 Replies View Related

Error Attempting Restore Of Full/differential Backup

Sep 13, 2006

I am running the following script to attempt a restore of a differential backup:

RESTORE DATABASE AdventureWorks
FROM DISK='C:SQL2005_BackupsAutoBackupsAdventureWorks.bak'
WITH
NORECOVERY
GO
RESTORE DATABASE AdventureWorks
FROM DISK='C:SQL2005_BackupsAutoBackupsAdventureWorksDiff.bak'
WITH RECOVERY
GO

I thought this was the way to do it. It does restore the full backup, but on the attempt to restore the differential backup, I get the following error:

Msg 3136, Level 16, State 1, Line 1

This differential backup cannot be restored because the database has not been restored to the correct earlier state.

Msg 3013, Level 16, State 1, Line 1

RESTORE DATABASE is terminating abnormally.

Does anyone know what this means? Do I have to use "with recovery" on the first restore? (The sample I took this from used "with norecovery")

The original backups were done with SQL Agent scheduled jobs. The script for the full backup is:

BACKUP DATABASE AdventureWorks
TO DISK='C:SQL2005_BackupsAutoBackupsAdventureWorks.bak'

The script for the differential backup is:

BACKUP DATABASE AdventureWorks
TO DISK='C:SQL2005_BackupsAutoBackupsAdventureWorksDiff.bak'
WITH DIFFERENTIAL, INIT

All I can say is, it's a good thing I am testing this out with non-critical data, because I obviously don't know what I am doing. (Sorry, I'm primarily a programmer, not a DBA) Can anyone help?

Thanks

View 4 Replies View Related

Killing Processes Prior To Restore

May 13, 2002

I have a scheduled job that will do a database restore at given time every day. Sometimes I run into a situation where some people leave themselves logged on to the database, which prevents the job from running.

Is there a way that I can set up my job to include killing any open processes against the database that I'm restoring prior to the restore being done?

View 3 Replies View Related

Transact SQL :: Verify Complete Restore Path (check For Missing Files)

Jul 29, 2015

In SQL Studio, I can go to the restore window and the click "verify backup media". This would check the restore plan listed in this window and check if some of the file are missed.Is there any way to reach this with TQSL? I know there is a "restore verify" command, but this will only verify one backup/file and not the complete restore path. I'm looking for a TSQL solution which is able to control that all necessary backup files are still present on the file System and not moved or deleted (e.g through cleanup task).

View 3 Replies View Related

Cannot Attach Mdf: Create File Encountered Operating System Error 5 While Attempting To Open The Physical File...

Sep 5, 2006

I have used the copy database wizard, but I realized I had forgotten to shrink the transaction log file. So I canceled the wizard. My database, detached by the wizard, has now disappeared. The mdf file is still there, but when I try to attach it manually I get the "create file encountered operating system error 5 while attempting to open the physical file..." error.

Any way I can recover it?

Thanks.

View 4 Replies View Related

Error When Attempting To Backup To A Second Disk File

Feb 12, 2007

In SQL Server 2005, via the GUI, I wish to backup a database to an additional disk file (there is already an existing backup disk file for this database), so that I can have more than one backup. I've added the new disk file name, highlighted it, and clicked OK.

I get an immediate error (see below). Note, the 2nd error message is specifying the existing backup disk file, not the new one I'm attempting to create.

"Backup failed for Server 'WCS-DEV-TPA'. (Microsoft.SqlServer.Smo)"

"System.Data.SqlClient.SqlError: The volume on device 'D:Program FilesMicrosoft SQL ServerMSSQLBACKUPWCS_ADV_Longmont.bak' is not part of a multiple family media set. BACKUP WITH FORMAT can be used to form a new media set. (Microsoft.SqlServer.Smo)"

Does anyone know what causes this and how to correct it?

View 11 Replies View Related

Backup Master Key, Cannot Write Into File 'c: Empmaster'. Verify That You Have Write Permissions, That The File Path Is Valid.

Jul 12, 2006

Hi,



I tried to backup the master key by the following syntax :

OPEN MASTER KEY DECRYPTION BY PASSWORD = 'mypassword'

BACKUP MASTER KEY TO FILE = 'c: empmaster' ENCRYPTION BY PASSWORD = 'mypassword'

but it failed and i got the following message:

Cannot write into file 'c: empmaster'. Verify that you have write permissions, that the file path is valid, and that the file does not already exist.

NB: I am using the "sa" user to execute this command.

I know that we have a security permission issue , but where and how ?



Regards,

Tarek Ghazali

SQL Server MVP

View 12 Replies View Related

Verify Client Connectivity File Versions

Feb 8, 2007

Is there a way to verify the version of the files that are used to connect to SQL 2005?? This stems from an ongoing problem I am having with having SQL 2000 and 2005 on the same machine... It has come done to the client connectivity files....

Thanks

View 4 Replies View Related

Check Data Validity (formats)

Jul 11, 2002

l have a customer text file.l have imported the file into an sql table. Now l want to validate the data starting with the customer_no and the format being xxl-0001 etc ,phone_no i.e 011 as the code and the number as 9028589 etc , say balance

l want to have ensure that the format of customer_no is XXL- then the number
Check the phone number that it has the right number of characters and that it is an interger.

How ould l do this? Should l use a procedure to do this or triggers? How would the code look ? Is there a topic on data validation that can give me pointers? Please assist

View 2 Replies View Related

Need A Task That Will Zip A File Prior To Upload Via FTP

Mar 28, 2006

I have a text file I need to zip (compress) before uploading it via an FTP task. Do I have to use a third-party tool to do this? Thanks.

View 15 Replies View Related

Error Attempting To PREVIEW In OLE DB Source Editor - Could Not Load File Or Assembly

Feb 28, 2007

Please... any ideas? Is this a footprint config issue?



TITLE: Microsoft Visual Studio

There was an error displaying the preview.




ADDITIONAL INFORMATION:


Could not load file or assembly
'Microsoft.SqlServer.SQLTaskConnectionsWrap, Version=9.3.242.0,
Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its
dependencies. The system cannot find the file specified.
(Microsoft.DataTransformationServices.Design)




BUTTONS:


OK




===================================





There was an error displaying the preview. (Microsoft Visual Studio)





===================================





Could not load file or assembly
'Microsoft.SqlServer.SQLTaskConnectionsWrap, Version=9.3.242.0,
Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its
dependencies. The system cannot find the file specified.
(Microsoft.DataTransformationServices.Design)





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


Program Location:





at
Microsoft.DataTransformationServices.Design.PipelineUtils.ShowDataPreview(String
sqlStatement, ConnectionManager connectionManager, Control
parentWindow, IServiceProvider serviceProvider,
IDTSExternalMetadataColumnCollection90 externalColumns)

at
Microsoft.DataTransformationServices.DataFlowUI.DataFlowConnectionPage.previewButton_Click(Object
sender, EventArgs e)

View 1 Replies View Related

Unable To Restore Databases From Tape: Timeout Expired. The Timeout Period Elapsed Prior To Completion Of The Operation Or The

Jul 6, 2007

I'm trying to test my backups by restoring from production onto a DEV machine.



However, when I insert the backup tape into the drive, then go into SSMS and right click on

Databases -> Restore Database -> From Device .... -> Tape -> Add -> (my tape drive \.Tape0) -> Contents

it displays the contents as it should.



So I click "Close" to close the contents and bring me back to the Specify Backup where I have \.Tape0 selected and I then click "OK"

SSMS sits for a few seconds, and then I get a time out error message:

TITLE: Microsoft SQL Server Management Studio
------------------------------

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------
ADDITIONAL INFORMATION:

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. (Microsoft SQL Server, Error: -2)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3054&EvtSrc=MSSQLServer&EvtID=-2&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------






That's all the further I can get... any suggestions?



I'm VERY perplexed by this...

View 11 Replies View Related

Question ... How To Test/verify Existence Of Local File Or Folder Using T-SQL (2005)?

Jan 25, 2008

Two questions actually ...

1) Need a simple routine or system function for testing for or verifying the existence of a file or folder on the local server's file system. Returning a simple boolean value or 1 or 0 would be fine.

2) Need a syntax and use description of the new "master.dbo.xp_create_subdir" function ... anyone have some documentation or links? MS technet and MSDN have nothing.

Thanx
EHammer

View 18 Replies View Related

Transact SQL :: Verify Inserted Values From One Table (in CSV File) With Another Table (in Database)

Aug 4, 2015

I am looking for a Sql query to verify the inserted values from one table(in CSV file) with another table(in sql database)

For example: I have below Values column that is present in once CSV file, after my data migration the values get stored in Results table under Message column.

I need to very whether values(1X,1Y) are inserted in Message record "successfully inserted value 1X"

Values (CSV)
1X
1Y

Results Table(SQL)
CreatedDate                   Message
2015-08-04 08:45:29.203  successfully inserted value 1X
2015-08-04 08:44:29.103  TEst pass
2015-08-04 08:43:29.103  successfully inserted value 1X
2015-08-04 08:42:29.203  test point
2015-08-04 08:35:29.203  successfully inserted value 1Y
2015-08-04 08:30:29.203  Test Pass
2015-08-04 08:28:29.203  successfully inserted value 1Y

If all values are inserted:

Output:
All values from values table are inserted successfully
Total count of values inserted: 2
If only few values are inserted, example only 1X from Values table is inserted in Message

Example:
Results Table CreatedDate     Message
2015-08-04 08:45:29.203  successfully inserted value 1X
2015-08-04 08:44:29.103  TEst pass
2015-08-04 08:43:29.103  successfully inserted value 1X
2015-08-04 08:42:29.203  test point

Output:
All values from values are not inserted successfully in result table.
Total count of values inserted: 1
Missing Values not inserted in results table are: 1Y

View 3 Replies View Related

DB Engine :: How To Restore From Current LDF Log File And Old BAK Backup File

Jun 11, 2015

My customer got a total hard drive failure.After sending it to drive recovery specialist we were able to recover the LDF log file (MyDB_0.LDF).But the MDF file was completely destroyed (MyDB.MDF).They have a good full backup from a month ago.

1) Installed SQL Server 2012 on a new PC
2) Created a new database of same name (MyDB) - with same MDF and LDF file names as original
3) Took the new database offline
4) deleted the MDF and LDF files of the new database
5) put "MyDB_0.LDF" in the place of the LDF file I just deleted 
6) put the database back on-line
7) after hitting F5 to refresh databases - it shows "MyDB (Recovery Pending)"
8) tried to do Tail Log Backup with this command
   BACKUP LOG [MyDB] TO DISK = N'C:BACKUPMyDB_TailLog.bak'
WITH NO_TRUNCATE

And I get this error...

Msg 3447, Level 16, State 1, Line 3
Could not activate or scan all of the log files for database 'MyDB'.

The sad thing is I know we can get this data back using ApexSQL-Log. I can see all the transactions since the last full backup in this program - so the log file is not damaged. But my client doesn't want to pay the $2000 fee for this software.There has to be a way to restore this data, without having to purchase a third party tool.

View 13 Replies View Related

Restore File

Sep 20, 2000

Database file or filegroup method was used to perform the backup and now i tried to restore that into different server by using SQL Server Enterprise Manager.

I got this error message:

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

Why i got this error message? And what is "backed up under a diffrent sort order ID (54)" ?

Please anyone help me

View 8 Replies View Related

Restore File

Sep 27, 2000

Hi

My backup file is BAK FILE and it's in D:MSSQL7/Backup/Sales.BAK.

I want to restore that into a different server in D Drive. For that i created a database called "RestoreB". (RestoreD_Data.MDF and RestoreB_Log.LDF). I tried to restore using Enterprise manager, but i got error message.

"File 'Sales_BAK' is not a database file for database 'RestoreB'. Backup or restore operation terminating abnormally'

How do write the statement to restore that file?
Anyone can help me to restore that file...

Thanks in advance

View 1 Replies View Related

Restore File

Sep 26, 2000

hi

I want restore the backup files. This backup was done by somebody else. So i don't know about the sort order, unicode collation and character set... of that files. How do i find those information to restore?

Thanks in advance

View 1 Replies View Related

Restore From .mdf File

Mar 15, 2008

hai there...

I got only .mdf(not .ldf) file from server people after server crash.and when i am trying to attach the db using sql server 2005 management studio It shows an error message..

quote:
Directory lookup for the file "E:Program FilesMicrosoft SQL ServerMSSQL$WEBSERVER39dataMastdb_hr_log.LDF" failed with the operating system error 3(The system cannot find the path specified.). (.Net SqlClient Data Provider)


Please help me out...

thanks in davance

Spec_tray

View 2 Replies View Related

DTS Restore From A File

Jul 23, 2005

We have a production server and a bunch of development servers. TheProduction server is located in a NOC (Network Operations Center)facility and is physically unaccessible on a regular basis. There areDTS packages on the production server which we'd like to pull down toour Dev servers.I was able to save the DTS package to a file and downloaded it to ourDev Servers. But how in the world do I restore it?? I'm a fairlytechnical guy and for the life of me, I'm not able to figure this oneout! How do I restore the DTS package which has been stored into a..dts file?Please help.Thank you in advance,-Umar.

View 1 Replies View Related

Restore Just The Mdf File From A Bak

Feb 7, 2008

I have a full database backup in a .bak file which includes both mdf and ldf parts. Unfortunatly when I try to restore the database the ldf it requires far more hard drive space than I have avaliable.

Is there any way to restore the database minus the log?

Or, is there any way to split the .bak file to the mdf and lfg files and restore just the mdf?

I cannot do another backup, or trim and backup. This .bak file is all I have to work with.

Thanks in advance!

View 4 Replies View Related

Restore Database From Mdf File?

Mar 19, 2003

If a SQL 2000 server instance is destroyed, but the database file (*.mdf) is saved on the disk, can a database within a newly created server instance be built on the saved file?

If I attempt to create a new database and choose the saved mdf file as the data file, then the server refuses to accept this file. Is there a way to create the new database and make it read the standalone mdf file?

Please help if at all possible. Thanks.

View 3 Replies View Related

Restore DB From File On Disk

Sep 28, 1999

Hi,

I am trying to create a scheduled task taht will restore a database from a backup file. I do not store my backups on a backup device, but on a local disk. To restore a DB from a backup device, the following statement will work:
"Load DBName from BackupDeviceName". Does any know what statement to use to restore from a file, if the file is "E:DBName_db_dump_199909272220".

Thanks in a advanced.

View 1 Replies View Related

Restore Database Without Mdf Or Ldf File

Dec 30, 2005

Hi,

Is it possible to restore a database with only a .bak file??
When I try to restore the system comes up with 2 paths where probably the original .mdf and .ldf files existed, but on my system they don't exist. How can I avoid this problem? (it's not possible to get the ldf and mdf files anymore...)

Grtz
Carlos

View 3 Replies View Related

Restore Database From Ldf File Only

Mar 3, 2006

Hello guys,
is it possible to restore an SQL server database from the .ldf file only?

The last operation is a script execution that have drop and create all the tables.

have you some idea?

Thanks to all

View 6 Replies View Related

Restore Backup File

Oct 12, 2006

I tried to use backup and restore database tasks to restore backup file but it does not work. The backup file I tried to restore in SQL server 2000 is from somewhere else (from my friend) and saved in cd-rom, not the one I created before.
How can I restore it to view in SQL server 2000 database?
Can you show me step by step?
Thanks for your help

View 14 Replies View Related

SQL Restore Into A Smaller File

Sep 4, 2007

Hello there....

I have a scenario where I am trying to set up multiple database instances for multiple test/development environment(s) for each group where the test/dev environment will contain a copy of what was in the production environment.. The test/dev environment can be refreshed on demand based on the prior night's full backup of the production environment.. This is good for our web developers and for training purposes, as the test environment(s) can be played around with, and will retain data for as long as the developers/testers/trainers need it, and then can be refreshed to the most current data when everyone in the group decides they want it refreshed...

Normally, this works out well...

However I am having a file size issue...

The production database was pre-allocated (a long time ago) to a large file size (probably to reduce external fragmentation).... So even though the backup file is only 5GB, the production database file itself is something like 40GB... I believe the production database has a maintainance plan on it already that rebuilds the indicies each weekend, etc...

Anyhow, the problem is that when I restore the 5GB database back into a newly created database file, the file expands all the way up to 40GB again, even though the backup file is 5GB...

Normally this would be fine, the problem is that I am trying to create multiple environments, and I do not have the disk space on my test/dev server for 40GB (plus another 15GB or so for the transaction log) multiplied by each of my test/dev environments... It would be much nicer if I could get this down to 5GB (or heck, even 10GB), since I know for sure that the total amount of data in the database doesnt exceed 5GB, and I have plenty of space on my disk for 5 (or 10) GB multiplied by each of the environments I want to create...

I have tried DBCC SHRINKDB and I have tried DBCC SHRINKFILE with the truncate after the restore, which seems to work but doesn't....

I have also tried to go into the database properties and change the "initial size" but that doesnt do anything etiher

Is there any way to get this file back down to a manageable size after the restore??

Or better yet, is there a special method to restore the database so it wont 'expand' back out to 40GB in the first place??? Perhaps some option to tell the restore process that even though the source database had a 40GB pre-allocation, that the database I am restoring into doesn't need to be pre-allocated??

View 1 Replies View Related

Cannot Restore Databse From File

Jul 23, 2007

Hi,
I have Sql server management studio express install on one pc with windows server 2003 os , working ok.
I also installed the same on my vista machine.

I use backup tool to store the back file from the windows server 2003 and to restore it back in the vista.

After connect to the SQLEXPRESS instance in the management studio
I right click the Database folder ->"Restore Database"->To database "xxx" (same name as was in the prev os)
From device->...->backup media - file , Add - choose the file with .back extension -> OK

In this stage there are 2 windows:
"Sql server windows NT has stop working"
And the collecting information for ms to help me..
With 3 files:
C:ProgramDataMicrosoftWindowsWERReportQueueReport17f38cd5WER80EE.tmp.version.txt
C:ProgramDataMicrosoftWindowsWERReportQueueReport17f38cd5WER80EF.tmp.appcompat.txt
C:ProgramDataMicrosoftWindowsWERReportQueueReport17f38cd5WER8C3C.tmp.mdmp

After click cancel , the management studio popup exception window with those details:
TITLE: Microsoft SQL Server Management Studio Express
------------------------------
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)
------------------------------
ADDITIONAL INFORMATION:
A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified network name is no longer available.) (Microsoft SQL Server, Error: 64)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=64&LinkId=20476
------------------------------
BUTTONS:
OK
------------------------------
Exception details:
===================================
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)
------------------------------
Program Location:
at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteWithResults(String sqlCommand)
at Microsoft.SqlServer.Management.Smo.ExecutionManager.ExecuteWithResults(String query)
at Microsoft.SqlServer.Management.Smo.BackupRestoreBase.ExecuteSqlWithResults(Server server, String cmd)
at Microsoft.SqlServer.Management.Smo.Restore.ReadBackupHeader(Server srv)
at Microsoft.SqlServer.Management.SqlManagerUI.SqlRestoreDatabaseGeneral.buttonSelectDevice_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
===================================
A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified network name is no longer available.) (.Net SqlClient Data Provider)
------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=64&LinkId=20476
------------------------------
Server Name: MY-DEVPCSQLEXPRESS
Error Number: 64
Severity: 20
State: 0

------------------------------
Program Location:
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32 bytesExpected)
at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
at System.Data.SqlClient.TdsParserStateObject.ReadByte()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteWithResults(String sqlCommand)


after this I can see in the SQL server configuration manager that the service of "SQL Server (SQLEXPRESS)" is stopped

I try to play with the protocols for sqlexpress enable and disable some of them , using only tcp etc etc , nothing work.

product version details:
1. Microsoft SQL Server Management Studio Express 9.00.2047.00
Microsoft Data Access Components (MDAC) 6.0.6000.16386 (vista_rtm.061101-2205)
Microsoft MSXML 3.0 5.0 6.0
Microsoft Internet Explorer 7.0.6000.16473
Microsoft .NET Framework 2.0.50727.312
Operating System 6.0.6000
2. SQL Server Configuration Manager , Microsoft Corporation , Version: 2005.090.3042.00
all opertaions under administrator account

thanks!

View 3 Replies View Related

SOS, One .NDF File Missing Can Not Restore DB

Jul 6, 2006

Dear All,

I have a DB with four .NDF Files. The First .NDF File is corrupt.

Unfortunately my Backup also Failed. So I Have no Backup.

Other .NDF and .LDF and the MDF Files are intact except one .NDF file.

Can anyone help ?? How can restore/Recover my DB. I can not mount the DB. ITs OK if i loose some data and am able to use other intact .ndf files.

Your help is Greatly appreciated.

Thanks

View 11 Replies View Related

Restore Database From File

Feb 28, 2006



Hello, I had backed up a database from SQL 2000, just before I format my computer. Now I have installed SQL 2005 and trying to restore that database to it, it doesn't work and I get the following error when doing that



===================================

Restore failed for Server 'localhostSQLEXPRESS'. (Microsoft.SqlServer.Express.Smo)

------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476

------------------------------
Program Location:

at Microsoft.SqlServer.Management.Smo.Restore.SqlRestore(Server srv)
at Microsoft.SqlServer.Management.SqlManagerUI.SqlRestoreDatabaseOptions.RunRestore()

===================================

System.Data.SqlClient.SqlError: The backup set holds a backup of a database other than the existing '2for1' database. (Microsoft.SqlServer.Express.Smo)

------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&LinkId=20476

------------------------------
Program Location:

at Microsoft.SqlServer.Management.Smo.ExecutionManager.ExecuteNonQueryWithMessage(StringCollection queries, ServerMessageEventHandler dbccMessageHandler, Boolean errorsAsMessages)
at Microsoft.SqlServer.Management.Smo.BackupRestoreBase.ExecuteSql(Server server, StringCollection queries)
at Microsoft.SqlServer.Management.Smo.Restore.SqlRestore(Server srv)



========================================================



any help is appreciated



Thanks,

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved