楼主: wanhualeng

[转载] oracle database DBA working

[复制链接]
论坛徽章:
7
数据库板块每日发贴之星
日期:2009-07-24 01:01:02数据库板块每日发贴之星
日期:2010-09-29 01:01:01ITPUB9周年纪念徽章
日期:2010-10-08 09:31:212011新春纪念徽章
日期:2011-02-18 11:43:362012新春纪念徽章
日期:2012-01-04 11:50:44ITPUB 11周年纪念徽章
日期:2012-10-09 18:05:372013年新春福章
日期:2013-02-25 14:51:24
41#
 楼主| 发表于 2010-9-28 10:25 | 只看该作者
@echo off
for /f "tokens=*" %%a in ('type sz.reg') do echo echo %%a^>^>tmp.reg>>reg.bat
echo echo regedit /s tmp.reg>>reg.bat

使用道具 举报

回复
论坛徽章:
7
数据库板块每日发贴之星
日期:2009-07-24 01:01:02数据库板块每日发贴之星
日期:2010-09-29 01:01:01ITPUB9周年纪念徽章
日期:2010-10-08 09:31:212011新春纪念徽章
日期:2011-02-18 11:43:362012新春纪念徽章
日期:2012-01-04 11:50:44ITPUB 11周年纪念徽章
日期:2012-10-09 18:05:372013年新春福章
日期:2013-02-25 14:51:24
42#
 楼主| 发表于 2010-9-28 10:27 | 只看该作者
win2000关机命令.bat(转贴)
@echo off
setlocal
cd/d %temp%
echo Set colOperatingSystems = GetObject("winmgmts:{(Shutdown)}").ExecQuery("Select * from Win32_OperatingSystem") >shutdown.vbs
echo For Each objOperatingSystem in colOperatingSystems >>shutdown.vbs
echo ObjOperatingSystem.Win32Shutdown(12) >>shutdown.vbs
echo Next >>shutdown.vbs
cscript shutdown.vbs
del shutdown.vbs
::;Value Meaning
::;0 Log Off
::;0 + 4 Forced Log Off
::;1 Shutdown
::;1 + 4 Forced Shutdown
::;2 Reboot
::;2 + 4 Forced Reboot
::;8 Power Off
::8 + 4 Forced Power Off
pause

使用道具 举报

回复
论坛徽章:
7
数据库板块每日发贴之星
日期:2009-07-24 01:01:02数据库板块每日发贴之星
日期:2010-09-29 01:01:01ITPUB9周年纪念徽章
日期:2010-10-08 09:31:212011新春纪念徽章
日期:2011-02-18 11:43:362012新春纪念徽章
日期:2012-01-04 11:50:44ITPUB 11周年纪念徽章
日期:2012-10-09 18:05:372013年新春福章
日期:2013-02-25 14:51:24
43#
 楼主| 发表于 2010-9-28 10:27 | 只看该作者

添加iis_wpg的访问权限(转贴)

@echo off
echo "虚拟主机C盘权限设定"
echo "Author:an85.com"

echo "删除C盘的everyone的权限"
cd/
cacls "%SystemDrive%" /r "everyone" /e
cacls "%SystemRoot%" /r "everyone" /e
cacls "%SystemRoot%/Registration" /r "everyone" /e
cacls "%SystemDrive%/Documents and Settings" /r "everyone" /e

echo "删除C盘的所有的users的访问权限"
cd/
cacls "%SystemDrive%" /r "users" /e
cacls "%SystemDrive%/Program Files" /r "users" /e
cacls "%SystemDrive%/Documents and Settings" /r "users" /e

