Comments
Sort by recent activity
It sounds like you're looking for a "last accessed date" for each table, similar to the last schema modification date feature released in SQL Compare 12. That work was done in response to a UserVoice request, although I can't see one for this feature. It would be good to gauge whether many people want this kind of feature, as well as what exactly they want (e.g. last read versus last write time). / comments
It sounds like you're looking for a "last accessed date" for each table, similar to the last schema modification date feature released in SQL Compare 12. That work was done in response to a UserVo...
Scripts folders in SQL Compare are intended to be a readable, diff-friendly representation of the objects in your database, and don't support arbitrary SQL. In your example, it would be difficult for SQL Compare to detect what the conditional EXEC is doing to the schema of the database. That said, SQL Compare can register the SQL Server 2016 CREATE OR ALTER VIEW syntax from a scripts folder, which looks like it might satisfy your use case. Does this help? / comments
Scripts folders in SQL Compare are intended to be a readable, diff-friendly representation of the objects in your database, and don't support arbitrary SQL. In your example, it would be difficult ...
SQL Compare and Data Compare initially query the databases in order to compare them; this should not lock any objects, unless you have a very unusual setup (e.g. a database in single user mode). Many deployment scripts use a long transaction to ensure that as much of the script as possible will be rolled back if an error is encountered. Depending on the operations you are performing, this could lock certain objects for an extended period of time while the script runs. You can tick the "Don't use transactions" option to avoid this, although this will increase the risk of leaving the database in a partially-deployed state. / comments
SQL Compare and Data Compare initially query the databases in order to compare them; this should not lock any objects, unless you have a very unusual setup (e.g. a database in single user mode).Man...
You could create a scripts folder using SQL Compare and then add (or replace) the procedure inside it. However, Compare can have some unpredictable behaviour if you cause the scripts folder to be inconsistent, for example by referencing nonexistent objects from your procedure. / comments
You could create a scripts folder using SQL Compare and then add (or replace) the procedure inside it. However, Compare can have some unpredictable behaviour if you cause the scripts folder to be ...
If the schema is the same across all these databases, your best bet is probably to exclude the columns in the Tables & Views tab, save a project file and then reuse this project file against other databases. Does that work for you? / comments
If the schema is the same across all these databases, your best bet is probably to exclude the columns in the Tables & Views tab, save a project file and then reuse this project file against other ...
SQL Compare and Data Compare project files are also just XML, so in principle it should be perfectly possible to craft the file you need. WHERE clauses don't look too complex, although the mappings and object-level selections will be trickier if you need them. / comments
SQL Compare and Data Compare project files are also just XML, so in principle it should be perfectly possible to craft the file you need. WHERE clauses don't look too complex, although the mapping...
I've sometimes seen this when the object (table, view...) was selected but all the properties on it (columns, indexes...) were not selected. Is this the case? If it was intentional, we'd also be interested to know your use case for this configuration. / comments
I've sometimes seen this when the object (table, view...) was selected but all the properties on it (columns, indexes...) were not selected. Is this the case? If it was intentional, we'd also be ...
SQL Search uses automatic updates; it sounds like version 2.4 is updating straight to version 3.1 which doesn't support SSMS 2008. Could you try installing version 3.0.7, which disables automatic updates whenever old versions of SSMS are detected? You can find it at https://www.red-gate.com/products/old-versions / comments
SQL Search uses automatic updates; it sounds like version 2.4 is updating straight to version 3.1 which doesn't support SSMS 2008.Could you try installing version 3.0.7, which disables automatic up...
If it's the deployment that takes a long time, the easiest option is probably to open the deployment script in SSMS and run parts of it so you can see what's going on. If the initial population of data in the UI is taking a long time, take a look at the "Tables & Views" tab in the Edit Project dialog. You can deselect the tables you aren't interested in, which should speed up the comparison. / comments
If it's the deployment that takes a long time, the easiest option is probably to open the deployment script in SSMS and run parts of it so you can see what's going on. If the initial population of...
I work on SQL Compare, so I'm not exactly a Backup expert, but our test framework restores an enormous number of backups. The filegroup paths are handled by first calling SQL Backup with `RESTORE HEADERLISTONLY`, which will list the files without doing an actual restore. We use the result of this command to craft a `RESTORE WITH MOVE` script. Unfortunately the code is difficult to post here because it's baked into the C# test framework, with loads of special cases for escaping filenames, multipart backups, SQB versus native, Linux versus Windows, network flakiness, caching layers and so on. I'd be really interested to know if anyone has found a succinct way to do it. Here's a quick stab I made at doing it in SQL: DECLARE @backupFile AS NVARCHAR(MAX) = 'C:\path\to\backup.sqb'
DECLARE @pathOnServer AS NVARCHAR(MAX) = 'C:\Foo\Bar\Baz'
DECLARE @listCommand AS NVARCHAR(MAX) = 'RESTORE FILELISTONLY FROM DISK=''' + @backupFile + ''''
CREATE TABLE ##files (
LogicalName NVARCHAR(MAX),
PhysicalName NVARCHAR(MAX),
Type CHAR,
FileGroupName NVARCHAR(MAX),
Size BIGINT,
MaxSize BIGINT,
FileID INT,
CreateLSN INT,
DropLSN INT,
UniqueID UNIQUEIDENTIFIER,
ReadOnlyLSN INT,
ReadWriteLSN INT,
BackupSizeInBytes BIGINT,
SourceBlockSize INT,
FileGroupID INT,
LogGroupGUID UNIQUEIDENTIFIER,
DifferentialBaseLSN BIGINT,
DifferentialBaseGUID UNIQUEIDENTIFIER,
IsReadOnly BIT,
IsPresent BIT
)
INSERT INTO ##files EXEC master.dbo.sqlbackup @listCommand
-- SELECT * FROM ##files
SELECT 'MOVE N''' + LogicalName + ''' TO ''' + @pathOnServer + '\' + LogicalName + (CASE Type WHEN 'D' THEN '.mdf' WHEN 'L' THEN '.ldf' ELSE '' END) + '''' FROM ##files
DROP TABLE ##files
Hope that helps! / comments
I work on SQL Compare, so I'm not exactly a Backup expert, but our test framework restores an enormous number of backups. The filegroup paths are handled by first calling SQL Backup with `RESTORE ...