Showing posts with label query. Show all posts
Showing posts with label query. Show all posts

Monday, March 26, 2012

Restore database via automated order

Hi folks,

I got a script which restores a database. It works fine
if it is running in my Query Analyzer.

It fails when I put this script in an automated schedule using the
SQL agent.

This is my script

RESTORE DATABASE [RestoreTest]
FROM DISK = N'E:\sqlbak\RestoreTest.BAK'
WITH FILE = 1, NOUNLOAD , STATS = 10, RECOVERY

and this is the error message from the scheduler (Sorry its in German)

Executing as User dbo. Exclusiv access to database not possible
because
it is in use (which is not).. Rest may be clear ;-))

Ausfhrt als Benutzer: dbo. Exklusiver Zugriff auf die Datenbank ist
nicht mglich, da die Datenbank gerade verwendet wird. [SQLSTATE
42000] (Fehler 3101) RESTORE DATABASE wird fehlerbedingt beendet.
[SQLSTATE 42000] (Fehler 3013). Fehler bei Schritt

Do you have any suggestion to me ?"FoxRunner" <claus.rauchschindel@.dds.de> wrote in message
news:b7c717fb.0312090728.1b374ba1@.posting.google.c om...
> Hi folks,
> I got a script which restores a database. It works fine
> if it is running in my Query Analyzer.
> It fails when I put this script in an automated schedule using the
> SQL agent.
> This is my script
> RESTORE DATABASE [RestoreTest]
> FROM DISK = N'E:\sqlbak\RestoreTest.BAK'
> WITH FILE = 1, NOUNLOAD , STATS = 10, RECOVERY
> and this is the error message from the scheduler (Sorry its in German)
> Executing as User dbo. Exclusiv access to database not possible
> because
> it is in use (which is not).. Rest may be clear ;-))
> Ausfhrt als Benutzer: dbo. Exklusiver Zugriff auf die Datenbank ist
> nicht mglich, da die Datenbank gerade verwendet wird. [SQLSTATE
> 42000] (Fehler 3101) RESTORE DATABASE wird fehlerbedingt beendet.
> [SQLSTATE 42000] (Fehler 3013). Fehler bei Schritt
> Do you have any suggestion to me ?

Some process is accessing the database at the time you want to restore it.
This may be the job itself, if you set the database context for the restore
step to RestoreTest, instead of master.

Even if that is the issue, a better solution is to disconnect any open
connections. You can add a new first job step to do ALTER DATABASE
RestoreTest SET OFFLINE WITH ROLLBACK IMMEDIATE. Then, after restoring it,
use ALTER DATABASE RestoreTest SET ONLINE to make the database available
again. Make sure these steps use master as the database context. This
assumes, of course, that it is acceptable in your environment to disconnect
any client applications without warning.

Simon|||I think you're looking at the most common cause of failure on a
restore: the database is not in DBO or single-user mode. I don't know
off-hand how you would force the DB into DBO mode in a job, but I'm
certain there is a way. The more I look at the error message the more
certain I am as to this is what is happening.

And you should be able to look up the error message numbers on TechNet
to get the English version.

claus.rauchschindel@.dds.de (FoxRunner) wrote in message news:<b7c717fb.0312090728.1b374ba1@.posting.google.com>...
> Hi folks,
> I got a script which restores a database. It works fine
> if it is running in my Query Analyzer.
> It fails when I put this script in an automated schedule using the
> SQL agent.
> This is my script
> RESTORE DATABASE [RestoreTest]
> FROM DISK = N'E:\sqlbak\RestoreTest.BAK'
> WITH FILE = 1, NOUNLOAD , STATS = 10, RECOVERY
> and this is the error message from the scheduler (Sorry its in German)
> Executing as User dbo. Exclusiv access to database not possible
> because
> it is in use (which is not).. Rest may be clear ;-))
> Ausfhrt als Benutzer: dbo. Exklusiver Zugriff auf die Datenbank ist
> nicht mglich, da die Datenbank gerade verwendet wird. [SQLSTATE
> 42000] (Fehler 3101) RESTORE DATABASE wird fehlerbedingt beendet.
> [SQLSTATE 42000] (Fehler 3013). Fehler bei Schritt|||wwphx@.hotmail.com (P.D.N. Tame) wrote in message news:<bcc5d277.0312091343.5151cb59@.posting.google.com>...
> I think you're looking at the most common cause of failure on a
> restore: the database is not in DBO or single-user mode. I don't know
> off-hand how you would force the DB into DBO mode in a job, but I'm
> certain there is a way. The more I look at the error message the more
> certain I am as to this is what is happening.
> And you should be able to look up the error message numbers on TechNet
> to get the English version.

