Link to home
Start Free TrialLog in
Avatar of lucasdeskywalker
lucasdeskywalker

asked on

MSSQL .dmp to MySQL command line???

Is there such a tool that will take a MSSQL backup file .dmp and convert it importing it into MySQL on a command line?  Is there a tool we can do this with that would not require connecting to the MSSQL server?  I don't want to have to connect to the MSSQL server at all.  Its the company's phone system that I am consulting for and its their lifeblood.  We are converting all their systems to MySQL/PHP and the phones are on a server based PBX.  It exports/backups .dmp easily.

Thanks,

Dave
ASKER CERTIFIED SOLUTION
Avatar of btutt
btutt

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of btutt
btutt

Mind you this does not require access to the server in question, you will however need to be in an environement that understands these commands. It could be your local server or any other tool that understands TSQL.
Avatar of lucasdeskywalker

ASKER

Well I don't have a TSQL environment, I have a MySQL environment.  I am not sure if the soft phone PBX compiling the data (creating the .dmp, one per month about 45MB per file) has anything more than a runtime version of MS-SQL?  Can I run this script in MySQL?  Could you tell me what kind of stuffs I would need to create a TSQL environment?  I don't want to pay for MS-SQL and if I did, we would just use it as the SQL server we read/write to.

Another question I had, I did try to run your script against our development database server, using MySQL.  It stopped because of my path?  You wrote

-- Restore_Script_from_backup_file_new '<Full qualified path to backupfile>'   <Is this where we put the path and file name and then uncomment this?  Will this thing run in MySQL?

Create Procedure Restore_Script_from_backup_file @backupfile varchar(100)  <does the path and file name go here?
as

Can you give me back the syntax for exactly what the line would read if my file path and name were c:\test\MS.dmp

Thanks for helpin' us with this.  This is BIG if it works cause I won't have to suffer extra cost to get the data into something we can work with.

Dave
I tell you what, there is some clarification I need from you. Call me at (***) ***-****.

Bryce

{phone number removed - ee_ai_construct, cs admin}
We have clarified some issues over the phone. The issue was that the .dmp file really doenst do us any good since it is of a SQL Server proprietary format which MySQL cannot understand. I have suggested that Dave use a command line tool called OSQL.exe to fire a TSQL command script that will then BCP (bulk copy) each user data table to distinct text files. Those files can then be used to import to MYSQL.
One moment, I had spoken to the individual on the phone and he informed me that he would update the case granting me the points. He has unfortunately not done so. I cannot tell you as to why this is.

Apologies,

Bryce
Sorry, I have been traveling and unable to be here.  Bryce's solution did work, but you will need a copy of SQL and not just the run time modules that come with this kind of installation, our soft PBX.  We ran the .dmp against Bryce's code and it worked, but again, it takes MS-SQL.  I ended up buy a copy of MySQLtoMSSQL from Intelligent Converters and that is what we ended up using for a long term solution.

Thanks for your patience and Bryce did a bang up job, including solve the problem.

Thanks again Bryce.

Dave