Hot answers tagged

7

Don't rely on the behaviour of SSMS, which has historically been buggy or poorly documented and also sometimes changes from version to version. The easiest way to be sure is to click the "script" button on top of the dialog and compare the output to the documentation. For example when you click the script button after adding several files in the SSMS ...


4

Simple method: col field1 format a6 col field2 format a6 col lvl format a3 variable B1 varchar2(32); exec :B1 := '1:30,2:4,52:0,8:1'; select regexp_substr(regexp_substr(:B1, '[^,]+', 1, level), '[^:]+', 1) field1, regexp_substr(regexp_substr(:B1, '[^,]+', 1, level), '[^:]+', 2) field2, level lvl from dual connect by regexp_substr(:B1, '[^,]+', 1, ...


4

Well let's just go ahead and test it... Back Up Database - StackExchange General Tab Added multiple file in the Backup Properties' General Tab Backup Options We'll add a comment to inform other of what we were trying to achieve. Script Out The Backup Just so we know what SSMS does in the background we'll script out the settings and run the script ...


3

with cte as ( select distinct trim(regexp_substr('1:30,2:4,52:0,8:1,90:54', '[^,]+', 1, level)) repfield, level lvl from dual connect by regexp_substr('1:30,2:4,52:0,8:1,90:54', '[^,]+', 1, level) is not null order by lvl) select SUBSTR(repfield,1,instr(repfield , ':')-1) AS Field1, SUBSTR(repfield,instr(repfield,':')+1,length(repfield)) as ...


2

Using SSMS to create multiple backup files will stripe the backup across those files, rather than duplicating the backup onto each file. This means that each file is also needed for the restore - if you only keep one you'll only have a part of the data set.


1

Any speedup in a striped backup will come from using multiple IO channels. If all the files are in the same storage location it won't be any faster. Using multiple CPU cores to process a backup probably won't help, as backup is extremely simple. And a single CPU core can saturate the storage subsystem with backup pages. You can see this for yourself with ...


1

Splitting to separate fields of a result set is a bit tricky if you have a varying number of elements per row. There is a SQLCLR stored procedure in the SQL# library (that I wrote) that, while not in the Free version, does break a delimited string of varying elements into result set fields based on a Regular Expression delimiter. The delimiter being RegEx ...


1

This is also not pretty, but it allows for as\many\sub\folders\as\you\may\have. -- borrowing from Brent: CREATE TABLE #Files (Parentpath varchar(100), Size int); INSERT INTO #Files (Parentpath, Size) VALUES ('Business\Packets\Data\Archive', 29334), ('Coach\Loss\Wharf\Current\Blat\Splunge\More', 7337); DECLARE @s char(1) = CHAR(92), @sql nvarchar(max) =...


Only top voted, non community-wiki answers of a minimum length are eligible