Thanks a lot. I think I can proceed from here by myself
;-))|||"Simon Hayes" <sql@.hayes.ch> wrote in message news:<3fd61c16_2@.news.bluewin.ch>...
> "FoxRunner" <claus.rauchschindel@.dds.de> wrote in message
> news:b7c717fb.0312090728.1b374ba1@.posting.google.c om...
> > Hi folks,
> > I got a script which restores a database. It works fine
> > if it is running in my Query Analyzer.
> > It fails when I put this script in an automated schedule using the
> > SQL agent.
> > This is my script
> > RESTORE DATABASE [RestoreTest]
> > FROM DISK = N'E:\sqlbak\RestoreTest.BAK'
> > WITH FILE = 1, NOUNLOAD , STATS = 10, RECOVERY
> > and this is the error message from the scheduler (Sorry its in German)
> > Executing as User dbo. Exclusiv access to database not possible
> > because
> > it is in use (which is not).. Rest may be clear ;-))
> > Ausfhrt als Benutzer: dbo. Exklusiver Zugriff auf die Datenbank ist
> > nicht mglich, da die Datenbank gerade verwendet wird. [SQLSTATE
> > 42000] (Fehler 3101) RESTORE DATABASE wird fehlerbedingt beendet.
> > [SQLSTATE 42000] (Fehler 3013). Fehler bei Schritt
> > Do you have any suggestion to me ?
> Some process is accessing the database at the time you want to restore it.
> This may be the job itself, if you set the database context for the restore
> step to RestoreTest, instead of master.
> Even if that is the issue, a better solution is to disconnect any open
> connections. You can add a new first job step to do ALTER DATABASE
> RestoreTest SET OFFLINE WITH ROLLBACK IMMEDIATE. Then, after restoring it,
> use ALTER DATABASE RestoreTest SET ONLINE to make the database available
> again. Make sure these steps use master as the database context. This
> assumes, of course, that it is acceptable in your environment to disconnect
> any client applications without warning.
> Simon

Simon,

Thats it. Your suggestion to change the context from Restore-Test to
Master was succesfull.

Embedding the ROLLBACK IMMEDIATE does not have any influence to the
result.
I let in because I think it is a better way of programming.

Thank Mate and best regards to Switzerland|||To add to the other responses, check to ensure the database context for your
restore job is set to a database other than the one your are trying to
restore. It may be that the restore job itself is the culprit.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"FoxRunner" <claus.rauchschindel@.dds.de> wrote in message
news:b7c717fb.0312090728.1b374ba1@.posting.google.c om...
> Hi folks,
> I got a script which restores a database. It works fine
> if it is running in my Query Analyzer.
> It fails when I put this script in an automated schedule using the
> SQL agent.
> This is my script
> RESTORE DATABASE [RestoreTest]
> FROM DISK = N'E:\sqlbak\RestoreTest.BAK'
> WITH FILE = 1, NOUNLOAD , STATS = 10, RECOVERY
> and this is the error message from the scheduler (Sorry its in German)
> Executing as User dbo. Exclusiv access to database not possible
> because
> it is in use (which is not).. Rest may be clear ;-))
> Ausfhrt als Benutzer: dbo. Exklusiver Zugriff auf die Datenbank ist
> nicht mglich, da die Datenbank gerade verwendet wird. [SQLSTATE
> 42000] (Fehler 3101) RESTORE DATABASE wird fehlerbedingt beendet.
> [SQLSTATE 42000] (Fehler 3013). Fehler bei Schritt
> Do you have any suggestion to me ?

Friday, March 23, 2012

Restore database from a TRN file

