Comments
Sort by recent activity
Thanks for your post - are you referring to adding descriptions against various objects in your database?
If so, these are stored in the database itself as extended properties (assuming you have write access) - as detailed here:
So, when you restore your database, you will get a version that doesn't have all the descriptions you previously created and then lose them.
Is it possible for you to add the descriptions against the production database so that when you restore, you keep all those?
Failing that, you may be able to produce a script you can re-run after restoring to replace all the descriptions you entered previously. The example here creates a stored procedure you can then execute that will produce all the create commands for the extended properties. I think it looks like it only works on tables, but you can perhaps amend it to work on other objects too. You could then run this after documenting everything, produce the script, then run it on the restored data. / comments
Thanks for your post - are you referring to adding descriptions against various objects in your database?
If so, these are stored in the database itself as extended properties (assuming you have wr...
Hi,
We've opened you a ticket to investigate this, and will be in contact with you directly.
Thanks! / comments
Hi,
We've opened you a ticket to investigate this, and will be in contact with you directly.
Thanks!
Glad to hear you got it working! / comments
Glad to hear you got it working!
This isn't really something that Data Compare is designed to do (as you've discovered).
You might want to check out SQL Packager which can create scripts of your database (schema / data / both) / comments
This isn't really something that Data Compare is designed to do (as you've discovered).
You might want to check out SQL Packager which can create scripts of your database (schema / data / both)
It looks like something hasn't updated correctly. Could you try uninstalling, deleting the contents of the Data Compare folder from within Program Files\Red Gate, and then trying again? / comments
It looks like something hasn't updated correctly. Could you try uninstalling, deleting the contents of the Data Compare folder from within Program Files\Red Gate, and then trying again?
I can confirm the same behaviour. I'll log this as a bug at this end, and it will then get considered for a future release.
Thanks! / comments
I can confirm the same behaviour. I'll log this as a bug at this end, and it will then get considered for a future release.
Thanks!
That makes sense. You'll need to include the IUniqueable interface and implement it, then your generator will show.
Obviously if the Index is only including that column, it will probably fail due to the values not being... unique [image]
See below for example:
using System;
using System.Collections.Generic;
using System.Text;
using RedGate.SQLDataGenerator.Engine;
using RedGate.SQLDataGenerator.Engine.Generators;
using RedGate.SQLDataGenerator.Engine.Generators.Static;
namespace CompanyEmailGenerator
{
[Generator(typeof(String), "Generic", "Company Emails", "In [url=a.b@nowhere.com]a.b@nowhere.com[/url] format")]
public class EmailGenerator : IGenerator, IUniqueableGenerator
{
protected List<string> testdata = new List<string>();
bool m_Unique;
public EmailGenerator(GeneratorParameters parameters)
{
testdata.Add("marge.n.overror@nowhere.com");
testdata.Add("heywood.ubuzzoff@nowhere.com");
testdata.Add("heywood.ustopitt@nowhere.com");
testdata.Add("heywood.ulevmealohn@nowhere.com");
testdata.Add("les.izmore@nowhere.com");
testdata.Add("itwerks.onanoff@nowhere.com");
}
public System.Collections.IEnumerator GetEnumerator(GenerationSession session)
{
Random rnd = new Random(DateTime.Now.Millisecond);
while (true)
{
yield return testdata[rnd.Next(0, testdata.Count)];
}
}
public bool Unique
{
get { return m_Unique; }
set { m_Unique = value; }
}
}
} / comments
That makes sense. You'll need to include the IUniqueable interface and implement it, then your generator will show.
Obviously if the Index is only including that column, it will probably fail due t...
Definitely a bit strange.
Is it possible for you to send over the database to us so we can test it here? You can mail it to support@red-gate.com quoting F0040000 in the subject line, along with details of which tables/columns are causing the problem (or include your project).
If could also include the xml config file and DLL it would be great, just in case I built mine slightly differently to yourself. / comments
Definitely a bit strange.
Is it possible for you to send over the database to us so we can test it here? You can mail it to support@red-gate.com quoting F0040000 in the subject line, along with det...
Thanks for your post.
I've created a generator myself based on your class, and got it to appear for both nvarchar and varchar columns.
Could you perhaps post your config file, or, if you prefer, email it to support@red-gate.com quoting F0040000 in the subject line?
Thanks! / comments
Thanks for your post.
I've created a generator myself based on your class, and got it to appear for both nvarchar and varchar columns.
Could you perhaps post your config file, or, if you prefer, em...
I don't think the .cs file will be the problem. Once you have your DLL in place in the Generators folder, you need a config file to then help it show up in Data Generator. This will go in the "config" subfolder. For instance, when testing your class, I created "CompanyEmail.xml" with the following contents:
<?xml version="1.0" encoding="iso-8859-1"?>
<generators>
<generator /* Specify the class. */
type="EmailGenerator"
name="Company Emails"
description="In a.b@nowhere.com format"
category="Generic">
/* Specify the columns that match, and their score. */
<matches field="*" score="50"/>
/* Define the data types for which the generator is valid. */
<type type="string"/>
</generator> / comments
I don't think the .cs file will be the problem. Once you have your DLL in place in the Generators folder, you need a config file to then help it show up in Data Generator. This will go in the "conf...