Converting SFD > SQL > Syntax error when importing
Dear everyone,
I have a large sdf file (114mb) which I have imported into CompactView and exported as SQL.
I create a new, empty database, opened a new query and pasted all the SQL inside but when I run it I get a lot of these errors:
Msg 102, Level 15, State 1, Line 857175
Incorrect syntax near ')'.
Msg 102, Level 15, State 1, Line 857175
Incorrect syntax near 'ACTION'.
ALTER TABLE [cmsContentTypeAllowedContentType] ADD CONSTRAINT [FK_cmsContentTypeAllowedContentType_cmsContentType] FOREIGN KEY ([Id])
REFERENCES [cmsContentType] () ON DELETE NO ACTION ON UPDATE NO ACTION;
ALTER TABLE [cmsContentTypeAllowedContentType] ADD CONSTRAINT [FK_cmsContentTypeAllowedContentType_cmsContentType1] FOREIGN KEY ([AllowedId])
REFERENCES [cmsContentType] () ON DELETE NO ACTION ON UPDATE NO ACTION;
ALTER TABLE [cmsContentVersion] ADD CONSTRAINT [FK_cmsContentVersion_cmsContent_nodeId] FOREIGN KEY ([ContentId])
REFERENCES [cmsContent] () ON DELETE NO ACTION ON UPDATE NO ACTION;
ALTER TABLE [cmsContentXml] ADD CONSTRAINT [FK_cmsContentXml_cmsContent_nodeId] FOREIGN KEY ([nodeId])
REFERENCES [cmsContent] () ON DELETE NO ACTION ON UPDATE NO ACTION;
The list continues with these empty parentheses. I don't know SQL so it's hard for me to track down the issue.
Do I have to install Umbraco first in the empty database? I just want to switch from SDF to SQL.
You may find it works better if you use the sqlcmd line to import the file rather than pasting it into a sql window. I've had problems in the past when just pasting large SQL files in the query windows.
Converting SFD > SQL > Syntax error when importing
Dear everyone,
I have a large sdf file (114mb) which I have imported into CompactView and exported as SQL.
I create a new, empty database, opened a new query and pasted all the SQL inside but when I run it I get a lot of these errors:
The list continues with these empty parentheses. I don't know SQL so it's hard for me to track down the issue.
Do I have to install Umbraco first in the empty database? I just want to switch from SDF to SQL.
Thank you!
You may find it works better if you use the sqlcmd line to import the file rather than pasting it into a sql window. I've had problems in the past when just pasting large SQL files in the query windows.
like below
replace
I'm using this tool to convert SDF to sql
https://blog.nicolaayan.com/2018/02/how-to-migrate-sdf-database-to-sql-server/
This worked like a charm! I did however get a lot of SQL files but I used this command to combine them:
Thanks for the help everone, it's much appreciated!
// Mike
Yes, I used the same tool. What version of SQL are you importing it into?
Did you try loading from the sql cmd line?
is working on a reply...