DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Upgrade to 10.1.0 - Error dropping vw_ApiTokens

 7 Replies
 0 Subscribed to this topic
 33 Subscribed to this forum
Sort:
Author
Messages
New Around Here
Posts: 25
New Around Here
Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
New Poster
New Poster
Congrats on posting!

The database script errors at 3%  with the following:- 

3% ERROR occured - System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near the keyword 'IF'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DotNetNuke.Data.SqlDatabaseConnectionProvider.ExecuteNonQuery(String connectionString, CommandType commandType, Int32 commandTimeout, String query) at DotNetNuke.Data.SqlDataProvider.ExecuteScriptInternal(String connectionString, String script, Int32 timeoutSec) ClientConnectionId:15a589d1-9a23-4525-926a-f4aa545c6ea5 Error Number:156,State:1,Class:15 DROP VIEW IF EXISTS dbo.[vw_ApiTokens]

Growing Member
Posts: 75
Growing Member

From what version are you upgrading?
Did you follow the suggested upgrade path?

New Around Here
Posts: 25
New Around Here
Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
New Poster
New Poster
Congrats on posting!

9.11 - It's old test install of DNN without any extensions.

There is no vw_apiTokens view in the database

Advanced Member
Posts: 233
Advanced Member
4 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
New Poster
New Poster
Congrats on posting!
4 Engaged Reader
Engaged Reader
You are an engaged reader!
Check which sql version you are running. I think DROP VIEW IF EXIST is only in sql 2016 which is now minimum sql version in dnn 10.
New Around Here
Posts: 25
New Around Here
Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
New Poster
New Poster
Congrats on posting!

Could the answer as its still on SQL 2012, will need to upgrade it first

Growing Member
Posts: 75
Growing Member

I think there's a 99% chance that's the issue. ;-)
By the way, thank you for posting this, it might help other users experiencing the same problem.

Advanced Member
Posts: 207
Advanced Member
Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
MVP
MVP
You're an MVP!
New Poster
New Poster
Congrats on posting!
I have seen a few issues with some people running SQL 2012, I suggest your first step should be to upgrade to at least SQL 2016.
New Around Here
Posts: 25
New Around Here
Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
New Poster
New Poster
Congrats on posting!
I've upgraded to SQL 2016 and the database script has now completed. I now need to restore the database and web folders back to their original state and re-try the update again.

I really need to get around to updating my ancient test server to something more suitable.

These Forums are for the discussion of the open source CMS DNN platform and ecosystem.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
  2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
  3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  5. No Flaming or Trolling.
  6. No Profanity, Racism, or Prejudice.
  7. Site Moderators have the final word on approving / removing a thread or post or comment.
  8. English language posting only, please.

Would you like to help us?

Awesome! Simply post in the forums using the link below and we'll get you started.

Get Involved