Comments
Sort by recent activity
emoreau wrote:
so the space is the wild card. it makes sens when compared to search engine like Google but not when you are minded to SQL!
The space isn't really the wildcard. Searching for two words separated by a space will OR them. This is what Google does, for example.
We appreciate that it goes against the standard SQL wildcards. I'd be interested to hear from other people with regards to what they would find most intuitive. Please tell us your preference.
David Atkinson
Product Manager / comments
emoreau wrote:
so the space is the wild card. it makes sens when compared to search engine like Google but not when you are minded to SQL!
The space isn't really the wildcard. Searching for tw...
That's tricky unless all your target databases are identical. It's a big ask to expect a rerunnable script that is guaranteed to work against targets that may have subtly different schemas and data.
If you really need to automate this, one thing that you might consider is to use the SQL Comparison SDK to programmatically compare and synchronize your targets. Because the comparison is being done afresh on each target, the script will be correct each time. However, if you are updating production servers, I would strongly recommend you do this on a case by case basis using a script that has been carefully reviewed.
However, if you know that your targets are all identical, you should be able to generate a single script with SQL Compare / SQL Data Compare, or SQL Packager, which can be run on each of them.
David / comments
That's tricky unless all your target databases are identical. It's a big ask to expect a rerunnable script that is guaranteed to work against targets that may have subtly different schemas and data...
You're right, SQL Data Compare will require the table to exist in the target, so you'll have to generate the schema script first, apply it to your target database (please do this on a 'test' database!), then generate the data script as a second step. Please give this a go and let me know how you get on.
David / comments
You're right, SQL Data Compare will require the table to exist in the target, so you'll have to generate the schema script first, apply it to your target database (please do this on a 'test' databa...
juliajuliabell wrote:
If a table exists in the source database, but not in the target database, is it possible to use a combination of SQL Compare/SQL Data Compare to script the schema and the data in one step?
Can I ask what problem you're trying to solve in your scenario so we can better advise you? SQL Packager can create a script in one wizard, but maybe you're looking to do something else?
David Atkinson
Product Manager
Red Gate Software / comments
juliajuliabell wrote:
If a table exists in the source database, but not in the target database, is it possible to use a combination of SQL Compare/SQL Data Compare to script the schema and the d...
SQL Compare 9.5 can re-use custom migration scripts that have been committed to SQL Source Control 3. This means you can modify your scripts to update the existing values without having to set a default. http://www.red-gate.com/MessageBoard/vi ... 1312#51312
Let us know if this satisfies your needs.
David Atkinson
Red Gate Software / comments
SQL Compare 9.5 can re-use custom migration scripts that have been committed to SQL Source Control 3. This means you can modify your scripts to update the existing values without having to set a de...
Thanks for that. This is a feature that is close to the top of our priority list so do look out for it in the next major version. In the meantime, the easiest thing to do is to change the columns to take a default, then change them back afterwards.
David / comments
Thanks for that. This is a feature that is close to the top of our priority list so do look out for it in the next major version. In the meantime, the easiest thing to do is to change the columns t...
juliajuliabell wrote:
Is it possible to set a default value for a newly created NOT NULL column, without actually setting a default value in the database?
I guess in order to do this the script would have to create the column as NULL, update it with the default value and then alter it to NOT NULL. Or something along those lines.
This isn't possible right now, although it's something we're hoping to add soon. Can I ask whether you'd prefer to specify your own default, or if your source database has actual data values from which the values going into the new column can be populated?
David Atkinson
Product Manager
Red Gate Software / comments
juliajuliabell wrote:
Is it possible to set a default value for a newly created NOT NULL column, without actually setting a default value in the database?
I guess in order to do this the script ...
You could just try searching for the string: datetime2
Does this not work?
David / comments
You could just try searching for the string: datetime2
Does this not work?
David
This could be an oversight. We'll have a closer look and see if this is something that is supposed to work.
Thanks for bringing this to our attention. We're hoping to have a new version in January, although this may slip by a few weeks.
Kind regards,
David / comments
This could be an oversight. We'll have a closer look and see if this is something that is supposed to work.
Thanks for bringing this to our attention. We're hoping to have a new version in January,...
That's a great idea. Out of interest, what is the reason given by the client to use them? How would you like this to work? Would it take a database and modify all stored procedures, for example, and add the semi colons, or would it simply add them to a script that is open in a query window?
If anyone else is looking for this functionality, please let us know.
David Atkinson
Product Manager
Red Gate Software / comments
That's a great idea. Out of interest, what is the reason given by the client to use them? How would you like this to work? Would it take a database and modify all stored procedures, for example, an...