0
Answered

import sql

Jeff Byers 9 ár síðan updated by anonymous 6 ár síðan 5

I get this no matter what sql i upload and try to import



  • WARNING: Tokens were found at line 1, column 1 that do not belong to a registered statement. Check your DDL for completeness.[ USE [ SQL2005_268100_omybs ] GO]

Answered

Hi,


I've checked log files. Your file contains "USE db" statement which is not supported by Vertabelo. You may ignore this warning or remove this statement by hand. I suppose that there is an option in your utility to not include "USE db" in a dump file.

I get this as well on Microsoft SQL Server 2012. I get this error no matter what, even though this is the entire text of the imported SQL file:


CREATE TABLE AlwaysOn.AuditAvailabilityGroupFailover (	ID bigint IDENTITY(1,1) NOT NULL,	GroupID uniqueidentifier NOT NULL,	GroupName nvarchar(128) NOT NULL,	NewPrimaryReplicaName nvarchar(128) NOT NULL,	NewPrimaryReplicaID uniqueidentifier NOT NULL,	ObservedOnEventSourceConnectionID smallint NOT NULL,	EventDateTimeUtc datetime NOT NULL,	RetrievalDateTimeUtc datetime NULL,	RetrievalIdentifier uniqueidentifier NULL,	ProcessingCompletionDateTimeUtc datetime NULL,
Status tinyint NOT NULL);


Also, when I ignore the warning, I get zero tables in the dashboard. So it's clearly not importing anything. At this point, I'm unable to make much headway with this product for use in a SQL Server environment. Any help would be greatly appreciated.


-Kevin (@kekline on twitter)

Hi Kevin,


I've tried to reproduce it and it works for me. Please make sure you've picked the MS SQL database.


I've uploaded this file sample.sql it contains only one create table statement.





And got diagram with this table only:



Here is an XML file sample.xml


Hope it helps. If you would like to upload entire file please open a private ticket.




I experienced the same thing when I first tried to use the tool. The issue seems to be that Vertabelo is VERY picky on line ending encodings. Files saved in Notepad++ (no matter whether using CRLF or LF endings) would invariably fail. Files copy and pasted into Notepad and then saved seem to work, even if they DDL looks all run together in Notepad.