0

Happy Holidays!

I have a .NET web project I'm working and need to send a sample of it for someone to look at. My problem is the SQL Server 2017 database.

I know you can include .mdb files for Access databases (like Northwind), but I don't recall ever sending an SQL Server sample database.

My restrictions are this: while I have read/write access to the database, I cannot install anything on the DB server or my workstation.

Thanks for the help, Carlos

NinjaDeveloper
  • 1,620
  • 3
  • 19
  • 51
Carlos Mendieta
  • 860
  • 16
  • 41
  • 2
    You could design your application to use other data sources, such as SQLite. Or you could let the users add database configuration, then seed the database from your application code. There's no need to actually include a database with your application. – mason Dec 27 '17 at 14:49
  • 1
    LocalDB is the Sql Server version that doesn't require the full installation of Sql Server, you can send your MDF database file and attach to the LocalDB instance installed on your client for demo purpose. See https://stackoverflow.com/questions/9655362/localdb-deployment-on-client-pc – Steve Dec 27 '17 at 14:53
  • 1
    If you have permissions and don't need to share data too, then try and generate "CREATE TABLE" scripts in Management Studio. That would be a quick fix, for anything more permanent you'd need more permissions or as @mason said redesign the app. – Iztoksson Dec 27 '17 at 14:54
  • 1
    You could install LocalDB on those machines and then use the `sqlcmd` (https://learn.microsoft.com/en-us/sql/tools/sqlcmd-utility) command to configure the database with a .sql script instead of having to install sql server management studio or a full version of sql. – EMUEVIL Dec 27 '17 at 15:52

1 Answers1

1

You can provide the SQL LocalDB installer

Please refer to: https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-2016-express-localdb

LocalDb doesn't need administrator priviledges: It installs on AppData Also, you can provide an mdf file with your data. You can take a look how to build the connection string.

mnieto
  • 3,744
  • 4
  • 21
  • 37