Allen's profileLi's space(http://picasa...PhotosBlog Tools Help

Li's space(http://picasaweb.google.com/lizhiyue)

学会思考看世界!我是:李志月 Allen Li,IM&EMail:lizhiyue@live.com 或 lizhiyue@gmail.com
June 25

Oracle移动数据库文件

Oracle数据库由数据文件,控制文件和联机日志文件三种文件组成。
由于磁盘空间的变化,或者基于数据库磁盘I/O性能的调整等,我們可能会考虑移动数据库文件。(注:恢复数据库时非常有用,属于冷备份)
查询当前数据库中,相关文件路径
select * from v$datafile;
select * from v$controlfile;
select * from v$logfile;
根据以上路径,找到当前数据库相应文件路径。

可以用ALTER DATABASE,ALTER TABLESPAC(这种方法略)两种方法移动数据文件。 用此方法,可以移动任何表空间的数据文件。
1. 停数据库:
sqlplus /nolog
SQL> CONNECT INTERNAL;
SQL> SHUTDOWN;
SQL> EXIT;
2.用操作系统命令移动数据文件:
将数据文件 'test.dbf' 从/ora/oracle/data1目录移动到/ora/oracle/data2目录下:
mv /ora/oracle/data1/test.dbf /ora/oracle/data2
3. Mount数据库,用ALTER DATABASE命令将数据文件改名:
sqlplus /nolog
SQL> CONNECT INTERNAL;
SQL> STARTUP MOUNT;
SQL> ALTER DATABASE RENAME FILE '/ora/oracle/data1/test.dbf' TO '/ora/oracle/data2/test.dbf';
4. 打开数据库:
SQL> ALTER DATABASE OPEN;
SQL>SELECT NAME,STATUS FROM V$DATAFILE;

Windows服务相关命令

样例1,手工添加MSSQLServer2005为服务:
sc create MSSQLSERVER binpath= "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\sqlservr.exe -sMSSQLSERVER" displayname= "SQL Server (MSSQLSERVER)"

描述:
        SC 是用于与
        服务控制管理器和服务进行通信的命令行程序。
用法:
        sc <server> [command] [service name] <option1> <option2>...

        选项 <server> 的格式为 "\\ServerName"
        可以键入 "sc [command]" 以获得命令的进一步帮助
        命令:
          query-----------查询服务的状态, 或
                          枚举服务类型的状态。
          queryex---------查询服务的扩展状态, 或
                          枚举服务类型的状态。
          start-----------启动服务。
          pause-----------向服务发送 PAUSE 控制请求。
          interrogate-----向服务发送 INTERROGATE 控制请求。
          continue--------向服务发送 CONTINUE 控制请求。
          stop------------向服务发送 STOP 请求。
          config----------更改服务的配置(永久)。
          description-----更改服务的描述。
          failure---------更改服务失败时所进行的操作。
          sidtype---------更改服务的服务 SID 类型。
          qc--------------查询服务的配置信息。
          qdescription----查询服务的描述。
          qfailure--------查询服务失败时所进行的操作。
          qsidtype--------查询服务的服务 SID 类型。
          delete----------(从注册表)删除服务。
          create----------创建服务(将其添加到注册表)。
          control---------向服务发送控制。
          sdshow----------显示服务的安全描述符。
          sdset-----------设置服务的安全描述符。
          showsid---------显示与
                          任意名称相对应的服务 SID 字符串。
          GetDisplayName--获取服务的 DisplayName。
          GetKeyName------获取服务的 ServiceKeyName。
          EnumDepend------枚举服务的依存关系。

        下列命令不要求服务名称:
        sc <server> <command> <option>
          boot------------(ok | bad) 表明是否将最后一次启动
                          保存为最后一次的正确启动配置
          Lock------------锁定服务数据库
          QueryLock-------查询 SCManager 数据库的 LockStatus
示例:
        sc start MyService

June 24

Oracle 管理常用语句

--创建表空间
create tablespace 表空间名
datafile '数据库文件存放跟径/文件名'
size 500M
default storage
(initial 200m
next 50m
minextents 20
maxextents 500)
online;

--高级创建用户 (指定默认表空间 和 临时表空间 指定连接状态)
CREATE USER 用户名 PROFILE DEFAULT IDENTIFIED BY 密码 DEFAULT
TABLESPACE 表空间名 TEMPORARY TABLESPACE TEMP ACCOUNT UNLOCK;

--为用户授权
grant connect,resource,dba to 用户名;

--删除用户
drop user 用户名 cascade;
commit;

--删除表空间
drop tablespace 表空间名;

--查询当前数据名
select name from v$database;

--查询当前数据库实例名
select instance_name from v$instance;

--查询数据库服务名
select value from v$parameter where name = 'service_name';

--查看sequences
select * from user_sequences;

--查看触发器
Select   Description,Trigger_Body   From   User_Triggers

--修改表空间文件自增长
alter database datafile '数据库文件存放跟径/文件名' autoextend on next 10m;

SQL Server 管理常用语句

--创建登录用户并指定用户的密码
CREATE LOGIN lizhiyue WITH PASSWORD = 'lizhiyue';
--打开指定的数据库
USE TEST_TEST;
--创建数据库用户,并指定此用户的登录名
CREATE USER lizhiyue FOR LOGIN lizhiyue;
--为用户lizhiyue授权(Control是可完全操作此数据库)
GRANT CONTROL TO lizhiyue;
GO

--删除登录用户
DROP LOGIN lizhiyue;
--删除用户
DROP USER lizhiyue
GO

将oracle中的一个表空间表STP_A数据 导入到另一个表空间STP_B的方法

1、通过exp命令(用户:stp_a_user),将STP_A导出数据,导出数据文件为STP_A.dmp
    exp 用户名/密码@Oracle数据库连接字符串 file=STP_A.dmp

2、通过imp命令(用户:stp_a_user),将STP_A.dmp导入数据,指定参数INDEXFILE生成脚本文件STP_A.SQL(表创建SQL语句、INDEX等创建SQL语句);
    imp 用户名/密码@Oracle数据库连接字符串 file=STP_A.dmp INDEXFILE=STP_A.SQL

3、通过ULtraEdit将STP_A.SQL文件进行整理:
    将原数据表空间名替换为新表空间名;
    去掉... * rows(通过正则表达式替换);
    去掉REM (通过一般替换字符);

    另存为STP_B.SQL。

4、通过管理员,创建STP_B表空间及指定的用户stp_b_user;

5、执行STP_B.SQL文件中的SQL语句,创建表等(用户:stp_b_user);

6、通过imp命令(用户:stp_b_user),将STP_A.dmp的数据进行导入,导入时指定Ingore为y则可导入数据。

June 11

安装 道道通 2.0

1、准备 道道通2.0 的相关文件:RtNavi.rar、RtNaviConfig.rar、Search.idx.rar、OEM主程序启动文件(无端口速率设置界面的).rar、OEM主程序启动文件(有端口速率设置界面的).rar

2、运行CDSetup.exe进行安装。
    注意1:在安装之前要整理通过RtNavi.rar解决的文件目录,第一是要配置好RtNaviConfig目录下对应自己的机型目录与文件;
    注意2:同时,因为原上传软件打包文件的人在打包时,Search.idx文件有错,所以将Search.idx.rar文件解压后,拷贝到AresMap\POI下,安装时就会一起安装了。

初步看了一下,看着还行,还没具体测试!

参考:http://bbs.cnsmartphone.com/viewthread.php?tid=451358

June 06

安装Route 66 8.0 6126

1、从网上找到 Route 66 8.0 6126 懒人版,将其解压到卡上。(注意:目录名不要更改)
    参考:http://www.rayfile.com/files/3feda1c0-f59b-11dd-b9b9-0019d11a795f/

2、修改ROUTE66\Device.ini文件内容,修改2项内容:
    Com Port Value=2
    Baud rate Value=57600

3、下载中国地图文件(Mainland China PRO 2008-Q3)。
    参考:http://www.rayfile.com/zh-cn/files/613ccab0-c02e-11dd-aeab-0019d11a795f/

启动ROUTE66\R66N8.exe即可。

我的机型是 MIO C320,已安装并测试可用!不过在试用的过程中,觉得8.0的规划路线并不是很好!

问题:每次进入时都需要选择语言、设置时区、时间等
解决:删除以下文件,然后重新进入设置即可。
Data\hk.flg
Data\Imei.dat
Data\Phone.dat
Data\res\Extras\ExtrasInfo.db
Data\res\Extras\ExtrasInfo_tmp.db

问题:进入“历史目的地”,提示非法操作错误,导航软件程序退出
解决:暂没有找到解决办法!(查看其官方网站,说是在有一些版本中有此错误:“crash when entering History“,有精力的朋友可努力去解决!)

February 22

Coldplay-- "Clocks"

 
Lights go out and I can't be saved
Tides that I tried to swim against
Have brought me down upon my knees
Oh, I beg, I beg and plead, singing
Come out of things unsaid
Shoot an apple off my head
And a trouble that can't be named
Tigers waiting to be tamed, singing
You are
You are
Confusion never stops
Closing walls and ticking clocks
Gonna come back and take you home
I could not stop but you now know, singing
Come out upon my seas,
Cursed missed opportunities
Am I a part of the cure?
Or am I part of the disease?, singing
You are, you are, you are
You are, you are, you are
And nothing else compares
And nothing else compares
And nothing else compares
You are
You are
Home, home where I wanted to be
Home, home where I wanted to be
Home, home where I wanted to be
Home, home where I wanted to be

Coldplay - Viva La Vida

I used to rule the world
Seas would rise when I gave the word
Now in the morning I sleep alone
Sweep the streets I used to own

I used to roll the dice
Feel the fear in my enemy's eyes
Listen as the crowd would sing:
"Now the old king is dead! Long live the king!"

One minute I held the key
Next the walls were closed on me
And I discovered that my castles stand
Upon pillars of salt and pillars of sand

I hear Jerusalem bells a ringing
Roman Cavalry choirs are singing
Be my mirror my sword and shield
My missionaries in a foreign field
For some reason I can't explain
Once you go there was never, never an honest word
That was when I ruled the world

It was the wicked and wild wind
Blew down the doors to let me in.
Shattered windows and the sound of drums
People couldn't believe what I'd become

Revolutionaries wait
For my head on a silver plate
Just a puppet on a lonely string
Oh who would ever want to be king?

I hear Jerusalem bells a ringing
Roman Cavalry choirs are singing
Be my mirror my sword and shield
My missionaries in a foreign field
For some reason I can't explain
I know Saint Peter won't call my name
Never an honest word
But that was when I ruled the world

ooooo ooooo ooooo oooooo ooooo
(repeat with chorus)

I hear Jerusalem bells a ringing
Roman Cavalry choirs are singing
Be my mirror my sword and shield
My missionaries in a foreign field
For some reason I can't explain
I know Saint Peter won't call my name
Never an honest word
But that was when I ruled the world
Oooooh Oooooh Oooooh 

Make Some Noise --Krystal Meyers

Yeah you’re so convinced
Of how it’s supposed to be
I know you’re confused
Don’t take it out on me
I’m free to try
I’m free to dream
When it all goes wrong
We’re not afraid to scream
Cause the future now is ours babes
Oh, oh, shout it out
Get ready ’cause I get loud
Cause we’re born to make some noise
Don’t tell me we should turn it down
We were born to make some noise
Make some noise
We’re not the enemy
You might be surprised
Don’t need hypocrisy to open up our eyes
We don’t need your mood
Don’t need a uniform
This is who we are
We won’t be ignored
Cause the future now is ours babes
Oh, oh, shout it out
Get ready ’cause I get loud
Cause we’re born to make some noise
Don’t tell me we should turn it down
We were born to make some noise
Get ready ’cause I get loud
Cause we were born to make some noise
Don’t tell me we should turn it down
Cause We were born to make some noise
Just for once . . .
Get ready ’cause I get loud
Cause we were born to make some noise
Don’t tell me we should turn it down
Cause We were born to make some noise
Nobody’s going to shut it down yeah
Cause we were born to make some noise
We could turn this whole thing around
Come on you girls and boys
Make some noise
Get ready ’cause I get loud
Cause we were born to make some noise
Don’t tell me we should turn it down
Cause We were born to make some noise
We could turn this whole thing around
Come on you girls and boys
Make some noise