I am suppose to create a database from a TRN file sent to me. I execute the
following in Query Analyzer:
RESTORE LOG omegaproposal from
disk='c:\temp\OmegaProposal_tlog_200506070000.TRN' WITH NORECOVERY
go
I get this error:
The preceding restore operation did not specify WITH NORECOVERY or WITH
STANDBY. Restart the restore sequence, specifying WITH NORECOVERY or WITH
STANDBY for all but the final step.
My question is: Can I create a database from a TRN file? If so, what is
wrong with my statement? The error says I did not specify WITH NORECOVERY
but I obviously did.
Thanks.No, you can not create a db from a transaction log. You can create a db,
restoring from a full db backup.
AMB
"Darin" wrote:
> I am suppose to create a database from a TRN file sent to me. I execute the
> following in Query Analyzer:
> RESTORE LOG omegaproposal from
> disk='c:\temp\OmegaProposal_tlog_200506070000.TRN' WITH NORECOVERY
> go
> I get this error:
> The preceding restore operation did not specify WITH NORECOVERY or WITH
> STANDBY. Restart the restore sequence, specifying WITH NORECOVERY or WITH
> STANDBY for all but the final step.
> My question is: Can I create a database from a TRN file? If so, what is
> wrong with my statement? The error says I did not specify WITH NORECOVERY
> but I obviously did.
> Thanks.|||You would have to have both the *BAK file (full database backup) and any
*.TRN files that were associated with that backup. A TRN file is only the
transactions since the last transaction log backup or full database backup.
"Darin" wrote:
> I am suppose to create a database from a TRN file sent to me. I execute the
> following in Query Analyzer:
> RESTORE LOG omegaproposal from
> disk='c:\temp\OmegaProposal_tlog_200506070000.TRN' WITH NORECOVERY
> go
> I get this error:
> The preceding restore operation did not specify WITH NORECOVERY or WITH
> STANDBY. Restart the restore sequence, specifying WITH NORECOVERY or WITH
> STANDBY for all but the final step.
> My question is: Can I create a database from a TRN file? If so, what is
> wrong with my statement? The error says I did not specify WITH NORECOVERY
> but I obviously did.
> Thanks.

Restore database from a TRN file

I am suppose to create a database from a TRN file sent to me. I execute the
following in Query Analyzer:
RESTORE LOG omegaproposal from
disk='c:\temp\OmegaProposal_tlog_200506070000.TRN' WITH NORECOVERY
go
I get this error:
The preceding restore operation did not specify WITH NORECOVERY or WITH
STANDBY. Restart the restore sequence, specifying WITH NORECOVERY or WITH
STANDBY for all but the final step.
My question is: Can I create a database from a TRN file? If so, what is
wrong with my statement? The error says I did not specify WITH NORECOVERY
but I obviously did.
Thanks.
No, you can not create a db from a transaction log. You can create a db,
restoring from a full db backup.
AMB
"Darin" wrote:

> I am suppose to create a database from a TRN file sent to me. I execute the
> following in Query Analyzer:
> RESTORE LOG omegaproposal from
> disk='c:\temp\OmegaProposal_tlog_200506070000.TRN' WITH NORECOVERY
> go
> I get this error:
> The preceding restore operation did not specify WITH NORECOVERY or WITH
> STANDBY. Restart the restore sequence, specifying WITH NORECOVERY or WITH
> STANDBY for all but the final step.
> My question is: Can I create a database from a TRN file? If so, what is
> wrong with my statement? The error says I did not specify WITH NORECOVERY
> but I obviously did.
> Thanks.
|||You would have to have both the *BAK file (full database backup) and any
*.TRN files that were associated with that backup. A TRN file is only the
transactions since the last transaction log backup or full database backup.
"Darin" wrote:

> I am suppose to create a database from a TRN file sent to me. I execute the
> following in Query Analyzer:
> RESTORE LOG omegaproposal from
> disk='c:\temp\OmegaProposal_tlog_200506070000.TRN' WITH NORECOVERY
> go
> I get this error:
> The preceding restore operation did not specify WITH NORECOVERY or WITH
> STANDBY. Restart the restore sequence, specifying WITH NORECOVERY or WITH
> STANDBY for all but the final step.
> My question is: Can I create a database from a TRN file? If so, what is
> wrong with my statement? The error says I did not specify WITH NORECOVERY
> but I obviously did.
> Thanks.

