Redgate's SQL Dependency tracker does not show the dependencies for some databases...Why? - redgate

Redgate's SQL Dependency tracker does not show the dependencies for some databases...Why?These databases have tables,stored procs etc and I have all rights to the database.

You have to click the button to resolve external references. If it's not that, it's database-specific and time to get in touch with support.

For this particular database> right click on it.> go to properties>Options>
The compatibility level was set to SQL Server 7.0.
Changed the compatibility level to SQL Server 2005(90)
Now i am able to view the dependencies.
This is how i resolved the issue.
Finding out the external references is a total different scenario.
Sometimes some databases may not have any external references at all.
Solution to this has been posted on this blog: http://sqldeveloper9999.wordpress.com/2013/10/18/redgates-sql-dependency-tracker-does-not-show-dependencies-on-a-few-databases/

Related

Drools Version 7.52 not using GDST Hit Policy

My Drools project has a number of GDSTs (Guided Decision Tables); those tables were created in the JBPM Workbench with hit policies of either 'First Hit' or 'Rule Order'. After upgrading from version 7.39 to 7.52 those policies are no longer being used. This is causing a lot of infinite loops.
Is there anyway to debug why this might be happening?
I will continue recompiling my projects at different version levels, 7.39, 7.40, etc; to try and determine where the support for Hit Policies stopped working but for now I was wondering if anyone else had experienced this issue and how they resolved it.
I am working on creating some JBPM objects that I can post, my actual project has data that I can not share. The additional details should be ready in a few hours. Sorry jumped the gun when posting the question, I know it needs more details, pom files at the very least.
Update Jun 8, 2021
First a quick background:
I am using the JBPM-Server Ver 7.52 that you can download from Drools website. Simply run the standalone.sh and you will have access to the Business Central Workbench.
Once in the Workbench I created some data objects and a few GDST's. The GDST's are created with Hit Policies of either 'First Hit' or 'Rule Order'. Also, when updating a field on the data object I am setting the 'Update Engine' option.
After the Workbench project has been created I can download the KJAR artifact and use it as a dependency in a Java API that pulls in data, loads the KieSession with rules from the artifact and data, executes the rules and processes the responses.
I know that the 'Update Engine' option, in combination with the loss of support for the Hit Policies, is causing the infinite loops.
I have also determined that this stopped working at version 7.52, everything works perfectly from versions 7.39 all the way through 7.51.
The only difference I have found between the two versions is that at 7.52 the 'source' for the GDST is now adding an activation-group parameter related the hit policy.

Is it possible to keep a Postgres database schema under source control using DataGrip?

With Microsoft SQL Server, there is a great schema comparison tool which lets you keep a database schema under source control and push changes in both directions (schema project to database and database to schema project) which can then be kept under source control. This made development very easy directly on the local database, push the changes to the source controlled project and then apply the changes to other environments when required by using the schema comparison tool to generate the updates from the diff.
Is there any way to do something similar to this with DataGrip for PostgreSQL?
Including how to keep a database as schema files.
I've seen that there is VCS integration but I can't get it to generate a project from a database and Google doesn't seem to help.
Any help would be greatly appreciated.
Thanks, James
There is no full integration for now. This is the ticket to follow: https://youtrack.jetbrains.com/issue/DBE-3852
But you can now already generate you file-project for your database.
Select schema in the database explorer
Context menu -> SQL scripts -> SQL Generator
Choose the tab with the diskette, select options
Press Save.

Database Project failing on Azure Dev Ops build pipeline

Bringing a client old win forms application into our development ecosystem. Part of the effort is putting their db under source control with a database project.
When I build locally (VS 2017) - I get a bunch of warnings that some of the stored procs / functions reference objects that do not exists.
For Example:
Warning: SQL71502: Procedure: [dbo].[proc_WORKORDERDETAILUpdate] has an unresolved reference to object [dbo].[WORKORDERDETAIL].[WORKERORDERNUMBER].
In this particular scenario - the entire table is missing from the database.
The stored procs in the db are out of date. Obviously they are not being used. I am not trying to fix this whole mess now. Just get the app and db under source control.
When I check this in - the build definition is failing on the database project. The warnings I get locally are now treated as hard errors on the build server.
Error SQL71502: Procedure: [dbo].[proc_WORKORDERDETAILUpdate] has an unresolved reference to object [dbo].[WORKORDERDETAIL].[WORKERORDERNUMBER].
I got it. Rookie mistake.
I had the "Treat warnings as Errors" box unchecked for the debug configuration - hence why I was fine locally.
My release (build server) configuration is was not the same. It was not until I looked at the project.sqlproj xml file that saw the differences.
I leave this here just in case anyone else runs into a build server problem that cannot be replicated locally. Maybe it will give them a pointer.

