杂记

数据闪回

1、启动表的row movement特性

ALTER TABLE FX_MXZXRW ENABLE ROW MOVEMENT;

2、闪回指定时间的快照

FLASHBACK TABLE FX_MXZXRW TO TIMESTAMP TO_TIMESTAMP('2021-02-05 13:45:00','yyyy-mm-dd hh24:mi:ss');

3、关闭表的row movement功能

ALTER TABLE FX_MXZXRW DISABLE ROW MOVEMENT;

jmap使用

线程对应系统占用情况

jmap -heap [pid]

生成dump文件

jmap -dump:format=b,file=20210225.dump.hprof [pid]

Linux安装wps

rpm包下载地址

https://linux.wps.cn/

安装rpm包

sudo yum localinstall wps-office-11.1.0.10161-1.x86_64.rpm

Centos 7安装可视化桌面

首先安装X(X Window System)

yum groupinstall "X Window System"

安装可视化桌面

yum groupinstall "GNOME Desktop"

启动(如果启动失败,重启reboot)

startx

sublime_text右键菜单

sublime_text安装目录根路径执行

@ECHO OFF & PUSHD %~DP0 & TITLE
>NUL 2>&1 REG.exe query "HKU\S-1-5-19" || (
    ECHO SET UAC = CreateObject^("Shell.Application"^) > "%TEMP%\Getadmin.vbs"
    ECHO UAC.ShellExecute "%~f0", "%1", "", "runas", 1 >> "%TEMP%\Getadmin.vbs"
    "%TEMP%\Getadmin.vbs"
    DEL /f /q "%TEMP%\Getadmin.vbs" 2>NUL
    Exit /b
)
SET /P ST=输入a添加右键菜单,输入d删除右键菜单:
if /I "%ST%"=="a" goto Add
if /I "%ST%"=="d" goto Remove
:Add
reg add "HKEY_CLASSES_ROOT\*\shell\Sublime Text" /t REG_SZ /v "" /d "用 &Sublime Text 打开" /f
reg add "HKEY_CLASSES_ROOT\*\shell\Sublime Text" /t REG_EXPAND_SZ /v "Icon" /d "%~dp0sublime_text.exe" /f
reg add "HKEY_CLASSES_ROOT\*\shell\Sublime Text\command" /t REG_SZ /v "" /d "%~dp0sublime_text.exe \"%%1\"" /f
 
exit
:Remove
reg delete "HKEY_CLASSES_ROOT\*\shell\Sublime Text" /f
exit

java环境变量配置

::添加环境变量JAVA_HOME
::echo off 表示在批处理文件执行过程中,只显示结果,而不显示执行的命令
@echo on
echo 添加Java环境变量
setx /M JAVA_HOME "C:\Program Files\Java\jdk1.8.0_171"
setx /M Path "%Path%;%%JAVA_HOME%%\bin;%%JAVA_HOME%%\jre\bin;"
setx /M CLASSPATH ".;%%JAVA_HOME%%\lib\dt.jar;%%JAVA_HOME%%\lib\tools.jar;"
::pause命令运行后会中断执行的语句。这个中断不是立即停止,只是暂停
::按下任意键之后就会继续执行下面的语句。
pause
::添加环境变量之后不会在本cmd窗口生效,所以%JAVA_HOME%没有值
::需要输入  %%JAVA_HOME%% 显示 %JAVA_HOME%

nginx启动

@echo off
if "%1"=="help" (goto help) else (if "%1"=="-h" goto help)
if "%1"=="version" (goto version) else (if "%1"=="-v" goto version)
if "%1"=="start" goto start
if "%1"=="stop" goto stop
if "%1"=="reload" goto reload
if "%1"=="reopen" goto reopen
if "%1"=="find" goto find
goto error

:help
nginx -v
echo Usage: nginxd [-h,help] [-v,version] [start] [stop] [stop -a] [reload] [reopen] [find]
echo=
echo Options:
echo   help,-h         : this help
echo   version,-v      : show current nginx version
echo   start           : start nginx master process
echo   stop            : stop the newest nginx master process
echo   stop -a         : stop all nginx master processes
echo   reload          : reload configuration
echo   reopen          : reopen nginx
echo   find            : show the nginx master process list
echo=
exit /B

:version
nginx -v
exit /B

:start
start nginx -p D:\Programs\Nginx
exit /B

:stop
if "%2"=="-a" (taskkill /F /IM nginx.exe) else (if "%2"=="" (nginx -s stop -p D:\Programs\Nginx) else goto error)
exit /B

:reload
nginx -s reload -p D:\Programs\Nginx
exit /B

:find
tasklist /fi "imagename eq nginx.exe"
exit /B

:error
echo nginxd: invalid option: "%1 %2"
echo=   
exit /B

本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!