Restore database from a TRN file

I am suppose to create a database from a TRN file sent to me. I execute the
following in Query Analyzer:
RESTORE LOG omegaproposal from
disk='c:\temp\OmegaProposal_tlog_2005060
70000.TRN' WITH NORECOVERY
go
I get this error:
The preceding restore operation did not specify WITH NORECOVERY or WITH
STANDBY. Restart the restore sequence, specifying WITH NORECOVERY or WITH
STANDBY for all but the final step.
My question is: Can I create a database from a TRN file? If so, what is
wrong with my statement? The error says I did not specify WITH NORECOVERY
but I obviously did.
Thanks.No, you can not create a db from a transaction log. You can create a db,
restoring from a full db backup.
AMB
"Darin" wrote:

> I am suppose to create a database from a TRN file sent to me. I execute t
he
> following in Query Analyzer:
> RESTORE LOG omegaproposal from
> disk='c:\temp\OmegaProposal_tlog_2005060
70000.TRN' WITH NORECOVERY
> go
> I get this error:
> The preceding restore operation did not specify WITH NORECOVERY or WITH
> STANDBY. Restart the restore sequence, specifying WITH NORECOVERY or WITH
> STANDBY for all but the final step.
> My question is: Can I create a database from a TRN file? If so, what is
> wrong with my statement? The error says I did not specify WITH NORECOVERY
> but I obviously did.
> Thanks.|||You would have to have both the *BAK file (full database backup) and any
*.TRN files that were associated with that backup. A TRN file is only the
transactions since the last transaction log backup or full database backup.
"Darin" wrote:

> I am suppose to create a database from a TRN file sent to me. I execute t
he
> following in Query Analyzer:
> RESTORE LOG omegaproposal from
> disk='c:\temp\OmegaProposal_tlog_2005060
70000.TRN' WITH NORECOVERY
> go
> I get this error:
> The preceding restore operation did not specify WITH NORECOVERY or WITH
> STANDBY. Restart the restore sequence, specifying WITH NORECOVERY or WITH
> STANDBY for all but the final step.
> My question is: Can I create a database from a TRN file? If so, what is
> wrong with my statement? The error says I did not specify WITH NORECOVERY
> but I obviously did.
> Thanks.

Wednesday, March 21, 2012

Restore database fails only when source is read from another machine ( server)

When executing this from Query Analyzer on server1, where the target is
located,
restore database restoretest
from disk = 'd:\backups\dottietest.bak'
with move 'vam_system_data' to 'd:\vamdata\sample\vamsystemdata.mdf',
move 'vam_user_data' to 'd:\vamdata\sample\vamuserdata.ndf',
move 'vam_log' to 'd:\vamdata\sample\vamlog.ldf',
stats=10,
REPLACE
... it succeeds if " .. from disk = 'd:\backups\dottietest.bak' "
but fails with " .. from disk = 'K:\backups\dottietest.bak' "
It fails when K: is used, i.e. the drive mapping to another win2k server's
D: drive, whereas it succeeds when the *.BAK file is on the local D; drive.
The sql server log shows:
"BackupDiskFile::OpenMedia: Backup device 'k:\backups\dottietest.bak' failed
to open. Operating system error = 5(Access is denied.)."
I can open all other files like XLS, etc from this server on K:.
The dottietest.BAK file was created by another SQL server, which is not on
server1.
Which permission am I missing?
Please help.
TIA
You can't use a mapped drive, so you'll have to use the UNC path instead -
that will do the trick....
Regards
Steen
PKuhne wrote:
> When executing this from Query Analyzer on server1, where the target
> is located,
> restore database restoretest
> from disk = 'd:\backups\dottietest.bak'
> with move 'vam_system_data' to 'd:\vamdata\sample\vamsystemdata.mdf',
> move 'vam_user_data' to 'd:\vamdata\sample\vamuserdata.ndf',
> move 'vam_log' to 'd:\vamdata\sample\vamlog.ldf',
> stats=10,
> REPLACE
> .. it succeeds if " .. from disk = 'd:\backups\dottietest.bak' "
> but fails with " .. from disk = 'K:\backups\dottietest.bak' "
> It fails when K: is used, i.e. the drive mapping to another win2k
> server's D: drive, whereas it succeeds when the *.BAK file is on the
> local D; drive. The sql server log shows:
> "BackupDiskFile::OpenMedia: Backup device 'k:\backups\dottietest.bak'
> failed to open. Operating system error = 5(Access is denied.)."
> I can open all other files like XLS, etc from this server on K:.
> The dottietest.BAK file was created by another SQL server, which is
> not on server1.
> Which permission am I missing?
> Please help.
> TIA

