This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
dm_tran_locks.request_session_id AS IDСессии, | |
CASE | |
WHEN resource_type = 'object' | |
THEN OBJECT_NAME(dm_tran_locks.resource_associated_entity_id) | |
ELSE OBJECT_NAME(partitions.object_id) | |
END AS ИмяОбъекта, | |
indexes.name AS ИмяИндекса, | |
CASE dm_tran_locks.resource_type | |
WHEN 'KEY' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Clear-Host | |
# ПАРАМЕТРЫ | |
# Адрес информационной базы | |
$urlDB = "iA11/demo" | |
# Имя пользователя | |
$user = "" | |
# Пароль пользователя | |
$password = "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
obj.name, | |
obj.create_date, | |
obj.modify_date, | |
SUM(row_count) | |
FROM sys.objects AS obj | |
INNER JOIN sys.dm_db_partition_stats AS st | |
ON obj.object_id = st.object_id | |
AND (index_id=0 OR index_id=1) | |
GROUP BY |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE ChangeLog_test | |
GO | |
--DROP TRIGGER | |
DROP TRIGGER tr_MScdc_ddl_event ON DATABASE | |
--disable CDC and DROP DDL TABLE | |
EXEC sys.sp_cdc_disable_db | |
GO | |
--enable CDC | |
EXEC sys.sp_cdc_enable_db | |
GO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
New-Object System.IO.Compression.DeflateStream([System.IO.File]::Open('<файл архив>', [System.IO.FileMode]::Open), [System.IO.Compression.CompressionMode]::Decompress)).CopyTo([System.IO.File]::Create('<файл результат>')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Процедура ТекстВБуферОбменаОС(Знач Текст) Экспорт | |
// http://partners.v8.1c.ru/forum/thread.jsp?id=1075241#1075241 | |
Попытка | |
Документ = Новый COMОбъект("HTMLFILE"); // 10мс | |
Окно = Документ.parentWindow; | |
Окно.ClipboardData.SetData("Text", ?(ТипЗнч(Текст) = Тип("Строка"), Текст, Строка(Текст))); | |
Исключение | |
ВызватьИсключение ПодробноеПредставлениеОшибки(ИнформацияОбОшибке()); | |
КонецПопытки; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
СоединениеADO = Новый COMОбъект("ADODB.Connection"); | |
СоединениеADO.Open("Provider=SQLOLEDB; Data Source=""iA11""; Initial Catalog=""DemoSSL""; User Id=""""; Password="""";Trusted_Connection=Yes"); | |
Запрос = Новый COMОбъект("ADODB.RecordSet"); | |
Запрос.ActiveConnection = СоединениеADO; | |
Запрос.Open("SELECT _ID, _ActivationCondition FROM dbo._ScheduledJobs2374"); | |
Value = Запрос.Fields(1).Value; | |
Буфер = Новый БуферДвоичныхДанных(Value.GetLength()); | |
Для Индекс = 0 По Value.GetLength()-1 Цикл | |
Буфер.Установить(Индекс, Value.GetValue(Индекс)); | |
КонецЦикла; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ЧтениеДанных = Новый ЧтениеДанных(ПолноеИмя); | |
Буфер = ЧтениеДанных.ПрочитатьВБуферДвоичныхДанных(); | |
ЧтениеДанных.Закрыть(); | |
ЧтениеТекста = Новый ЧтениеТекста(Новый ПотокВПамяти(Буфер)); | |
Текст = ЧтениеТекста.Прочитать(); | |
ЧтениеТекста.Закрыть(); | |
//Текст; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$value = 'ПланСчетов.Хозрасчетный', 'ConfigDumpInfo', 'Configuration' | |
$folder = 'folder_1c' | |
$result = '<folder_result>' | |
$srv = '<srv>' | |
$ref = '<ref>' | |
#---------------------------------------------------------------------------------------- | |
$listFile = Join-Path $result 'listFile.txt' | |
$value | Out-File $listFile | |
Set-Location $folder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set-Location 'C:\Program Files\1cv8\8.3.18.1520\bin' | |
.\1cv8.exe DESIGNER /S16-113\tmp /DumpConfigToFiles 'D:\xml' -Format Plain |
NewerOlder