0

I was sent this as a mysql dump, the file is labeled .sql, but it's clearly not a standard export. Is this something that can be used to reproduce a database and if so how?

Here is a small sample

USE [Sunwave]
GO

/****** Object:  Table [dbo].[SunwaveZipCodes]    Script Date: 6/15/2014 8:10:57 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[SunwaveZipCodes](
    [POSTAL_CODE] [varchar](50) NULL,
    [UTILITY_NAME] [varchar](50) NULL,
    [CITY_NAME] [varchar](50) NULL,
    [COUNTY_NAME] [varchar](50) NULL,
    [STATE_CODE] [varchar](50) NULL
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO
ypercubeᵀᴹ
  • 97,895
  • 13
  • 214
  • 305
  • 1
    This is SQL Server code, not mysql – RolandoMySQLDBA Jun 16 '14 at 17:02
  • How can I use it to reproduce the values into the database? Also provide answer so I can upvote you. :D – Mike Grotton Jun 16 '14 at 17:09
  • I am a MySQL DBA (a mere mortal). You need the SQL Server gurus to chime in on this one. We have lots of them here. – RolandoMySQLDBA Jun 16 '14 at 17:11
  • You can find some suggestions at this question: Need to migrate SQL Server to MySQL – ypercubeᵀᴹ Jun 16 '14 at 17:28
  • MySQL provide their own tool within the MySQL Workbench programme, see here and here. From what I've gathered, you appear to need a running MS SQL Server instance, but they do have freebie downloads. If your scripting is any good, this would be right up perl or python's street. I'd say even sed, awk and grep &c. [i.e. bash tools] could do a pretty good job - and if it's only a one-off that could be a route to be considered. – Vérace Jun 16 '14 at 19:17
  • @RolandoMySQLDBA and ypercube: I don't think this was a duplicate question about migrating MSSQL exports into MySQL. The OP had confused a MSSQL file for a MySQL dumpfile, just was asking how to "reproduce" the DB. The solution would seem to be to load it into the OP's SQL Server, not to migrate anything or do anything with MySQL. – Joshua Huber Jun 16 '14 at 20:08

1 Answers1

1

Like @RolandoMySQLDBA said, this is a Microsoft SQL Server script. Find a SQL Server that you can play with, create a new Database on that instance called [Sunwave], then run your script above. I don't believe you really wanted to migrate this database into MySQL. I'm thinking this might be another case of the usual MSSQL =? MYSQL confusion that us multi-RDBMS admins encounter.

Joshua Huber
  • 1,757
  • 11
  • 15