Restore database fails only when source is read from another machine ( server)

When executing this from Query Analyzer on server1, where the target is
located,
restore database restoretest
from disk = 'd:\backups\dottietest.bak'
with move 'vam_system_data' to 'd:\vamdata\sample\vamsystemdata.mdf',
move 'vam_user_data' to 'd:\vamdata\sample\vamuserdata.ndf',
move 'vam_log' to 'd:\vamdata\sample\vamlog.ldf',
stats=10,
REPLACE
.. it succeeds if " .. from disk = 'd:\backups\dottietest.bak' "
but fails with " .. from disk = 'K:\backups\dottietest.bak' "
It fails when K: is used, i.e. the drive mapping to another win2k server's
D: drive, whereas it succeeds when the *.BAK file is on the local D; drive.
The sql server log shows:
"BackupDiskFile::OpenMedia: Backup device 'k:\backups\dottietest.bak' failed
to open. Operating system error = 5(Access is denied.)."
I can open all other files like XLS, etc from this server on K:.
The dottietest.BAK file was created by another SQL server, which is not on
server1.
Which permission am I missing?
Please help.
TIAYou can't use a mapped drive, so you'll have to use the UNC path instead -
that will do the trick....
Regards
Steen
PKuhne wrote:
> When executing this from Query Analyzer on server1, where the target
> is located,
> restore database restoretest
> from disk = 'd:\backups\dottietest.bak'
> with move 'vam_system_data' to 'd:\vamdata\sample\vamsystemdata.mdf',
> move 'vam_user_data' to 'd:\vamdata\sample\vamuserdata.ndf',
> move 'vam_log' to 'd:\vamdata\sample\vamlog.ldf',
> stats=10,
> REPLACE
> .. it succeeds if " .. from disk = 'd:\backups\dottietest.bak' "
> but fails with " .. from disk = 'K:\backups\dottietest.bak' "
> It fails when K: is used, i.e. the drive mapping to another win2k
> server's D: drive, whereas it succeeds when the *.BAK file is on the
> local D; drive. The sql server log shows:
> "BackupDiskFile::OpenMedia: Backup device 'k:\backups\dottietest.bak'
> failed to open. Operating system error = 5(Access is denied.)."
> I can open all other files like XLS, etc from this server on K:.
> The dottietest.BAK file was created by another SQL server, which is
> not on server1.
> Which permission am I missing?
> Please help.
> TIA

Restore database April CTP 2005 Failed?

The following failed in EM (or whatever it is called now management
studio I think) and I scripted it out and ran it in a query window to
get more info. This works fine in SQL 2000 but not in 2005. I also tried
to 'create' the database first then ran this command below but with the
'force restore over existing database' checked on but this failed also
which is odd as well. Any ideas. This is my very first play with 2005 so
it is not off to a great start although to be fair, i seem to have gor
lucky on the install as it all went OK. BTW, is there a more approriate
newsgroup for this query?

Thanks

RESTORE DATABASE [bob] FROM DISK = N'C:\BigFujiCopies\Bob.bak' WITH
FILE = 1,
MOVE N'bob_Data' TO N'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\bob_Data.MDF',
MOVE N'bob_Log' TO N'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\bob_Log.LDF',
NOUNLOAD, STATS = 10
GO

Msg 5122, Level 16, State 1, Line 1
Directory lookup for the file "c:\Program Files\Microsoft SQL
Server\MSSQL\Data\bob_Data.MDF"
failed with the operating system error 3(error not found).
Msg 3156, Level 16, State 3, Line 1
File 'bob_Data' cannot be restored to 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\bob_Data.MDF'.
Use WITH MOVE to identify a valid location for the file.
Msg 5122, Level 16, State 1, Line 1
Directory lookup for the file "c:\Program Files\Microsoft SQL
Server\MSSQL\Data\bob_Log.LDF" failed with the operating system error
3(error not found).
Msg 3156, Level 16, State 3, Line 1
File 'bob_Log' cannot be restored to 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\bob_Log.LDF'. Use WITH MOVE to identify a valid
location for the file.
Msg 3119, Level 16, State 1, Line 1
Problems were identified while planning for the RESTORE statement.
Previous messages provide details.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

