October 22, 2011 at 4:21 am
I wrote an Invoicing application. It is written in Visual Studio 2008 and the data is stored in SQL Server 2008. This application has been running for 2 years now with no problems. I recently decided to use “Windows Live Mesh” to back up the data stored in Sql.
Unfortunately I tried to access the SQL data (via my application) whilst it was being backed up for the first time. (I know now that this was a mistake!!!!). The Invoicing App stopped running and provided me with a message which reads:
Unable to open the physical file "C:\RJHPlumbing\RJHsql.mdf". Operating system error 32: "32(failed to retrieve text for this error. Reason: 15105)". Cannot open user default database. Login failed. Login failed for user 'JohnShawyerPC\John Shawyer'.
I had thought that when the Sql data had backed up, my application would perform correctly. Unfortunately it does not. Also I can no longer use other databases when I am user 'JohnShawyerPC\John Shawyer'
After two years of successful operation, I cannot understand this message. Microsoft provides me with “SQL Server Management Studio” and I use this to try and gain a clue as to its meaning.
If I use “Sql Server Configuration Manager” and stop the SQLExpress Server and then start it again.
Then I use “Sql Server Installation Centre”. Under Tools pick the “System Configuration Checker” to check the system.
After this when I use my application it will run completely normally but when I leave the application and then sign back in the application falls over.
October 25, 2011 at 10:53 am
Ok, let's start a little slower... Can you connect via SSMS with the same user the application is using? Also, you say you developed this using VS2008, but in what language? (VB, C#?)
Thanks,
Jared
Jared
CE - Microsoft
October 25, 2011 at 2:16 pm
No my friend, I cannot connect to my Invoicing system because it wiil not connect to SQL Server 2008. I use the JohnShawyerPC/JohnShawyer user as I have always done.
The application is written in VB.
October 25, 2011 at 2:23 pm
I'm sorry, maybe you misunderstand. Can you connect to the database using SQL Server Management Studio. I understand that the application cannot connect to the database, but can you outside of the application?
Jared
Jared
CE - Microsoft
October 25, 2011 at 2:24 pm
john-671083 (10/22/2011)
I wrote an Invoicing application. It is written in Visual Studio 2008 and the data is stored in SQL Server 2008. This application has been running for 2 years now with no problems. I recently decided to use “Windows Live Mesh” to back up the data stored in Sql.Unfortunately I tried to access the SQL data (via my application) whilst it was being backed up for the first time. (I know now that this was a mistake!!!!).
The error here wasn't that you tried to access SQL Data during a backup. It was that you applied Windows Live Mesh to a database file (.mdf or .ldf).
Use dedicated SQL Backup utilities or use the SQL backup tools in Management Studio to do database backups. Then do what you need to with the .bak files that result.
The Invoicing App stopped running and provided me with a message which reads:
Unable to open the physical file "C:\RJHPlumbing\RJHsql.mdf". Operating system error 32: "32(failed to retrieve text for this error. Reason: 15105)". Cannot open user default database. Login failed. Login failed for user 'JohnShawyerPC\John Shawyer'.
... and ...
After this when I use my application it will run completely normally but when I leave the application and then sign back in the application falls over.
Turn off Mesh. Get it away from these files. They should not be accessed by anything but the SQL Engine unless you're using very robust hardware technologies (SAN Snapshot Cloning, for example) with very specific settings and monitoring.
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
October 25, 2011 at 2:31 pm
Evil Kraig F (10/25/2011)
john-671083 (10/22/2011)
I wrote an Invoicing application. It is written in Visual Studio 2008 and the data is stored in SQL Server 2008. This application has been running for 2 years now with no problems. I recently decided to use “Windows Live Mesh” to back up the data stored in Sql.Unfortunately I tried to access the SQL data (via my application) whilst it was being backed up for the first time. (I know now that this was a mistake!!!!).
The error here wasn't that you tried to access SQL Data during a backup. It was that you applied Windows Live Mesh to a database file (.mdf or .ldf).
Use dedicated SQL Backup utilities or use the SQL backup tools in Management Studio to do database backups. Then do what you need to with the .bak files that result.
The Invoicing App stopped running and provided me with a message which reads:
Unable to open the physical file "C:\RJHPlumbing\RJHsql.mdf". Operating system error 32: "32(failed to retrieve text for this error. Reason: 15105)". Cannot open user default database. Login failed. Login failed for user 'JohnShawyerPC\John Shawyer'.
... and ...
After this when I use my application it will run completely normally but when I leave the application and then sign back in the application falls over.
Turn off Mesh. Get it away from these files. They should not be accessed by anything but the SQL Engine unless you're using very robust hardware technologies (SAN Snapshot Cloning, for example) with very specific settings and monitoring.
I guess I assumed this had already been shut off... You can use mesh AFTER you have created a backup to sync that backup file if you wish. However, like Craig said, you cannot backup a live .mdf file without a specialized utility.
Now... Is mesh off and can you access the database? If not, turn it off and then restart the SQL Server Service and try again. If mesh os off and you still cannot access, let us know.
Thanks,
Jared
Jared
CE - Microsoft
October 25, 2011 at 2:35 pm
Sorry Jared I had misunderstood. Yes I can connect with SQL Server Management Studio.
Thank John
October 25, 2011 at 3:18 pm
Well done Jared. When I turn the Mesh off it works!!!
Does this mean I cannot use Mesh. I thought it was because I had tried to access the data
while Mesh was backing up for the first time.
Incedently, when I went to the Mesh to turn it off, I noticed the the mdf file was not there. There was a message telling me it was waiting for a file, maybe the mdf???
Thanks John
October 25, 2011 at 3:24 pm
Thanks Craig, when I turned of the Mesh it all worked. Thanks John
October 25, 2011 at 6:01 pm
john-671083 (10/25/2011)
Thanks Craig, when I turned of the Mesh it all worked. Thanks John
My pleasure. Glad to help. I don't know Mesh itself well enough to answer why the file wasn't visible, but any sync program will do roughly the same thing to the files from the Server's perspective.
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
October 25, 2011 at 7:46 pm
When SQL Server performs a backup, or any 3rd party does, it does specific things to SQL Server and the mdf file (also the log file). Thinks like checkpoints, truncations of the log, and many other things. If you try to copy an mdf file while it is being accessed by the database engine (which is essentially what mesh is doing) it will cause problems. What exactly? Who knows... Not really my concern, personally. So use SQL Server maintenance plan or create a nightly job to run a script that creates a backup (.bak file). You could use mesh to sync that file offline, not not an active mdf file.
If it is important to have a backup of the mdf file there are 3rd party programs that can do this on the fly. We only did this as a secondary measure since we did not have any disaster recovery from a hardware failure at my previous company. We never tested the recovery of this, but it did not interfere with the live database. I still suggest against it. If you need that kind of disaster recovery, do a full, then diff, then transaction log backups and ship them offsite.
Thanks,
Jared
Jared
CE - Microsoft
Viewing 11 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply