Hello,
I am a php programmer (I only know : HTML CSS PHP MYSQL),
I asked someone to give me a backup of the database so i can import it to my phpmyadmin, this someone use aspx and not php ... he sent me a file which is file.bak, i have changed it to file.sql and then import it into phpmyadmin but when i import it gave me this error :
There is a chance that you may have found a bug in the SQL parser. Please examine your query closely, and check that the quotes are correct and not mis-matched. Other possible failure causes may be that you are uploading a file with binary outside of a quoted text area. You can also try your query on the MySQL command line interface. The MySQL server error output below, if there is any, may also help you in diagnosing the problem. If you still have problems or if the parser fails where the command line interface succeeds, please reduce your SQL query input to the single query that causes problems, and submit a bug report with the data chunk in the CUT section below:
----BEGIN CUT----
eNrtTjtOw0AQHRPSbEHBBZgipb3y+iPwUq2CFSz5F69JpBRIfBxhyQTjJEicgAZxF8RN4BhcgrVp
oIIDeKQ3M3rz9Ob5WZZkHMcMxxaGfszRQRc9xyIyVzwQImeKHAXXHNf3VX3RrIuGVuUlrW9qZDZj
h2iZpmcwZjBXEdw1uW0tsCpuPRyR6FFOQ44uZdRh5ExmmEgdxcSPcx1nvnoxL1cYJYsgDIWSmSSN
BEebWtQh6WnaavREtg42ZTgP4jgnoYgnHIuVsd0sjSPSfchF6gMM4Bn2NPhH7cDT8P317XOodq3D
4Nddh3OAXdg/qPKPFy2CEq6ggTtYKyxhAwgSphB2s1CXh65/VyaCk3biD7/jPmAfsA/4R8Av01SY
sA==
----END CUT----
----BEGIN RAW----
ERROR: C1 C2 LEN: 4 5 942
STR:
SVN: $Id: sqlparser.lib.php 13117 2009-11-15 13:50:32Z lem9 $
MySQL: 5.1.41
USR OS, AGENT, VER: Win MOZILLA 5.0
PMA: 3.2.4
PHP VER,OS: 5.3.1 WINNT
LANG: en-utf-8
SQL: TAPE��ұ��,^lTӎMicrosoft SQL ServerRAID ;TAPE��ұ��,^lTӎMicrosoft SQL ServerRAID ;TAPE��ұ��,^lTӎMicrosoft SQL ServerRAID ;TAPE��ұ��,^lTӎMicrosoft SQL ServerRAID ;TAPE��ұ��,^lTӎMicrosoft SQL ServerRAID ;TAPE��ұ��,^lTӎMicrosoft SQL ServerRAID ;
----END RAW----
SQL query:
TAPE��ұ��,^lTӎMicrosoft SQL ServerRAID ;
MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TAPE' at line 1
A serious problem!!
Moderator: General Moderators
- phazorRise
- Forum Contributor
- Posts: 134
- Joined: Mon Dec 27, 2010 7:58 am
Re: A serious problem!!
As far as i know, BAK is backup file used in MSSQL. How did you convert BAK in SQL ?
Re: A serious problem!!
i have changed the extension of the file (A) 
I will attach the file check it ... I can see unreadable characters like squares ...
PS: this is the first time that i see something like this I usually I use phpmyadmin export method and then import it with the import method but now I don't know how to import this type of file where i can't see, when I open the file, something like Create table or INSERT INTO etc ...
I will attach the file check it ... I can see unreadable characters like squares ...
PS: this is the first time that i see something like this I usually I use phpmyadmin export method and then import it with the import method but now I don't know how to import this type of file where i can't see, when I open the file, something like Create table or INSERT INTO etc ...
- Attachments
-
- test.rar
- (911.7 KiB) Downloaded 109 times
- phazorRise
- Forum Contributor
- Posts: 134
- Joined: Mon Dec 27, 2010 7:58 am
Re: A serious problem!!
obviously, renaming file will not work. I have not worked with MSSQL yet, but i guess it's different from mysql. I mean in structure also like datatype,engines etc.
So it's not that simple ( another guess ). You'd need some sort of interface to convert it into mysql.
i just found this link, you should try it .
So it's not that simple ( another guess ). You'd need some sort of interface to convert it into mysql.
i just found this link, you should try it .
Re: A serious problem!!
I'm not opening the file, but there is also the probability that when they made the backup from MSSQL, it compressed the file as a final step. Try requesting them to export it directly to SQL dump (so when you open it in notepas, you see the SQL statements)
Like I said, I didn't open the file, but one way you could confirm this. What is the size of the .BAK file compared to the .RAR file you posted here? SQL statement should compress a great deal, so they shouldn't be close to each other. if the .BAK file was already compresses, they will probably be close to the same size.
-Greg
Like I said, I didn't open the file, but one way you could confirm this. What is the size of the .BAK file compared to the .RAR file you posted here? SQL statement should compress a great deal, so they shouldn't be close to each other. if the .BAK file was already compresses, they will probably be close to the same size.
-Greg
Re: A serious problem!!
@phazorRise I don't know how to use this software I don't know any thing about MS SQL it is the first time that I hear about it .. what I know is MySQL wich I use as database with php
@twinedev if u can open the file u may help me better, the file is about 6 Mb (extracted) and 1M compressed
@mikosiko I am checking the link
hope all of you could help to the end ... the person who sent me this file has more than 3000 data stored in the database and now I am going to create a software that will display these data, but as a PHP programmer, I use phpmyadmin and can't import the file !! =(
@twinedev if u can open the file u may help me better, the file is about 6 Mb (extracted) and 1M compressed
@mikosiko I am checking the link
hope all of you could help to the end ... the person who sent me this file has more than 3000 data stored in the database and now I am going to create a software that will display these data, but as a PHP programmer, I use phpmyadmin and can't import the file !! =(