Этот баннер — требование Роскомнадзора для исполнения 152 ФЗ.
«На сайте осуществляется обработка файлов cookie, необходимых для работы сайта, а также для анализа использования сайта и улучшения предоставляемых сервисов с использованием метрической программы Яндекс.Метрика. Продолжая использовать сайт, вы даёте согласие с использованием данных технологий».
Политика конфиденциальности
|
|
|
Работа с файлами
|
|||
|---|---|---|---|
|
#18+
Подскажите пожалуйста, можно ли средствами SQL Server получить время создания(модификации) файла на диске. Спасибо. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 31.08.2001, 09:00 |
|
||
|
Работа с файлами
|
|||
|---|---|---|---|
|
#18+
С помощью процедур sp_OA... можно работать с ActiveX объектом, гордо именуемым Windows Scripting Host, а у него есть под'объект FileSystemObject. Все это наталкивает на мысль, что желаемое реализуемо при должном корпении в MSDN и Books Online. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 31.08.2001, 09:10 |
|
||
|
Работа с файлами
|
|||
|---|---|---|---|
|
#18+
Можно и проще. create table #dir_content (str varchar(255)) insert into #dir_content exec xp_cmdshell 'dir <path to the file>' ну, а дальше выкусывай эту дату из таблицы #dir_content ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 31.08.2001, 09:19 |
|
||
|
Работа с файлами
|
|||
|---|---|---|---|
|
#18+
Пояснение к insert into #dir_content exec xp_cmdshell 'dir <path to the file>' Выполнить xp_cmdshell сможет только пользовтель с правами админа, т.е. "sa" ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 31.08.2001, 10:03 |
|
||
|
Работа с файлами
|
|||
|---|---|---|---|
|
#18+
А если быть совсем точным, то "By default, only members of the sysadmin fixed server role can execute this extended stored procedure. You may, however, grant other users permission to execute this stored procedure. When xp_cmdshell is invoked by a user who is a member of the sysadmin fixed server role, xp_cmdshell will be executed under the security context in which the SQL Server service is running . When the user is not a member of the sysadmin group, xp_cmdshell will impersonate the SQL Server Agent proxy account , which is specified using xp_sqlagent_proxy_account. If the proxy account is not available, xp_cmdshell will fail . This is true only for Microsoft® Windows NT® 4.0 and Windows 2000. On Windows 9.x, there is no impersonation and xp_cmdshell is always executed under the security context of the Windows 9.x user who started SQL Server. Note In earlier versions, a user who was granted execute permissions for xp_cmdshell ran the command in the context of the MSSQLServer service's user account. SQL Server could be configured (through a configuration option) so that users who did not have sa access to SQL Server could run xp_cmdshell in the context of the SQLExecutiveCmdExec Windows NT account. In SQL Server 7.0, the account is called SQLAgentCmdExec. Users who are not members of the sysadmin fixed server role now run commands in the context of this account without specifying a configuration change. " ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 31.08.2001, 10:20 |
|
||
|
Работа с файлами
|
|||
|---|---|---|---|
|
#18+
Хотелось бы разобраться с sp_AO... (полезная штука), но ни в MSDN ни в BOL я ничего не нашел (SQL 7.0), может у кого есть ссылки на информацию по этому поводу. Пока придется использовать xp_cmdshell. Спасибо. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 31.08.2001, 10:31 |
|
||
|
Работа с файлами
|
|||
|---|---|---|---|
|
#18+
Не sp_AO.., а sp_OA... Напрмер, sp_OACreate. В BOL есть. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 31.08.2001, 10:35 |
|
||
|
|

start [/forum/topic.php?fid=46&gotonew=1&tid=1825670]: |
0ms |
get settings: |
6ms |
get forum list: |
10ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
36ms |
get topic data: |
7ms |
get first new msg: |
4ms |
get forum data: |
2ms |
get page messages: |
28ms |
get tp. blocked users: |
1ms |
| others: | 209ms |
| total: | 307ms |

| 0 / 0 |
