ODBC trace not stopping - sql-server

We have a server that is constantly running an ODBC trace, fortunately it's only a test server but it still keeps filling up its C drive. We have other servers similar to this one without the issue.
Tracing is off and it still writes to the log file after a reboot, I've deleted reg entries that point to the file which haven't returned but still logging. I have also deleted and recreated the ODBC connections to no avail however with the ODBC deleted it didn't seem to log.
Is there anything I've missed? I couldn't find anything on SE similar to this issue, mostly not logging or creating the file at all.
Thanks.
Added a pic of the ODBC setting and the log file.

Related

Error 21 when trying to delete a SQL Server DB

I had a SQL Server database on an external HDD. I forgot to detach the DB. I do not need it anymore, but I am unable to delete or take it off line.
When I try to delete or take the DB offline, I get the following error.
Msg 823, Level 24, State 2, Line 7
The operating system returned
error 21(The device is not ready.) to SQL Server during a read at
offset 0x00000000012000 in file 'E:\Kenya Air\Monet - Paulus.mdf'.
Additional messages in the SQL Server error log and system event log
may provide more detail. This is a severe system-level error condition
that threatens database integrity and must be corrected immediately.
Complete a full database consistency check (DBCC CHECKDB). This error
can be caused by many factors; for more information, see SQL Server
Books Online.
I have tried to run a DBCC CHECK, but I get the same error.
Try taking the database offline and then online.
Alter database DatabaseName set offline
Then bring it back online after a while
Alter database DatabaseName set online
I would try the system stored procedure sp_detach_db in SQL. From the fine manual:
Dropping a database deletes the database from an instance of SQL Server and deletes the physical disk files used by the database. If
the database or any one of its files is offline when it is dropped,
the disk files are not deleted. These files can be deleted manually by
using Windows Explorer. To remove a database from the current server
without deleting the files from the file system, use
sp_detach_db.
The OS is reporting exactly what you said in your question: In dropping the database, SQL Server attempts to remove the file from a device that no longer exists. Thus the database cannot be "dropped", per definition. But perhaps it can be detached, because that affects only the system's internal definition of the list of available databases.
Do NOT try to set the database offline and back online - this will eventually make things worse.
Stop SQL Server - move the respective database files (data and logfile(s)) to a different location. Start SQL Server again - eventually the DB will indicate (restore pending) - now delete the DB from SQL server. Next attach the database files back to the server and you should be ok - unless the files are physically corrupt. I have seen this problem numerous times - especially on virtualized SQL instances where SQL server is set to autostart and wasn't shut down in a coordinated manner before a system reboot. A momentary connection problem to either the data or log file can cause this problem. In case your system shows this problem more than once set SQL server to start manually.
I had the same problem, even when I wanted to take the database offline, it gave me this error.
But the problem was solved by restarting SQL.

SQL backup "Operating System error 13", system.Io.error

