使用存储过程创建同义词

在给数据库建同义词的时候原来表比较少的时候还手工建.试着写个存储过程结果里面不让执行DDL语句,郁闷ing.还好找到一个变通的方法,使用execute immediate方法.

create or replace procedure xmds.xmds_set_sy(
ownername IN varchar2
) is
table_name varchar2(50):=”;
sqltext varchar2(100):=”;
  cursor cur_tablename is
    select TABLE_NAME from ALL_TABLES where owner=ownername;
begin
  open cur_tablename;
  loop
    fetch cur_tablename into table_name;
    exit when cur_tablename%notfound;
  sqltext:=’create or replace public synonym ‘||table_name||’ for ‘||ownername||’.’||table_name;
  dbms_output.put_line(sqltext) ;
  execute immediate sqltext;
  commit;
  end loop;
  close cur_tablename;  
end xmds_set_sy;

国庆啦

恩.国庆啦.放假了.
刚出来工作,肯定是很苦,苦我倒是不怕,但我是希望苦后是有甜的.
来了这么几个月,大家对我工作能力的信任我很感谢,我也希望我能担任起技术带头人这么一个角色,
当然就目前来说我还欠缺很多,工作经验是一部份,恩.小廖说的对.其实一个工作上的思路是非常重要的.而且HC也说的很好.恩.有时候我的确是更需要显得有魄力一点.
接下来的几个月将是我负责ETL这个部分,10月份和小魏做第二阶段的设计工作,恩.工作很近,任务也很重,加油.dean.你会做的更好的.

这个斑马线我该怎么过?

厦门这斑马线是越来越看不懂了.在建兴路与湖滨北路的交口,原来横跨路口的斑马线给改成这样了.
大家看看这人行道我该怎么走?

走到马路中间以后……
[img][attach]1[/attach][/img]
发于小鱼论坛
http://www.xmfish.com/thread-975041-1-1.html

ORA-03297: 文件包含在请求的 RESIZE 值以外使用的数据

如题:在truncate table后,着手resize(小) tablesapce,报以上信息。

Metalink:(因为表的高水平标志没有被释放)

fact: Oracle Server – Enterprise Edition
symptom: Resizing a tablespace returns error
symptom: ORA-03297: file contains %s blocks of data beyond requested RESIZE
value
cause: There are extents allocated in the datafile beyond the size the user
wanted to resize the file to.

fix:

Use the following SELECT to find the extents (and their segments-objects) that
are placed beyond the desired size in the tablespace’s file:

SELECT owner, segment_name, segment_type, tablespace_name, file_id,
((block_id+1)*(SELECT value FROM v$parameter
WHERE UPPER(name)=’DB_BLOCK_SIZE’)+BYTES) end_of_extent_is_at_this_byte
FROM dba_extents
WHERE ((block_id+1)*(SELECT value FROM v$parameter
WHERE UPPER(name)=’DB_BLOCK_SIZE’)+BYTES) > (*1024*
1024)
AND tablespace_name=’
ORDER BY file_id, end_of_extent_is_at_this_byte;

Just substitute the and for
their actual values.

To receive only the objects that have extents beyond the size in question, use
the following query:

SELECT DISTINCT owner, segment_name, segment_type, tablespace_name, file_id
FROM dba_extents
WHERE ((block_id+1)*(SELECT value FROM v$parameter
WHERE UPPER(name)=’DB_BLOCK_SIZE’)+BYTES) > (*1024*
1024)
AND tablespace_name=’
ORDER BY file_id, owner, segment_name, segment_type;

You will be able to resize the file to the desired size if this SELECT returns
0 rows.
So you have to drop the selected segments (tables or indexes) to be able to
resize the datafile. Before dropping the objects you can export them or move
them to another tablespace.

今天星期几?

今天星期几?经理说周三要进行设计评审的时候我忍不住问了一句,大家都笑了,苦笑着,是啊.一周七天都在公司,今天星期几已经没什么意义了,区别只是中午在哪里吃饭,食堂还是哪家饭馆,看起来挺辛苦的.天天晚上加班.周末也要,精神上太疲惫倒是没有.也许只是态度觉得一切,

加油吧!