Best Of
Re: Generation of new database?
I like to stick an IF NOT EXISTS CREATE DATABASE script in source control for each of my databases (for each environment). This way I can source control the way I set up stuff like file groups and possibly security at a per database level. This is useful because some of that stuff is not included by default with the Redgate tools or people tend to filter it out. (Who has the same users on DEV and PROD?)
Note, add this create script in a parent or sister directory to your SQL Source Control directory. I try to avoid adding my own scripts to the directory you give to Redgate because you can confuse Redgate tools which are designed to parse all the sql scripts in that directory.
Then, I add a simple step in Octopus Deploy to run my IF NOT EXISTS CREATE DATABASE script before the "Redgate Deploy from Package" step. Then you know your DB will always exist. There is an Octopus Deploy step template to run a SQL script here:
https://library.octopusdeploy.com/step-templates/73f89638-51d1-4fbb-b68f-b71ba9e86720/actiontemplate-sql-execute-script
This step template asks you to type the script into the Octopus GUI but it does also accept variable substitution so you could package up your SQL scripts into a different NuGet and reference them from that variable.
Note, add this create script in a parent or sister directory to your SQL Source Control directory. I try to avoid adding my own scripts to the directory you give to Redgate because you can confuse Redgate tools which are designed to parse all the sql scripts in that directory.
Then, I add a simple step in Octopus Deploy to run my IF NOT EXISTS CREATE DATABASE script before the "Redgate Deploy from Package" step. Then you know your DB will always exist. There is an Octopus Deploy step template to run a SQL script here:
https://library.octopusdeploy.com/step-templates/73f89638-51d1-4fbb-b68f-b71ba9e86720/actiontemplate-sql-execute-script
This step template asks you to type the script into the Octopus GUI but it does also accept variable substitution so you could package up your SQL scripts into a different NuGet and reference them from that variable.
AlexYates
2 ·
Re: Visual Studio Team Services + DLM Automation Build - Synonyms do not seem to work in Views?
We had a problem where our test build database (we are using TeamCity) was on a different server than the source database and the linked server referred to in a couple of objects didn't exist where the test database was being built.
ChrisM
1 ·
Build failing with "Invalid Object Name" error, but the objects exist
I recently linked an existing database to source control. I was able to commit the changes locally and push them to the origin remote. A build was triggered and failed saying objects don't exist, even though they do exist in the database. I did not make any changes to the database, I'm just setting everything up now and pushing the existing database to TFS/Git. It feels like an order of operation issue because the errors are being thrown when trying to create a SPROC, TVF or View, saying tables they are referencing don't exist. They do exist in the database though.
mugojoe
1 ·
Re: no databases in listbox
Hi,
Thank you for the reply.
I have added the details of this post to a Bug Report whose reference is SDI-729. I will update this topic when I have news of a possible bug fix.
Thank you for bringing this problem to our attention.
Many Thanks
Eddie
Thank you for the reply.
I have added the details of this post to a Bug Report whose reference is SDI-729. I will update this topic when I have news of a possible bug fix.
Thank you for bringing this problem to our attention.
Many Thanks
Eddie
Eddie D
1 ·
Re: What exact permissions are needed for the user to un encrypt stored procs
Hi @gdominguez,
If you want to see the script of your encrypted object, please take a look at this post .
I hope it helps,
Regards,
Fabiola
If you want to see the script of your encrypted object, please take a look at this post .
I hope it helps,
Regards,
Fabiola
FabiolaB
1 ·
Re: Objects not listed for sql database
Hi, thank you for your forum post.
SQL Dependency Tracker uses the SQL Compare engine code so requires the same permissions as SQL Compare. The list of permissions is available in the link below:
https://documentation.red-gate.com/display/SC11/Permissions+required+to+use+SQL+Compare
You may also require the GRANT VIEW SERVER STATE TO <user> permission.
Many Thanks
Eddie
SQL Dependency Tracker uses the SQL Compare engine code so requires the same permissions as SQL Compare. The list of permissions is available in the link below:
https://documentation.red-gate.com/display/SC11/Permissions+required+to+use+SQL+Compare
You may also require the GRANT VIEW SERVER STATE TO <user> permission.
Many Thanks
Eddie
Eddie D
1 ·
Re: Error parsing valid SQL
Was able to download the latest version and the issue seems to be resolved!
Thanks for the help @Mike U @Tianjiao_Li
Thanks for the help @Mike U @Tianjiao_Li
tonywaddle
2 ·
Re: Any known installation issues with version 7. 1. 16. 10851?
Installation of SQLMonitor works fine after installing .Net 4.6.1
Alex_indiwa
1 ·
Re: Smart Rename on a column crashes SSMS.
The reinstall worked for me as well. Thanks @blankenbush!
Luc
1 ·