I lately changed my virtual machine from a Virtual Box to Hyper-V because of better performance on Hyper-V. After I did this I cannot restore a database (2008R2 all environments, same version) from outside a test or production environment, and I could before. I request this error in my SQL log:
backupiorequest::reportioerror read failure on backup device. Operating system error 13 (failed to retrieve text for this error. Reason 15105)
I tried ofcause google, which tells me that Operating System error 13 is somekind of "permission failure". I tried to give the backup file full control for everyone, but seems not to make any difference.
I think it is a permission problem, im just stuck and dont know how to solve the problem, any suggestions?
I changed my virtual machine name from one thing to another, could it be the problem so my "rights" is right now assigned to oldName and not newName and if yes, where do I need to change those?
You can lookup error codes here, for example:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx
As it states, error 13 (or 0x0D) is ERROR_INVALID_DATA, so chances are, your backup is corrupted.
You can try to copy it to different machine and restore there. Also, it wouldn't hurt to run restore verifyonly and restore headeronly against the backup.
I tried to look at the permission for the SQL database, it seems to be ok. Tried to move it back to the original server. Seems that something went in the transaction to the endpoint.
The SQL.bak. Tried to do it again got the same result. So something is going on when im transfer it to a shared drive and grabbing it from there :(
So the answer is that the header file is broken :(

Not able to attach database in SQL Server 2008R2

I have SQL Server 2008R2 on my laptop, with a number of databases on it.
I detached one of my development databases today (I wanted to take a copy) using SSMS, and now I can't re-attach it. Whenever I try I get the following error
CREATE FILE encountered operating system error 5(failed to retrieve text for this error. Reason: 15105) while attempting to open or create the physical file
I have seen numerous similar questions on this, and they always seem to suggest the database being attached to another SQL Server instance. I have checked as to whether I have another SQL Server instance running, can't see anything even remotely like in Task manager. I even restarted the computer to clear any if they were there - no joy.
I read somewhere that if I change the Log On checkbox on the SQL Server Services properties Log On tab to Local System Account that should do it; it didn't.
I am at a complete loss as to where to go next.
Any ideas anyone?
Error 5 is Access Denied. It is a permissions issue. You do not have permissions to write to that location. You probably should be an Administrator on that machine.

SQL Server 2000 Backup fails with Status = 33

I am trying to take a Full Backup of a database size about 75GB.
It is SQL Server 2000 - 8.00.2055 x86 version. I have plenty of disk space where the backup is being created. So disk space isn't an issue.
The backup process starts fine but half way through it errors out just saying with status = 33.
I have looked into the Error Log and it is showing the error command the Enterprise Manager executed to take the backup with exactly the same error message, Status 33, which doesn't really help :S
I have been looking for any information online but couldn't find anything.... Any suggestions any solutions any pointers in the direct direction is much appreciated.......
the error number looks like a system error: The process cannot access the file because another process has locked a portion of the file..
usual solution is to exclude db and backup files from antivirus scanning.
also verify disk status; that message may sometimes happen when disk is failing and a disk check is a good idea if you have any doubt ^^
Further investigation and "Googling" solved the issue, The issue was with drive, It was compressed and SQL Server did not like that.
Solution
Removed the compression from Drive and this time backup completed without any errors and much faster.

SqlServer is in script upgrade mode

Vista just finished one of its many updates. After restarting my computer I try connecting to SqlServer2008 instance with Sql Server Management Studio and I get this error:
Error connecting to '...\MSSQLSERVER2008'.
Additional information:
Login failed for user '...'. Reason: Server is in script upgrade mode. Only administrator can connect at this time. (Microsoft SQL Server, Error: 18401).
Pressing help gets me to an internet page saying there's no additional information.
Thx Vista & Updates. Anyone an idea because on the internet I can't find anything about this issue.
It appears This Guy was having the same problems as you and his only suggestion was to wait a few minutes before trying to log in again.
I have yet to see any type of Microsoft documentation about this, nor have I seen any forum posts which came to any sort of resolution concerning the same problem.
Check your event viewer. I had the same problem and found that (in my case) it was looking for a directory that didn't exist to perform an upgrade script. NO hint that there was any sort of problem in the dialog, but the event viewer showed clearly what the problem was.
jim
I had the same problem. Waiting until update was done did not help. Solution was, (after checking Windows eventlog) to set the folder rights. SQL-Express had no rights on the database folder, why ever. Something has mixed up the rights during the upgrade from WinXP to Win 7. That was it.
Adding a comment to this page since this is the top Google result for "script upgrade mode". It seems that a number of things can cause a SQL Server DB to go into this mode. In our shop we've run into these two cases in the past months:
Log shipping - Can't recall at what point of the process exactly the DB went into this mode, iirc it was when bringing it back up. The solution was just to wait it out.
Hard drive full - The DB went into this mode when it ran out of space. We're currently clearing up the drive, will come back with an update if waking it up turns out to be challenging.
Update: After freeing up disk space, it was a simple matter of setting the DB "Offline" and then "Online" to bring it back up.
We had the same issue, but needed to know what was going on in the background.
The db's were put into recovery mode, hence they had to recover. To assist we went to the SQL Server error log located where the system files (normally master, model, msdb...) are located, but under the log folder. In the ERRORLOG, we did a find on the word recovery and could watch the db's percentage recovered. Everything recovered normally, but it was much longer than expected.
The Reason for this is that the system reboot happens with important\necesssary softwares loaded and does all other operation later so that the booting happens faster.
Here in your case, the sql booting is happening as the start of SQL is not needed for system to start. I hope you are aware of DAC account(Dedicated Administrator Connection, Link) who has seperate connectivity and has ability to resolve issues even the whole SQL server is not responing. The SQL server is asking you either to wait or open the SQL with DAC account and stop the SQL update.
Solutions:
1) Wait until backround update completes
2) Open SQL using DAC account and kill all running processes

Resources