Table *** will be exported in conventional path.
在 EXP 時指定了 direct =y
根據 https://asktom.oracle.com/pls/asktom/f?p=100:11:0::::p11_question_id:968789918647
A direct path export should not be considered the converse of a direct path load using SQLLDR (for those of you familiar with that option). A direct path export does not read directly from the datafiles and write to the DMP file. SQLLDR does write directly to the datafiles from the DAT files. Export in direct path mode simply bypasses the SQL evaluation buffer (where clause processing, column formatting and such). 90% of the path is the same, EXP is still reading buffers into the buffer cache, doing the same consistent read processing and so on.
The speedup of the direct path export can be large however. The 10% of the processing that it cuts out, accounts for a much larger percentage of the run-time. For example, I have just exported about 100meg of data, and 1.2 million records. The direct path export took about one minute. The conventional path export on the other hand took three minutes. There is unfortunately no corresponding 'direct path import'. Import uses conventional SQL to insert the data back into tables. SQLLDR is still the way to go for high performance data loads.
It should be noted that in direct path mode, you cannot use the QUERY= parameter to select a subset of rows. This makes sense given that DIRECT=Y is simply a way to bypass the SQL evaluation buffer and that is where the where clause processing would normally take place.
2016年10月14日 星期五
2016年10月12日 星期三
virtualbox host to guest network
guest本來就會有一個NAT網卡
在 HOST 的 virtualbox 網路設定 新增一個 HOSTONLY NETWORK
然後給 guest 加一個 host only 的 網卡 附加到剛剛那個新增的網卡
在 HOST 的 virtualbox 網路設定 新增一個 HOSTONLY NETWORK
然後給 guest 加一個 host only 的 網卡 附加到剛剛那個新增的網卡
AIX sudo cfgmgr 0514-603 錯誤...
cfgmgr: 0514-603 Cannot access the Config_Rules object class in thedevice configuration database.
visudo
然後加上
Defaults !env_reset
http://www.aixhealthcheck.com/blog?id=363
http://mailing.unix.sudo-users.narkive.com/86NcgcIr/sudo-users-fw-sudo-sudo-1-6-9p17-x-aix-5-3
2016年10月11日 星期二
備份 DameWare 設定
support.dameware.com/kb/article.aspx?ID=201065
Version 11.2.0 and later
In older versions of MRC, moving Saved Host Lists to other computers do not include passwords. Version 11.2.0 has fixed this issue. A total transfer of Saved Host List to another machine or computer should now be expected.
Running version 11.2.0 or later will convert existing Saved Host List information from the old MRC.dbfdatabase file to the new version 11.2.0 Saved Host List database file.
This file is called MRCCv2.db. Below is its location:
C:\Users\{username}\AppData\Roaming\DameWare Development\MRCCv2.db
Passwords stored in the Registry are found in the following location:
[[HKEY_CURRENT_USER\Software\DameWare Development\Mini Remote Control\Data\]
Note:
Registry above only stores passwords.
The following are 2 ways to move and restore Saved Host list to another computer:
Option 1:
- Manually move the Saved Host List data.
- Copy the DB file from the following location: C:\Users\{username}\AppData\Roaming\DameWare Development\MRCCv2.db
- Export the password section of the following Registry. [[HKEY_CURRENT_USER\Software\DameWare Development\Mini Remote Control\Data\]
- Copy the DB file to the target computer.
- Import the Registry file to the target machine.
Option 2:
- From the View menu of the MRC console, click Default Host Properties.
- Select the Authentication Options tab and click the Storage Options button.
- Check the Store Credentials in Database box, and then click OK.
- Repeat steps 1-3 on the target computer.
- Copy the DB file to the target computer.
Version 4.4 and later (Including all 5.x and 6.x)
Running version 7.x or later will convert existing Saved Host List information from the old MRC.dbf database file to the new version 7 Saved Host List database file. This file is called MRCCv2.db
The database path for the files is determined by using the opment" at the end. The following are examples of database paths:
- Vista, Windows 7, and 2008: C:\Users\{Username}\AppData\Roaming\DameWare Development
- Windows C:\Users\{Username}\AppData\Roaming\DameWare Development
- Windows 2000, XP and 2003: C:\Documents and Settings\{UserName}\Application Data\DameWare Development
Note:
Windows 2000 and later only support DMRC v7.x and later. However, the MRC Client Agents are still supported on Windows 9.x and later.
Version 4.4 and later (Including all 5.x and 6.x)
Running DameWare Mini Remote Control (DMRC) v4.4 or later will convert the existing Saved Host List information from the Registry to a DMRC database file.
The MRC.db (v4.4) or MRC.dbf (v4.5 or later) will contain all DMRC Saved Host List entries and settings.
The following is the database file path using internal system variable CSIDL_APPDATA and appending it with\DameWare Development at the end:
- Vista, Windows 7, and 2008: C:\Users\{Username}\AppData\Roaming\DameWare Development
- Windows 2000/XP/2003: C:\Documents and Settings\{UserName}\Application Data\DameWare Development
- NT4: Located in the Profile Directory.
The Application path is used when the Operating System does not support the system variable.
- Application paths are the installation folders.
- Files can also be found using the Search function.
Transferring the Saved Host List for v 4.4 requires a user to back up the DMRC database files from the DameWare Development installation folder, and then restore them to the proper path on the remote machine.
Note:
The software will rebuild entries from the information left in the Registry if the database files are not restored to the proper directory of the remote machine.
For security reasons, beginning in version 4.0 and above, DameWare Development uses Microsoft's Security APIs to Encrypt and store the credentials associated with each individual Host Entry. These credentials are no longer stored along with the rest of the Host Entry information, and therefore will not be included within either method of exporting (i.e. Registry Key or Database). Unfortunately, any credentials associated with specific Host Entries must be manually retyped into the software.
Versions 4.4 and earlier (Including all 3.x)
The following Dameware Registry key can be exported into .REG file, and then imported to a new computer once the host list has been created:
[[HKEY_CURRENT_USER\Software\DameWare Development\NT Utilities\DNTU\DWRCC Settings]
MySQL 4 Error : MySQL can’t open file MYI or MYD (errno: 145)
https://braingrabber.wordpress.com/2012/12/07/mysql-cant-open-file-myi-or-myd-errno-145/
Can’t open file: ‘×××.MYI’ (errno: 145),这个错误一般就是你的数据库表文件损坏造成的,造成的原因大概是你把数据库文件挪来挪去的结果,当然不排除其他原因啊。
MySQL can’t open file MYI or MYD (errno: 145)
Leave a reply
Some of our monitoring applications write their data redundantly to a local MySQL database, plain text on a network share and to a MSSQL database. This is an out of the box implementation and maintained externally. Sometimes we get stuck with MySQL buggering the whole application because there is something wrong with one of the data files.
Almost all cases we get confronted with error “Can’t open file: ‘file.MYI or file.MYD’. (errno: 145)”and the table is not visible in the MySQL browser. I’m afraid the users reboot the machine now and then when they think it’s not responding. Since this machine is continuously writing sensor data it might cause data corruption. Since the descript of error 145 is “MySQL error code 145 = Table was marked as crashed and should be repaired” it’s time to repair the table.
How to troubleshoot this problem in a few quick steps:
- Stop the mysqld.
- Copy the data files MYI (indices), MYD (data file) and frm (table definition) of the files that are giving the error in the log.
- Open up a command-line and browse to the MySQL bin directory.
- First try a quick (-q) recovery (-r) by using the following command: myisamchk –r –q “location of the MYI/MYD file”, i.e. myisamchk –r –q c:\mysql\data\db.MYI
- Start the mysqld and check the logs if the error disappeared.
- If the error still exists, stop the mysqld again.
- Get your command-line back up and use the following command: myisamchk –r “location of the MYI/MYD file”, i.e. myisamchk –r c:\mysql\data\db.MYI
- Start the daemon again and check the logs. Most of the times this will do the job to get the table up and running again.
If it doesn’t does the job for you, check out the following links:
- Official mysql reference: http://dev.mysql.com/doc/refman/5.0/en/myisam-repair.html
- Several tips for maintenance and repairs: http://jonathanhui.com/mysql-maintenance-backup-recovery
Method 1.
Step 1. Log into mysql as administrator
mysql -uroot -p
Step 2. Select the database containing the corrupted table, i.e., ‘use {database name};’
mysql> use {database name};
Step 3. Show tables your corrupted table should be listed
mysql> show tables;
Step 4. Repair table
mysql> repair table {bad_table_name};
Method 2.
Step 1. Login to your MySQL server using Secure Shell (SSH).
Step 2. Repairing MyISAM mySQL Tables/Databases.
cd /var/lib/mysql/DBNAME
myisamchk -r -f tables.MYI
Please note that MyISAM is a default storage engine of MySQL, unless you change it. Mostly MyISAM is set as default engine to check and repair all the tables in the mysql database.
Step 1. Log into mysql as administrator
mysql -uroot -p
Step 2. Select the database containing the corrupted table, i.e., ‘use {database name};’
mysql> use {database name};
Step 3. Show tables your corrupted table should be listed
mysql> show tables;
Step 4. Repair table
mysql> repair table {bad_table_name};
Method 2.
Step 1. Login to your MySQL server using Secure Shell (SSH).
Step 2. Repairing MyISAM mySQL Tables/Databases.
cd /var/lib/mysql/DBNAME
myisamchk -r -f tables.MYI
Please note that MyISAM is a default storage engine of MySQL, unless you change it. Mostly MyISAM is set as default engine to check and repair all the tables in the mysql database.
Some other errors that may be caused by table corruption include:
- Can't find file table.MYI.
- Duplicate unique key or constraint on write or update.
- Got error ERR from table handler. (ERR being a number).
- Index file is crashed / Wrong file format.
- No more room in index file.
- No more room in record file.
- Old database file.
- Record file is crashed.
- Record was already deleted (or record file crashed).
- table.frm is locked against change.
- Table is crashed and last repair failed.
- Tables was marked as crashed and should be repaired.
- Unexpected end of file.
| WebjxCom提示:这个错误是典型的mysql表受损造成的,解决的办法就是修复表,这个问题也是mysql经常容易出现的,mysql表和索引损坏的几率很大,但是修复也很方便,减少此类问题发生的办法就是尽量减少服务器无故断电,关闭服务器时,最后先手动关闭mysql数据库。 |
这个错误是典型的mysql表受损造成的,解决的办法就是修复表,这个问题也是mysql经常容易出现的,mysql表和索引损坏的几率很大,但是修复也很方便,减少此类问题发生的办法就是尽量减少服务器无故断电,关闭服务器时,最后先手动关闭mysql数据库。
下面看看这个问题:
Can’t open file: ‘×××.MYI’ (errno: 145),这个错误一般就是你的数据库表文件损坏造成的,造成的原因大概是你把数据库文件挪来挪去的结果,当然不排除其他原因啊。
具体数据库出现错误的提示代码是:
Invalid SQL: ……
MySQL 错误!: 1016 (Can’t open file: ‘×××.MYI’ (errno: 145))
Invalid SQL: ……
MySQL 错误!: 1016 (Can’t open file: ‘×××.MYI’ (errno: 145))
解决这个问题有多种方案,如果你的数据库可以远程链接或者你可以连接到你的远程服务器桌面,并且你的服务器系统刚好是Windows的,那么你可以:
运行->cmd
然后:mysql –h 主机地址 –u 用户名 –p
然后输入密码,连接数据库;
Use 数据库名称;
然后 输入:reapair table 出错的表名称,回车,这样修复一下就可以了,参考图片如下:
然后输入密码,连接数据库;
Use 数据库名称;
然后 输入:reapair table 出错的表名称,回车,这样修复一下就可以了,参考图片如下:
第二种方案,假设你只能运行PHP代码,那么也很简单,写一个php文件,链接上数据库,把这段代码:
Reapair table `表名`,
像发送 “select * ……”一样发送给mysql,也是可以的;
Reapair table `表名`,
像发送 “select * ……”一样发送给mysql,也是可以的;
第三种方案,可简单了,打开你的myphpadmin,选中Can’t open file:后面同名的表,有个下拉菜单“选中项”,选择“修复”如图:
就ok了。
如果你的数据库主机就你一个人用,并且你还能控制的话,建议你用Mysql自带的修复工具myisamchk.exe进行修复,操作如下:
修复前将mysql服务停止。
如果是Win主机,打开命令行方式,然后进入到mysql的/bin目录。
执行myisamchk -r 数据库所在路径\*.MYI
如果是类Unix主机,直接使用myisamchk -r 数据库目录\*.MYI
如果是Win主机,打开命令行方式,然后进入到mysql的/bin目录。
执行myisamchk -r 数据库所在路径\*.MYI
如果是类Unix主机,直接使用myisamchk -r 数据库目录\*.MYI
其它参考:
Mysql有的时候因为掉电或者其他原因导致数据库损坏,错信息如下:
MySql: Can't open file: 'sdb_sessions.MYI'. (errno: 145)
For more information, see Help and Support Center at
我们可以使用mysql自带的mysqlcheck命令来快速修复所有的数据库或者特定的数据库;例如
检查优化并修复所有的数据库用:
# mysqlcheck -A -o -r -p
Enter password:
guestbook.simpgb_avatars OK
guestbook.simpgb_bad_words OK
guestbook.simpgb_banlist OK
guestbook.simpgb_da ta OK
......
......
......
mysqlcheck语法/html/Program/Mssql/200711/130.html
修复指定的数据库用
# mysqlcheck -A -o -r Database_NAME -p
IXDBA.NET社区论坛
另外如果只是对某个表进行修复可以用:myisamchk或isamchk
其中myisamchk适用于MYISAM类型的数据表,而isamchk适用于ISAM类型的数据表。这两条命令的主要参数相同,一般新的系统都使用MYISAM作为缺省的数据表类型,这里以myisamchk为例子进行说明。当发现某个数据表出现问题时可以使用:
myisamchk tablename.MYI
进行检测,如果需要修复的话,可以使用:
myisamchk -of tablename.MYI
关于myisamchk的详细参数说明,可以参见它的使用帮助。需要注意的时在进行修改时必须确保MySQL服务器没有访问这个数据表,保险的情况下是最好在进行检测时把MySQL服务器Shutdown掉。
另外可以把下面的命令放在你的rc.local里面启动MySQL服务器前:
[ -x /tmp/mysql.sock ] && /pathtochk/myisamchk -of /DA TA_DIR/*/*.MYI
其中的/tmp/mysql.sock是MySQL监听的Sock文件位置,对于使用RPM安装的用户应该是/var/lib/mysql /mysql.sock,对于使用源码安装则是/tmp/mysql.sock可以根据自己的实际情况进行变更,而pathtochk则是 myisamchk所在的位置,DA TA_DIR是你的MySQL数据库存放的位置。
其中myisamchk适用于MYISAM类型的数据表,而isamchk适用于ISAM类型的数据表。这两条命令的主要参数相同,一般新的系统都使用MYISAM作为缺省的数据表类型,这里以myisamchk为例子进行说明。当发现某个数据表出现问题时可以使用:
myisamchk tablename.MYI
进行检测,如果需要修复的话,可以使用:
myisamchk -of tablename.MYI
关于myisamchk的详细参数说明,可以参见它的使用帮助。需要注意的时在进行修改时必须确保MySQL服务器没有访问这个数据表,保险的情况下是最好在进行检测时把MySQL服务器Shutdown掉。
另外可以把下面的命令放在你的rc.local里面启动MySQL服务器前:
[ -x /tmp/mysql.sock ] && /pathtochk/myisamchk -of /DA
其中的/tmp/mysql.sock是MySQL监听的Sock文件位置,对于使用RPM安装的用户应该是/var/lib/mysql /mysql.sock,对于使用源码安装则是/tmp/mysql.sock可以根据自己的实际情况进行变更,而pathtochk则是 myisamchk所在的位置,DA
2016年10月3日 星期一
ubuntu 16.04 squid
https://help.ubuntu.com/16.04/serverguide/squid.html
Installation
At a terminal prompt, enter the following command to install the Squid server:
sudo apt install squid3
Configuration
Squid is configured by editing the directives contained within the /etc/squid3/squid.conf configuration file. The following examples illustrate some of the directives which may be modified to affect the behavior of the Squid server. For more in-depth configuration of Squid, see the References section.
Prior to editing the configuration file, you should make a copy of the original file and protect it from writing so you will have the original settings as a reference, and to re-use as necessary. Make this copy and protect it from writing using the following commands:
sudo cp /etc/squid3/squid.conf /etc/squid3/squid.conf.original sudo chmod a-w /etc/squid3/squid.conf.original
- To set your Squid server to listen on TCP port 8888 instead of the default TCP port 3128, change the http_port directive as such:
http_port 8888
- Change the visible_hostname directive in order to give the Squid server a specific hostname. This hostname does not necessarily need to be the computer's hostname. In this example it is set to weezie
visible_hostname weezie
- Using Squid's access control, you may configure use of Internet services proxied by Squid to be available only users with certain Internet Protocol (IP) addresses. For example, we will illustrate access by users of the 192.168.42.0/24 subnetwork only:Add the following to the bottom of the ACL section of your /etc/squid3/squid.conf file:
acl fortytwo_network src 192.168.42.0/24
Then, add the following to the top of the http_access section of your /etc/squid3/squid.conf file:http_access allow fortytwo_network
- Using the excellent access control features of Squid, you may configure use of Internet services proxied by Squid to be available only during normal business hours. For example, we'll illustrate access by employees of a business which is operating between 9:00AM and 5:00PM, Monday through Friday, and which uses the 10.1.42.0/24 subnetwork:Add the following to the bottom of the ACL section of your /etc/squid3/squid.conf file:
acl biz_network src 10.1.42.0/24 acl biz_hours time M T W T F 9:00-17:00
Then, add the following to the top of the http_access section of your /etc/squid3/squid.conf file:http_access allow biz_network biz_hours
After making changes to the /etc/squid3/squid.conf file, save the file and restart the squid server application to effect the changes using the following command entered at a terminal prompt:
sudo systemctl restart squid3.service
訂閱:
文章 (Atom)