Graph Tables not supported? Source Control only shows "error in paring the file"
friedrich_eberharter
Posts: 3 Bronze 1
It looks like Source Control does not support graph tables. I have a stored procedure that creates a graph table (in SQL Server 2022 with SQL Source Control 7.7.10.18663) and if I want to commit my changes, I get an error:
There was an error parsing the file "C:\Users\XXXX\AppData\Local\Red Gate\SQL Source Control 7\WorkingBases\lamt2ctk.e4q\dbo.YYYY.sql" at line 5, column 7, near the text .
To resolve this issue:
1. Open the affected file.
2. Edit it to ensure the SQL is valid.
3. Commit the changes without using SQL Source Control. For example by using Tortoise SVN, or Microsoft Team Explorer.
Show complete error:
Errors occurred whilst parsing file C:\Users\XXXX\AppData\Local\Red Gate\SQL Source Control 7\WorkingBases\lamt2ctk.e4q\dbo.YYYY.sql
'' at line 5, column 7
It looks like the error is not complete, presumably the text contains NULL.
The SP is valid. I can store it and execute it, that happens multiple times a day since multiple months. Also, I can commit it with other tools and I can compare the database with this SP with SQL Compare and SQL Data Compare. Only SQL Source Control is affected from this problem.
We don't want to change our workflow or user other tools only because we use the feature SQL Graph database. The short term solution is to exclude the stored procedure (not the graph table itself!) but we wish that Source Control could handle this.
So please add support for SQL Graph databases!
Tagged:
Answers
Would you be able to provide the syntax for the object you're creating?
Using the example here I'm having no issues: https://learn.microsoft.com/en-us/sql/relational-databases/graphs/sql-graph-sample?view=sql-server-ver16
Kind regards
Dan Calver | Redgate Software
Have you visited our Help Center?
at RedGate.Vcs.Common.Generic.GenericClient.CheckForUnacknowledgedConflicts(String workingRootPath, GenericCommitPaths paths)
at RedGate.Vcs.Common.Generic.GenericClient.<>c__DisplayClass10_0.<CommitAll>b__0()
at RedGate.Vcs.Common.Generic.GenericClient.WithFilesystemLock(Action action)
at RedGate.Vcs.Common.Generic.GenericClient.CommitAll(String commitMessage, String workingRootPath, GenericCommitPaths paths, IGenericHooks hooks, IReadOnlyGenericCallbacks callBacks, ICancellableOperationStatus status, Action`1 onCommitted)
at RedGate.Vcs.Common.Generic.GenericWorkspaceOperations.<>c__DisplayClass23_0.<ReplaceFolder>b__0()
at RedGate.SQLSourceControl.Engine.Utils.Task.SharedUtilsUtils.DoActionWithCancel(ICancellableOperationStatus status, ICancellable cancellable, Action action)
at RedGate.SQLSourceControl.Engine.Utils.Task.SharedUtilsUtils.DoActionWithStatus(ICancellableOperationStatus status, ICancellable cancellable, Action action)
at RedGate.Vcs.Common.Generic.GenericWorkspaceOperations.WithGenericClientAndHooks(ICancellableOperationStatus status, Action action)
at RedGate.Vcs.Common.Generic.GenericWorkspaceOperations.ReplaceFolder(ICommitLogMessageProvider commitLogMessageProvider, IEnumerable`1 pathsToAdd, IEnumerable`1 pathsToDelete, ConflictAcknowledgements conflictAcknowledgements, Action`1 onCommitted, ICancellableOperationStatus status)
at RedGate.Vcs.Common.Generic.GenericPreparedCommit.<>c__DisplayClass2_0.<GetOperations>b__2(ICancellableOperationStatus s)
at RedGate.Vcs.Common.PreparedCommitBase.<>c__DisplayClass15_0.<CreateNamedOperation>b__0(ICancellableOperationStatus s)
at RedGate.SQLSourceControl.Engine.Utils.Task.NamedOperation.Operation(ICancellableOperationStatus cancellableOperation)
at RedGate.SQLSourceControl.Engine.Utils.Task.CancellableOperation.<Invoke>b__9_0()
at RedGate.SQLSourceControl.Engine.Utils.Task.CancellableOperationBase.PerformAction(Action action)
at RedGate.SQLSourceControl.Engine.Utils.Task.CancellableOperationBase.InvokeWithTracker(Action action)
at RedGate.SQLSourceControl.Engine.Utils.Task.CancellableOperation.Invoke()
at RedGate.SQLSourceControl.Engine.Utils.Task.SharedUtilsUtils.DoActionWithCancel(ICancellableOperationStatus status, ICancellable cancellable, Action action)
at RedGate.SQLSourceControl.Engine.Utils.Task.SharedUtilsUtils.DoActionWithStatus(ICancellableOperationStatus status, ICancellable cancellable, Action action)
at RedGate.SQLSourceControl.Engine.Utils.Task.MultiStepCancellableOperation`1.ExecuteAsOnOperation(ICancellableOperationStatus status)
at RedGate.SQLSourceControl.Engine.Utils.Task.MultiStepCancellableOperationWithPostTask`1.ExecuteAsOnOperation(ICancellableOperationStatus status)
at RedGate.Vcs.Common.PreparedCommitBase.Execute(IReadOnlyFileSet fileSet, ICancellableOperationStatus status)
at RedGate.Vcs.Common.PreparedCommitWithPreTask.Execute(IReadOnlyFileSet fileSet, ICancellableOperationStatus status)
at RedGate.SQLSourceControl.Engine.Diff.ChangeSetOperations.CommitAllOperation.Operation(ICancellableOperationStatus cancellableOperationStatus)
at RedGate.SQLSourceControl.Engine.Utils.Task.CancellableOperation.<Invoke>b__9_0()
at RedGate.SQLSourceControl.Engine.Utils.Task.CancellableOperationBase.PerformAction(Action action)
at RedGate.SQLSourceControl.Engine.Utils.Task.CancellableOperationBase.InvokeWithTracker(Action action)
at RedGate.SQLSourceControl.Engine.Utils.Task.CancellableOperation.Invoke()
at RedGate.SQLSourceControl.Engine.Utils.Task.MultiStepCancellableOperation`1.InvokeOperations()
at RedGate.SQLSourceControl.Engine.Utils.Task.MultiStepCancellableOperationWithPostTask`1.InvokeOperations()
at RedGate.SQLSourceControl.Engine.Utils.Task.MultiStepCancellableOperation`1.<>c__DisplayClass0_0.<.ctor>b__0()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
Could you try updating to the latest version to rule that out as a possibility?
https://download.red-gate.com/checkforupdates/SQLSourceControl/SQLSourceControl_7.8.1.19631.exe
I took the file you provided and created that object successfully
Kind regards
Dan Calver | Redgate Software
Have you visited our Help Center?
So we are ready for the next step: I added a query with SHORTEST_PATH at the end of the SP. It's example G from the Microsoft documentation for this function and it's the same type of query we use in the production code. You can find the new SP attached.
When I alter the SP in the database, Source Control recognizes the change correctly and I can commit it.