Search code examples
visual-studio-2013sqlcmdsql-server-data-tools

How to run script generated by publish for SQL Data project


I'm using SSDT (in SQL Data Project) in Visual Studio 2013. When I publish the database, I can

  • Do a direct publish (click the publish button)
  • Generate the script, then execute in Visual Studio

But the script does pretty much nothing (apparently) if I copy it to SSMS and try to execute it (in SQLCMD mode).

How would I execute a generated script outside of Visual Studio? Do I have to use sqlcmd.exe? And if so, are there certain command line parameters that I would need to use?

Thanks!


Solution

  • The comment by Peter helped me look at the issue from a new angle. It wasn't a database problem, but a table issue. The database has an auditing table for every table. I was updating the Address table (I thought), but instead updated the A_Address table. It was all working fine. The first run updated the audit table, subsequent runs didn't (of course), but I was checking the Address table for the update. Doh! New database, new technology....