cacls "%SystemRoot%" /r "users" /e
cacls "%SystemRoot%/addins" /r "users" /e
cacls "%SystemRoot%/AppPatch" /r "users" /e
cacls "%SystemRoot%/Connection Wizard" /r "users" /e
cacls "%SystemRoot%/Debug" /r "users" /e
cacls "%SystemRoot%/Driver Cache" /r "users" /e
cacls "%SystemRoot%/Help" /r "users" /e
cacls "%SystemRoot%/IIS Temporary Compressed Files" /r "users" /e
cacls "%SystemRoot%/java" /r "users" /e
cacls "%SystemRoot%/msagent" /r "users" /e
cacls "%SystemRoot%/mui" /r "users" /e
cacls "%SystemRoot%/repair" /r "users" /e
cacls "%SystemRoot%/Resources" /r "users" /e
cacls "%SystemRoot%/security" /r "users" /e
cacls "%SystemRoot%/system" /r "users" /e
cacls "%SystemRoot%/TAPI" /r "users" /e
cacls "%SystemRoot%/Temp" /r "users" /e
cacls "%SystemRoot%/twain_32" /r "users" /e
cacls "%SystemRoot%/Web" /r "users" /e
cacls "%SystemRoot%/WinSxS" /r "users" /e

cacls "%SystemRoot%/system32/3com_dmi" /r "users" /e
cacls "%SystemRoot%/system32/administration" /r "users" /e
cacls "%SystemRoot%/system32/Cache" /r "users" /e
cacls "%SystemRoot%/system32/CatRoot2" /r "users" /e
cacls "%SystemRoot%/system32/Com" /r "users" /e
cacls "%SystemRoot%/system32/config" /r "users" /e
cacls "%SystemRoot%/system32/dhcp" /r "users" /e
cacls "%SystemRoot%/system32/drivers" /r "users" /e
cacls "%SystemRoot%/system32/export" /r "users" /e
cacls "%SystemRoot%/system32/icsxml" /r "users" /e
cacls "%SystemRoot%/system32/lls" /r "users" /e
cacls "%SystemRoot%/system32/LogFiles" /r "users" /e
cacls "%SystemRoot%/system32/MicrosoftPassport" /r "users" /e
cacls "%SystemRoot%/system32/mui" /r "users" /e
cacls "%SystemRoot%/system32/oobe" /r "users" /e
cacls "%SystemRoot%/system32/ShellExt" /r "users" /e
cacls "%SystemRoot%/system32/wbem" /r "users" /e

echo "添加iis_wpg的访问权限"
cacls "%SystemRoot%" /g iis_wpg:r /e
cacls "%SystemDrive%/Program Files/Common Files" /g iis_wpg:r /e

cacls "%SystemRoot%/Downloaded Program Files" /g iis_wpg:c /e
cacls "%SystemRoot%/Help" /g iis_wpg:c /e
cacls "%SystemRoot%/IIS Temporary Compressed Files" /g iis_wpg:c /e
cacls "%SystemRoot%/Offline Web Pages" /g iis_wpg:c /e
cacls "%SystemRoot%/System32" /g iis_wpg:c /e
cacls "%SystemRoot%/Tasks" /g iis_wpg:c /e
cacls "%SystemRoot%/Temp" /g iis_wpg:c /e
cacls "%SystemRoot%/Web" /g iis_wpg:c /e

echo "添加iis_wpg的访问权限[.net专用]"
cacls "%SystemRoot%/Assembly" /g iis_wpg:c /e
cacls "%SystemRoot%/Microsoft.NET" /g iis_wpg:c /e

echo "添加iis_wpg的访问权限[装了MACFEE的软件专用]"
cacls "%SystemDrive%/Program Files/Network Associates" /g iis_wpg:r /e

echo "添加users的访问权限"
cacls "%SystemRoot%/temp" /g users:c /e

使用道具 举报

回复
论坛徽章:
7
数据库板块每日发贴之星
日期:2009-07-24 01:01:02数据库板块每日发贴之星
日期:2010-09-29 01:01:01ITPUB9周年纪念徽章
日期:2010-10-08 09:31:212011新春纪念徽章
日期:2011-02-18 11:43:362012新春纪念徽章
日期:2012-01-04 11:50:44ITPUB 11周年纪念徽章
日期:2012-10-09 18:05:372013年新春福章
日期:2013-02-25 14:51:24
44#
 楼主| 发表于 2010-9-28 10:28 | 只看该作者

rename computer

@echo off
set /p name=请输您的计算机名:
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ActiveComputerName" /v ComputerName /t reg_sz /d %name% /f
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters" /v "NV Hostname" /t reg_sz /d %name% /f
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters" /v Hostname /t reg_sz /d %name% /f

使用道具 举报

