Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
sa28-00 [2017/05/30 10:44] – [Configuration] Justin Willey | sa28-00 [2019/10/18 10:43] – Justin Willey | ||
---|---|---|---|
Line 14: | Line 14: | ||
- The most important bit – ensure that the designated folder is backed up, preferably by some kind of live sync arrangement. | - The most important bit – ensure that the designated folder is backed up, preferably by some kind of live sync arrangement. | ||
- It is highly desirable that the designated folder is ONLY accessible by the Windows user account that the database engine is run under and the user account used for the sync / backup process. This will reduce the chance of any inadvertent editing / deleting of the blob files. | - It is highly desirable that the designated folder is ONLY accessible by the Windows user account that the database engine is run under and the user account used for the sync / backup process. This will reduce the chance of any inadvertent editing / deleting of the blob files. | ||
- | - Set params.BlobExternalRootFolder to the path to the above folder - for example:< | + | - Set params.BlobExternalRootFolder to the path to the above folder - for example:< |
- Set params.BlobExternalStorage to 1 ie:< | - Set params.BlobExternalStorage to 1 ie:< | ||
- | From this point every blob that is created or edited will be saved externally. The [[sa28-00# | + | As users re-enter IQX, every blob that is created or edited will be saved externally. It is important therefore to get all users to exit and re login to IQX once the changes have been made. The [[sa28-00# |
<note warning> | <note warning> | ||
Line 33: | Line 33: | ||
====BlobRelocate Job==== | ====BlobRelocate Job==== | ||
- | |||
<sxh xml> | <sxh xml> | ||
<?xml version=" | <?xml version=" | ||
Line 71: | Line 70: | ||
</ | </ | ||
</ | </ | ||
- | |||
==== Validating the External Storage ==== | ==== Validating the External Storage ==== | ||
Line 83: | Line 81: | ||
DECLARE " | DECLARE " | ||
-- create temp table to hold errors | -- create temp table to hold errors | ||
- | DECLARE LOCAL TEMPORARY TABLE BlobStoreCheckIssue(" | + | DECLARE LOCAL TEMPORARY TABLE BlobStoreCheckIssue(" |
+ | " | ||
-- regularise Standard and Alternative locations | -- regularise Standard and Alternative locations | ||
SET " | SET " | ||
Line 92: | Line 91: | ||
-- loop through external blobs | -- loop through external blobs | ||
FOR BlobLoop as BlobCursor NO SCROLL CURSOR | FOR BlobLoop as BlobCursor NO SCROLL CURSOR | ||
- | FOR select " | + | FOR select " |
+ | from BlobStore where " | ||
FOR READ ONLY | FOR READ ONLY | ||
DO | DO | ||
Line 116: | Line 116: | ||
set " | set " | ||
if exists (select * from sp_list_directory(" | if exists (select * from sp_list_directory(" | ||
- | then update BlobStoreCheckIssue set " | + | then update BlobStoreCheckIssue set " |
- | else update BlobStoreCheckIssue set " | + | |
+ | else update BlobStoreCheckIssue set " | ||
+ | | ||
end if; | end if; | ||
END FOR; | END FOR; | ||
- | select " | + | select " |
+ | | ||
+ | | ||
+ | | ||
END; | END; | ||
</ | </ | ||
Line 139: | Line 144: | ||
BEGIN | BEGIN | ||
DECLARE @StandardLocation long varchar; | DECLARE @StandardLocation long varchar; | ||
- | DECLARE LOCAL TEMPORARY TABLE BlobFiles(" | + | DECLARE LOCAL TEMPORARY TABLE BlobFiles(" |
+ | | ||
-- regularise Standard and Alternative locations | -- regularise Standard and Alternative locations | ||
SET " | SET " | ||
Line 151: | Line 157: | ||
-- Find the files in the file system | -- Find the files in the file system | ||
INSERT INTO BlobFiles(" | INSERT INTO BlobFiles(" | ||
- | SELECT ' | + | SELECT ' |
+ | from sp_list_directory(@AlternativeLocation, | ||
CREATE INDEX A ON BlobFiles(" | CREATE INDEX A ON BlobFiles(" | ||
-- select those files only listed in the file system | -- select those files only listed in the file system | ||
SELECT FilePath , | SELECT FilePath , | ||
- | | + | |
+ | | ||
END; | END; | ||
</ | </ | ||
Line 164: | Line 172: | ||
which gives a result like: | which gives a result like: | ||
- | ^FilePath^FileSizeInKB^Created^Modified^Accessed^ | + | ^FilePath^ FileSizeInKB^ Created^ Modified^ Accessed^ |
|i: | |i: | ||
|i: | |i: | ||
Line 171: | Line 179: | ||
Each of these procedures can take an optional parameter of an alternative BlobStore folder, if specified, this will be compared with the contents of the BlobStore instead. This can be useful for checking that the backup of the external BlobStore is being correctly replicated. | Each of these procedures can take an optional parameter of an alternative BlobStore folder, if specified, this will be compared with the contents of the BlobStore instead. This can be useful for checking that the backup of the external BlobStore is being correctly replicated. | ||
| | ||
+ |