How do I change an entity framework project to use Microsoft SQL Server

I am trying to debug a program using Entity Framework code first on my personal (work) computer.
We have recently had a domain migration, meaning that the user I log in as now is not the same that I used before. This caused me to loose access to the databases I had on the computer. To get around this, I have uninstalled everything to do with Microsoft SQL Server on the computer, and installed the latest version of Microsoft SQL Server, 2014 - 12.0.4213.0 . I then restored the database I need.
When I first tried to run the program, Visual Studio complained that the project is set up to use SQL Server Express, which was not installed. The recommended solution is to change the project to use SQL Server instead. To do this, I must click on "the database file" and follow the instructions. I have looked through the entire solution. There is a great many files, but I found no good candidate for "the database file."
It seems that my Google fu is not strong enough to find anything about this. So my question is: how do I change the project to use SQL Server?
I also have a second, related question. I tried to solve the problem by installing SQL Server Express. However, when I try to restore the database to this, no base appears in the drop down list. When I try to run the program now, I get another error:
Unable to create the file 'c:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\Timelønsblanket.mdf' because it already exists.
I guess that this is also why I cannot restore the database. What I have found in websearches warns that I should not manually delete .mdf files.
Any advice on what to do?
I have solved the problem. All that was needed was a correct connection string. No need to find a "database file".

Sitecore Powershell Console - Copy Media Items from one DB to another

We are in process of upgrading Sitecore 6.6 to 7.2. Part of upgrade is to migrate all the media items from 6.6 to 7.2.
I tried creating a package but the package size is too large and times out on package installation.
I found link below using Powershell Console where it shows copy-item command:
http://blog.najmanowicz.com/2011/11/18/sample-scripts-for-sitecore-powershell-console
I attached the 6.6 to 7.2 version where I can access the 6.6 DB. However copy-item doesn't seem to support different databases.
Could someone please help how I can use SiteCore Powershell or similar to migrate media items from 6.6 to 7.2?
I had a similar issue with a (very large) media library with a similar migration. Packages seems to bomb out around the 2GB mark, instead serialize the items:
Delete everything from /Data/Serialization
Open the media library. Makes sure you have the Developer tab
showing (right click somewhere on the toolbar and enable it
otherwise)
Select your root media item then Serialize Tree
Wait...
Copy the serialized files from /Data/Serialization to your new
server
From the toolbar select Update or Revert Tree depending on your requirements
Profit.
You can find more info in the Sitecore Serialization Guide and this post by Brian Pedersen
You should be able to do this in Powershell too (from my understanding). You need to:
Add the database to your connectionString.config
Add that database to your web.config to <sitecore><databases><database>. You can copy the existing master node and rename the id attribute to match your conneciton name
Your legacy database should now be connected to Sitecore interface, you can check it is present in the database selector list from the right of the desktop
The powershell command now needs a "from" and "to" location. Assume your database is called "legacy_master", the following should work:
copy-item "master:\media library\*" "legacy_master:\media library\"
I've found Hedgehog TDS (and sometimes Razl) quite useful for doing this.
Create a new TDS project (don't version control it), and download all the items you need to your local machine. You can for example connect the "Debug" build to your source 6.6 instance, and a "Release" build to your target 7.2 instance. Then you can just synchronize the items to your target machine. It's sometimes good to synchronize one or a few branches at a time if you have long latency connections.
The good thing about this is that you're in total control of your content and can see what fields are updated etc. During an update process, it's sometimes useful to compare other parts of the db as well, just to ensure you don't miss any changes you've made to the platform.
Since I mentioned Razl as well: I've found Razl quite good if you have a whole branch that you know should be transferred from one db to another (such as the case you describe). TDS is a bit slower, but more universal - and you may have a TDS license already so it may not be worth an additional Razl license.
I've just added item transfer from one DB to another so you can Copy-item between databases starting with Sitecore PowerShell Extensions 3.0. Thanks for the great idea!
Just to add another option you can perform tasks like this using Revolver.
WARNING: Try this in a test environment first
if we assume that:
the context item is the media library item
the current database is master
the target database is called master72
then something like this should work:
cp -r -n master72/sitecore/