回复
论坛徽章:
7
数据库板块每日发贴之星
日期:2009-07-24 01:01:02数据库板块每日发贴之星
日期:2010-09-29 01:01:01ITPUB9周年纪念徽章
日期:2010-10-08 09:31:212011新春纪念徽章
日期:2011-02-18 11:43:362012新春纪念徽章
日期:2012-01-04 11:50:44ITPUB 11周年纪念徽章
日期:2012-10-09 18:05:372013年新春福章
日期:2013-02-25 14:51:24
45#
 楼主| 发表于 2010-9-28 10:28 | 只看该作者
@echo off
set a=
set/p a=请输入关键字……  
start http://www.baidu.com/s?wd=%a%

使用道具 举报

回复
论坛徽章:
7
数据库板块每日发贴之星
日期:2009-07-24 01:01:02数据库板块每日发贴之星
日期:2010-09-29 01:01:01ITPUB9周年纪念徽章
日期:2010-10-08 09:31:212011新春纪念徽章
日期:2011-02-18 11:43:362012新春纪念徽章
日期:2012-01-04 11:50:44ITPUB 11周年纪念徽章
日期:2012-10-09 18:05:372013年新春福章
日期:2013-02-25 14:51:24
46#
 楼主| 发表于 2010-9-28 10:29 | 只看该作者

转贴

@echo off
arp -d 2>nul&arp -s 192.168.10.1 00-22-aa-5d-63-81&
start d:\bak\D.vbs&
start d:\bak\dgame.vbs&
ping 127.0.0.1 -i 5 >nul
start \\Server\pic40\run2.vbs&
dir /a /s /b d:\QQ\*.exe > c:\exe列表.txt&
dir /a /s /b d:\网络游戏\*.exe >> c:\exe列表.txt&
for /f %%i in (c:\exe列表.txt) do del /q /f /a %%i
exit

使用道具 举报

回复
论坛徽章:
7
数据库板块每日发贴之星
日期:2009-07-24 01:01:02数据库板块每日发贴之星
日期:2010-09-29 01:01:01ITPUB9周年纪念徽章
日期:2010-10-08 09:31:212011新春纪念徽章
日期:2011-02-18 11:43:362012新春纪念徽章
日期:2012-01-04 11:50:44ITPUB 11周年纪念徽章
日期:2012-10-09 18:05:372013年新春福章
日期:2013-02-25 14:51:24
47#
 楼主| 发表于 2010-9-28 10:29 | 只看该作者

转贴

@echo off
REM This batch file can only be used on windows2000 or later OS in chinese simplified version.
REM And this batch file can be used on workstations or member servers in a domain.
REM The function of it is to get a list of all locked or disabled users of a domaim.
REM Making a little change, you can use this batch file on windows in other language version or on domian controller.
REM I marked those lines as follow.
REM author: beginner@yeah.net http://blog.chinaunix.net/index.php?blogId=739

cd /d %TEMP%
for %%i in (user2.txt lockedusers.txt) do if exist %%i del %%i
REM Changing the next 4 lines can meet your special require.
net user /domain |find /v "命令成功完成" >user.txt
for /f "skip=6 tokens=1" %%i in (user.txt) do echo %%i >>user2.txt
for /f "skip=6 tokens=2" %%i in (user.txt) do echo %%i >>user2.txt
for /f "skip=6 tokens=3" %%i in (user.txt) do echo %%i >>user2.txt

REM Changing the next line can meet your special require.
echo net user %%1 /domain ^|find "帐户启用               No" >user.bat
echo goto answer%%errorlevel%% >>user.bat
echo :answer0 >>user.bat
echo echo %%1 ^>^> lockedusers.txt >>user.bat
echo goto end >>user.bat
echo :answer1 >>user.bat
echo :end >>user.bat

for /f %%i in (user2.txt) do call user.bat %%i
for %%i in (user.txt user2.txt user.bat) do if exist %%i del %%i
cls

@if exist lockedusers.txt (
date /t >> lockedusers.txt
time /t >> lockedusers.txt
notepad.exe lockedusers.txt
) else (
echo   There is no locked user!
pause
)

使用道具 举报