*** Sent via Developersdex http://www.developersdex.com ***Dearie me, if i would just take a closer look at what was stating me in
the face, i might just save myself countless wasted hours and an eggy
coupon. Suffice as to say the error is pretty much right as a database
cannot be restored/created to that location because of a complete lack
of a directory!! The directory structure in 2005 is a litlle differet as
MSSQL now appears under MSSQL.1, so ,he says (hanging head) it should be
'c:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\bob_Data.MDF'.

and NOT

'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\bob_Data.MDF'.

Worth making a not of (although is there not a case for the restore
command to simply create the directory structure you wish to restore to
on the hoof which would save people having to come of management studio,
make the directory tree up for cases where they want to store data and
log files in odd places?)

*** Sent via Developersdex http://www.developersdex.com ***|||DMAC@.devdex.com (DMAC@.devdex.com) writes:
> Worth making a not of (although is there not a case for the restore
> command to simply create the directory structure you wish to restore to
> on the hoof which would save people having to come of management studio,
> make the directory tree up for cases where they want to store data and
> log files in odd places?)

Maybe there is, but the newsgroup to post this to is really
microsoft.private.sqlserver2005.tools.graphical. See
http://go.microsoft.com/fwlink/?linkid=31765 for access information.

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

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

Monday, March 12, 2012

Restore database

Hi!

I am trying to restore a db from the query window in SQL Server Management Studio Express.

The query is like this:

restore database geodb from disk='C:\db\geodb.bck' with move 'geodb' TO 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\geodb.mdf', move 'geodb_log.ldf' TO 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\geodb_log.ldf'

When executing the query, I get this message:

Msg 262, Level 14, State 1, Line 1CREATE DATABASE permission denied in database 'master'.Msg 3013, Level 16, State 1, Line 1RESTORE DATABASE is terminating abnormally.

Do any of you know how to get rid of this message?

Thank you all, BassoBee

Connect with an account which has the capability to do execute the CREATE Database command, either the explicit permissions or who is on a role which can do this perform this action, like db_creator.

HTH, jens K. Suessmeyer.


http://www.sqlserver2005.de

Friday, March 9, 2012

Restore and update problem on Windows

Hi,
I have restored a database from a BAK file and tried to run a update query.
While executing the query , i got this error.

Server: Msg 208, Level 16, State 1, Procedure ctsv_992F1918D5FC11D4968C0090271F4533, Line 2
Invalid object name 'MSmerge_contents'.

What can be the possible reasons for the error?
Suggest the solutions if any.Which version of sql server are you using ? Are you using merge replication ?|||Hi,
I am using the MS SQL Server 2000.
About merge replication, i am not aware of this as i am a new user. More over we are restoring the backup that we have, from the restored database we can see all this views and procedures which are used for merge replication.
How can we check that we are using merge replication?

Regards,|||Look under enterprise manager - go to the replication folder - look at publications or subscriptions and you should see entries.|||Are you restoring onto the same sql server instance ? Are you only restoring a particular database ?|||Hi,
There are no entries in the Publications and Subscriptions folder.
We are restoring a particular backup that we got from our client.|||Are you saying then that this is not a backup of the current machine you are working with - it was a backup of another sql server machine ? Or are you restoring on the clients machine ?|||Hi,
Yes , you guessed that correctly.
It's a backup from some other machine (client's db backup) and we are restoring it on our machine for fixing few things.
This original database is not with us and we do not have details of his machine either. We only have the .BAK file.|||Without that information, you are running in the fog. My only recommendation is to try and run sp_mergecleanupmetadata - make sure you read the bol about this stored procedure. The only problem is that you have no replication so this stored procedure may be of no use. Let me know if you have any success with this.

When you say you are fixing a few things - will these fixes go back to the client ?