473,399 Members | 2,278 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Edit .mdf database

Greetings,

Are there any tools freely available to modify or edit a .mdf database
file? As far as seeing the actual tables?

Regards,
cd

Jul 23 '05 #1
6 25500
MSDE:
http://www.microsoft.com/sql/msde/
http://www.aspfaq.com/show.asp?id=2442

--
David Portas
SQL Server MVP
--

Jul 23 '05 #2
No, and I'm not sure why you'd want to do this - even if you managed to
change data pages in a .mdf file directly, you would corrupt the
metadata (indexes, allocation maps, statistics etc.), and the
transaction log would also need to be updated. As far as I know, MSSQL
itself is the only tool that can read and modify .mdf files (at least
outside Microsoft).

I'm not sure what your real goal is, but if you need to retrieve data
from an .mdf file, then you can try attaching it to an MSSQL
installation with sp_attach_single_file_db. If you don't have an MSSQL
installation, you can download MSDE for free, although it's limited to
2GB databases.

If this isn't helpful, I suggest you give some more details of what
you're trying to do.

Simon

Jul 23 '05 #3
I pretty much want to be able to look at a .mdf file to see what could
be mangled in it. If for some reason the application that writes to
the database gives an error because of invalid character or something
in a certain field i would like to see what field it is and what's in
it. Simply attaching it does me no good.

Jul 23 '05 #4
If you are developing an application then you could attach the DB to
Developer Edition (cost $50) to test for this sort of problem with the
benefit of Query Analyzer, Profiler and the other tools.

Is this scenario something you have actually experienced? What makes
you think that you could have a problem caused by an "invalid
character"?

If you think a database is corrupt then the DBCC command can be used to
validate a table or database and fix these problems.

--
David Portas
SQL Server MVP
--

Jul 23 '05 #5
I don't really understand what sort of errors you're talking about. If
you can't insert data into a table, then MSSQL will return an error
message, which you need to handle in your client:

http://www.sommarskog.se/error-handling-I.html

Perhaps if you can give a more specific example of the sort of error
you're getting, someone can suggest a solution. It would also be good
to know which version of MSSQL you have, what client application or
library you're using, what query you're executing etc.

http://www.aspfaq.com/etiquette.asp?id=5006

Simon

Jul 23 '05 #6
(mi*******@gmail.com) writes:
I pretty much want to be able to look at a .mdf file to see what could
be mangled in it.
If your database is corrupt so that you cannot easily repair it with
DBCC, you should open a case with Microsoft. Editing the internal
structures of database file will just mangle it even more.
If for some reason the application that writes to the database gives an
error because of invalid character or something in a certain field i
would like to see what field it is and what's in it. Simply attaching it
does me no good.


Your application cannot on its own corrupt the database. It would
need help from either a bug in SQL Server or bad hardware.

If your application produces an error message, you should first use the
Profiler to find where what statements the application is sending. Once
there you can run the queries in Query Analyzer. In QA you can run commands
like sp_help to see the definition of tables and constraints etc.

My guess is that you run a third-party app. In such, you should open a
support case with that vendor.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Ruby Tuesday | last post by:
Which one is better to do dynamic websites using MySQL? Thanks a.. ADODB, http://php.weblogs.com/ADOdb/ b.. Metabase, http://www.phpclasses.org/browse.html/package/20.html c.. PEAR::DB,...
25
by: dixie | last post by:
I have some code that adds new records into a table for each ID in a list box when a button on a form is clicked. This works fine. My problem now is that I wish to be able to edit all the records...
4
by: visionstate | last post by:
Hi all, I have built my 1st database and it is ready to go on a shared network drive. I have read a few articles about the security in access but am having some trouble getting my head around it...
2
rcollins
by: rcollins | last post by:
I am pretty new at mysql. I have a database that has a corrupt entry that I need to remove. If I open it in VI, it is all scrambled. What do I use to see the tables in my database? Any help would be...
3
by: ontherun | last post by:
Hi, I was asked to make some changes in a database created in Access 2003 by someone in my office. when i opened it, i could once see "File", "Window" and "Close" in the menu bar. I could not...
1
by: Markw | last post by:
Hi folks I think I've got a variable problem but not 100% sure. Background: I took the CMS example from chapter 6 in "Build your Own Database Driven Website Using PHP&MySQL" and have attempted to...
4
by: ghjk | last post by:
I want to edit database values using my web application. So first i load data to test boxex and drop down list. But drop down list only contain one value. I want to put all posible value to that and...
2
vikas1111
by: vikas1111 | last post by:
Hi All I want to edit and save changes in access data base using visual basic 6. Can anybody please help me ????
0
by: ghjk | last post by:
I'm new to java.I,m developing web application using jsp,struts,hibernet. I want to edit database record. This is my code and when I edit and save it it didn't update record but add a new one. Please...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.