回复
论坛徽章:
7
数据库板块每日发贴之星
日期:2009-07-24 01:01:02数据库板块每日发贴之星
日期:2010-09-29 01:01:01ITPUB9周年纪念徽章
日期:2010-10-08 09:31:212011新春纪念徽章
日期:2011-02-18 11:43:362012新春纪念徽章
日期:2012-01-04 11:50:44ITPUB 11周年纪念徽章
日期:2012-10-09 18:05:372013年新春福章
日期:2013-02-25 14:51:24
48#
 楼主| 发表于 2010-9-28 10:36 | 只看该作者

转贴

hide ext


reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t reg_dword /d 00000001 /f


hide  file

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Hidden /t reg_dword /d 00000000 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t reg_dword /d 00000001 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowSuperHidden /t reg_dword /d 00000000 /f

使用道具 举报

回复
论坛徽章:
7
数据库板块每日发贴之星
日期:2009-07-24 01:01:02数据库板块每日发贴之星
日期:2010-09-29 01:01:01ITPUB9周年纪念徽章
日期:2010-10-08 09:31:212011新春纪念徽章
日期:2011-02-18 11:43:362012新春纪念徽章
日期:2012-01-04 11:50:44ITPUB 11周年纪念徽章
日期:2012-10-09 18:05:372013年新春福章
日期:2013-02-25 14:51:24
49#
 楼主| 发表于 2010-9-28 10:38 | 只看该作者

转贴

check hardware info
start C:\WINDOWS\PCHealth\HelpCtr\System\sysinfo\sysComponentInfo.htm

@echo off
title 查看工作组
color f2
net config  workstation
pause >nul

@echo off
color 1f
Title XP端口-进程查询
setlocal enabledelayedexpansion
echo ╔-                              -╗
echo   本机开放的端口及使用该端口的进程
echo ╚-                              -╝
echo ------------------------------------
echo          端口号           进程名称      
ECHO TCP协议:
::利用netstat命令找出使用TCP协议通信的端口,并将结果分割;
::将第二个参数(IP加端口)传给%%i,第五个参数(PID号)传给%%j;
for /F "usebackq skip=4 tokens=2,5" %%i in (`"netstat -ano -p TCP"`) do (
  call :Assoc %%i TCP %%j
  echo           !TCP_Port!           !TCP_Proc_Name!  
)

ECHO UDP协议:
for /F "usebackq skip=4 tokens=2,4" %%i in (`"netstat -ano -p UDP"`) do (  
  call :Assoc %%i UDP %%j
  echo           !UDP_Port!           !UDP_Proc_Name!
)
echo 按任意键退出
pause>nul

:Assoc
::对%1(第一个参数)进行分割,将第二个参数传给%%e。在本程序中,%1即为上面的%%i(形式为:IP:端口号)
for /F "tokens=2 delims=:" %%e in ("%1") do (
    set  %2_Port=%%e
  )
:: 查询PID等于%3(第三个参数)的进程,并将结果传给变量?_Proc_Name,?代表UDP或者TCP;
for /F "skip=2 usebackq delims=, tokens=1" %%a in (`"Tasklist /FI "PID eq %3" /FO CSV"`) do (
   ::%%~a表示去掉%%a外面的引号,因为上述命令的结果是用括号括起来的。  
   set %2_Proc_Name=%%~a
  )

使用道具 举报

回复
论坛徽章:
7
数据库板块每日发贴之星
日期:2009-07-24 01:01:02数据库板块每日发贴之星
日期:2010-09-29 01:01:01ITPUB9周年纪念徽章
日期:2010-10-08 09:31:212011新春纪念徽章
日期:2011-02-18 11:43:362012新春纪念徽章
日期:2012-01-04 11:50:44ITPUB 11周年纪念徽章
日期:2012-10-09 18:05:372013年新春福章
日期:2013-02-25 14:51:24
50#
 楼主| 发表于 2010-9-28 10:38 | 只看该作者

转贴

@echo off
setlocal enabledelayedexpansion
for /f "skip=1 tokens=1,2 delims=\" %%a in ('fsutil fsinfo drives^|find /v ""') do (
    set aa=%%a
    set aa=!aa:~-2!
    for %%i in (!aa!) do fsutil fsinfo drivetype %%i
)
pause

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表