question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Runs perfectly with SQLlite...but cant migrate to SQL Server

See original GitHub issue

Asad,

Your project is amazing! I can run it locally from VSCode, and register a new user and then authenticate as that user, with Angular (2). This is the ONLY project I have found that does Core and A2 with authentication that I can get working, so thank you for sharing it on GitHub!

My problem: I want to use it with a SQL Server database just like the SQLite AspNetCoreSpa.db you have in the example, but the following instructions you gave do not work for me:

* To run under sql server:
    * delete bin & Migrations folders
    * Flip the switch in appsettings.json called `useSqLite` to `false`, this should point to use local sql server setup   as default instance.
    * Run `dotnet ef migrations add "MigrationName"`

…which runs OK, but when I Debug->Start Debugging from VSCode, in the Debug Console, I get a "Exception thrown: ‘System.Data.SQLClient.SqlException’ in Microsoft.EntityFrameworkCore.SqlServer.dll …and it does not run.

Is there any way I could generate the SQL Server version of the database independently, accessible from SQL Server Management Studio, that I could then connect to from your example?

Or, is there a way your project would generate a LocalDB version that I could then convert?

–Thanks, Richard

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
asadsahicommented, Apr 18, 2017

@knowshape

It is difficult to say looking at the error you shown above. What is your sql server instance name? It it is set to default instance you should be able to connect using . or localhost from SSMS. And this project is using this default instance to connect to.

1reaction
Swift-Tcommented, Jun 11, 2017

I was able to reproduce knowshape’s error in sql server express. The problem was probably because you didn’t create a database in advance. Using localdb, it runs without a problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Migrate SQLite to SQL Server? | Easy Steps - Learn
Step 4: Creating a Linked Server in SQL Server; Step 5: Selecting the Data from the Source and inserting it into SQL Server...
Read more >
Exporting from SQLite to SQL Server
You can export the structure and contents to a .sql file that can be read by just about anything. File > Export >...
Read more >
Fixing ALTER TABLE errors with Flask-Migrate and SQLite
The only way to do this is to generate a brand new table with the new schema and copy all the data. Alembic...
Read more >
Migrating home assistant database from sqlite to mariadb.. ...
Solution. I took a simpler or lazier approach, and used a well supported library to quickly migrate home assistants sqlite database into ...
Read more >
Database (database/database.sqlite) does not exist" error ...
Hi. I've created an sqlite database using command. Copy php artisan make:migration create_cards_table --create=cards. and. Copy php artisan migrate.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found