由买买提看人间百态

topics

全部话题 - 话题: truncation
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
l**n
发帖数: 7272
1
来自主题: Apple版 - 童鞋们,请教技术问题了
这是什么意思?
“The short answer to your question is: SHA-1 is as secure as you can get.
MD5 would be fine too, even MD4; but it could make some investors nervous.
For public relations, it is best to use a "better" hash function, e.g. SHA-
256, even if you truncate its output to 160 or 128 bits (to save on storage
cost). Some of the SHA-3 round-2 candidates appear to be faster than SHA-1
while being arguably "more secure"; yet they are still a bit new, so
sticking to SHA-256 or SHA-512 would be a safer... 阅读全帖
j******h
发帖数: 16
2
来自主题: BuildingWeb版 - JRun log truncation
水牛啊, 你在搞网站?
T***B
发帖数: 137
3
来自主题: BuildingWeb版 - 紧急求教:网页只显示一半
I use Apache and cgi in the server side. when visiting the site via browser,
the returned html file is truncated.
If I run the cgi at the server machine directly, I can alway get the full html
file created by the perl cgi.
Can anyone help? Thank you very very much!
w****g
发帖数: 1
4
in Oracle, try this one.
declare
isThere varchar2(1);
begin
select 'Y' into isThere
from user_tables
where table_name = 'MYTABLE';
if isThere = 'Y' then
truncate table MYTABLE;
else
create table MYTABLE (....);
end if;
end;
C****n
发帖数: 2324
5
My database is 512M, my LDF is 3.4G, it's ridiculous!
a*****a
发帖数: 438
6
not ridiculous, if you have tons of transactions.
have you tried DBCC sth..
d******o
发帖数: 115
7
Ok, Calvin, here is your answer:
First of all which version of SQL you have?
You can do DBCC SHRINKDATABASE first ( note it is not DBCC ShrinkDB)
Then do a full backup
Then do DBCC SHRINKFILE
Then you should be fine.
For later maintainence, you can run backup log every 30 minutes +/- depends
your transaction load, and it should keep you log small.
David Gao
MCSE, MCDBA

setting
log
l*********l
发帖数: 1
8
来自主题: Database版 - Access 'memo' data type
Tricky question. There is a table in access 2000 which has a column with type
memo. The long (>255) length string is stored in that column. If I write a sql
in access to retrieve it, the length of the string returned is correct. The
insteresting thing is that when I write the sql in java application and
retrieve it through ODBC, the length of the string returned will be truncated
to 255 no matter how long it was.
My code is like:
...
Statement stmt = con.createStatement();
ResultSet rs = stmt.ex
g***o
发帖数: 297
9
来自主题: Database版 - Access 'memo' data type
I got exactly the same problem when i was doing a project with Access as
backend and ASP as frontend. the tricky topics here is
1). Donot include DISTINCT keyword in your SQL statement, otherwise, an error
will be thrown.
2). Try to address MEMO field as the last column in your SQL statement.
or
3) Seperate your SQL statement into two. For example,
select other_field1, other_field2 from **** ; and select memo_field from ****
;
instead of select * from ****;

type
sql
truncated
s******n
发帖数: 45
10
来自主题: Database版 - which one is faster? truncate or delete?
Truncase is way faster if u have a big table because it's not part of
a transaction.
aw
发帖数: 127
11
来自主题: Database版 - which one is faster? truncate or delete?
so the loss will not be recoverable, be careful.
a****s
发帖数: 1
12
来自主题: Database版 - Database Interview Questions
From http://www.devbistro.com/tech-interview-questions/Database.jsp
Interview questions for Oracle database administrator
1. Differentiate between TRUNCATE and DELETE
2. What is the maximum buffer size that can be specified using the DBMS_
OUTPUT.ENABLE function?
3. Can you use a commit statement within a database trigger?
4. What is an UTL_FILE.What are different procedures and functions
associated with it?
5. Difference between database triggers and form triggers?
6. What is
s**********e
发帖数: 860
13
来自主题: Database版 - SQL 2005 Intergration Service Q
Hi, all,
I've got a fixed width text file and I want to use SSIS read in the file.
And here's the error I got. Anybody knows the reason? I tried to use Access
to import the same data and it went well without any issue. BTW, there's a
lot of missing data in the file.
Thanks a lot!
Error: 0xC02020A1 at Data Flow Task, Flat File Source [1]: Data conversion
failed. The data conversion for column "Column 0" returned status value 4
and status text "Text was truncated or one or more characters had no m
a*******t
发帖数: 891
14
来自主题: Database版 - delete
what is your concern? speed, impact of production server?
if you don't need to keep the operation in tranlog, use truncate to make it
run faster.
and make sure you don't have clustered index if you don't need them
n********6
发帖数: 1511
15
来自主题: Database版 - error file或者exception file
前两周刚做完bcp,所以比较熟悉。
例子:table varchar(9)
1。如果用format,一旦有不符合format,就报错。
2。如果不用format,自己写validation,要注意table里面的varchar长度限制。
3。超过长度限制的,bcp报错,但是shell不传到数据库。
4。bcp会truncate(忽略)该条记录。读取下一条记录。注意:假如record是10位,不会
读取前9位。
5。bcp会计数上述4的错误次数。默认允许最大错误次数是10。可以修改默认值。
6。达到最大默认值,shell命令报错,job agent知道。
7。我当时没用format,用,EXEC msdb.dbo.sp_send_dbmail,把validation的信息发信
给business group。DBA不需要管数据是否合理。只要job run就可以了。
8。send_dbmail可以送2个附件。一个来自于file directory。另一个来自于query。

file?
c*****d
发帖数: 6045
16
来自主题: Database版 - INSERT or UPDATE, which is faster?
嗯,如果要操作的数据量小,update要比delete+insert快
如果要操作的数据量大,update要比truncate+insert慢
B*****g
发帖数: 34098
17
来自主题: Database版 - INSERT or UPDATE, which is faster?
砸变truncate了?
c*****d
发帖数: 6045
18
来自主题: Database版 - INSERT or UPDATE, which is faster?
大数据量的时候用truncate+insert比Update快
陈述一个事实,哈哈
n****u
发帖数: 229
19
来自主题: Database版 - INSERT or UPDATE, which is faster?
I agree.
Last time it would took 3 days to update 320,000 records (just update MSN
etc.)
But I truncated table first, INSERT... SELECT..., 30 seconds, done.
S*********t
发帖数: 78
20
来自主题: Database版 - INSERT or UPDATE, which is faster?
truncate is different from delete
n********6
发帖数: 1511
21
来自主题: Database版 - INSERT or UPDATE, which is faster?
What happends when you need the log file?
Truncate does not generate the log, does not fire the trigger.
k********e
发帖数: 702
22
来自主题: Database版 - INSERT or UPDATE, which is faster?
Hence truncate doesn't work with replication and logshipping
j*****n
发帖数: 1781
23
来自主题: Database版 - INSERT or UPDATE, which is faster?
truncate vs. delete
http://www.mssqltips.com/tip.asp?tip=1080
B*****g
发帖数: 34098
24
disable ref,呵呵。
c*****d
发帖数: 6045
25
来自主题: Database版 - Oracle求助,thanks!!!
举个例子,ora-00054是这样发生的
session A:
update scott.dept set loc='beijing';
然后不commit也不rollback
session B:
alter table scott.dept drop column dname;
ORA-00054: resource busy and acquire with NOWAIT specified
truncate table scott.dept;
ORA-00054: resource busy and acquire with NOWAIT specified

li
NOWAIT
from
hi
pac
t
d
c*****d
发帖数: 6045
26
来自主题: Database版 - Oracle求助,thanks!!!
想追踪什么语句导致ora-00054,可以这么做
alter system set events='54 trace name errorstack forever, level 10'
这样当发生ora-00054的时候,会在udump目录产生一个trace文件
比如下面的的这个trace文件说明是truncate操作导致ora-00054
********************************************************
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
ORACLE_HOME = #############
System name: Linux
Node name: #############
Release: 2.4.20-8smp
Version: #1 SMP Thu Mar 13 17:45
S***k
发帖数: 370
27
来自主题: Database版 - sql server 面试题 (4)
Shrink database or shrink files is to remove unused pages and release disk
space. It is usually used after delete operations, such as truncate a table
or drop a table.In most cases, the fragmentation related to performance is
index fragmentation which is the internal or external fragmentation of the
pages supporting indexes. Because removing unused pages could not help
reduce the degree of index pages fragmentation, shrink could not help too
much to improving performance.
Repeatedly shrinking a
m***0
发帖数: 15
28
来自主题: Database版 - 谁能帮我看看这个sql query的优化
1) use truncate instead of del
2) depends on depth and size of ur tree, if it can go up to 5 or event more, and you do reads more than writes, you might want to change the logic completely, add one more column called depth, and change column parent to column ancestor, and each node will have all the info about all of its ancestor, if a node in lvl 5 is to be inserted, then it should also insert 4 more rows for each of its ancestor.
in this way, u will have instant results back when u do select.
n********6
发帖数: 1511
29
来自主题: Database版 - 面试回来发考题1
Position: Database Developer/DBA
Requirements:
postgreSQL,Oracle
Linux/Unix/Solaris
Perl, Ruby, Shell scripting
Many Question, mostly focused on SQL basic concept, coding logic, logic in
trouble shooting and tuning
Concept Questions:
1. Difference between Having and Where
2. Difference between Delete and Truncate
3. Joins
4. Difference between IN and Exist (I was not sure about the difference in interview. I just answered: I use IN for assigned value, I use exist for query.)
Coding logic: Intere
j*****n
发帖数: 1781
30
来自主题: Database版 - 发包子,每周一题
Your 2nd question is really hard (at least for me); I'd like to take my best
guess based on my knowledge... correct me!
1. SQL Server restores data to its original disk allocation;
2. Transaction log were not truncated after full backup.
my 2 cents.
a*******t
发帖数: 891
31
columns, index, permission etc
j*****n
发帖数: 1781
32
why don't you try it instead as such question?

table
B*****g
发帖数: 34098
33
要厚道
G********d
发帖数: 593
34

all
undo space 。。。。。
还是说log比较prof一点吧...
a*******t
发帖数: 891
35
来自主题: Database版 - 创建数据库问题
script database objects
or backup, restore as DatabaseB, and then truncate all the data
m**k
发帖数: 4039
36
发现一个有趣的问题, 同样一个stored proc, 用我的user name run是好的, 用我们的
一个general account run就会出现"String or binary data would be truncated."
error
我知道用set ansi_warning off的办法可以suppress这个warning. 那么这个是因为我
的user account by default就设了这个么? 如果是的话, 在哪里可以设这个?
多谢了先.
a9
发帖数: 21638
37
来自主题: Database版 - SQL server stored procedure 求助
奇怪啊,从大往小转是怎么truncate的?
我怎么print cast(x as bit) 除了0都是返回1?
g***l
发帖数: 18555
38
来自主题: Database版 - 再问I/O WAIT的问题
我有一个JOB是RENAME一个很大的TABLE,然后用一个空的TABLE,替换出来了好ARCHIVE
,一些BCP之类的东西,因为数据很多,又不能DELETE,TRUNCATE又怕丢失数据,一天1.
4MILLION.所以只能RENAME,RECOMPLILE,之后还做了UPDATE STATISTICS
(当然可以用PARTITION做ARCHIVE,但现在不是2008 COMPATIBLE,不能用TABLE
PARTITION),现在问题是这个JOB RUN完MAX I/O WAIT就上去了,
我测了一下WRITES TO TEMPDB DOUBLE了,大家看是什么问题,现在MAX I/O在三位数,
周一没RUN这个JOB的时候在两位数,TEMPDB现在自己一个RAID 1.
j*****n
发帖数: 1781
39
other process locked the table...
sp_who2 active
m**y
发帖数: 18546
40

谢谢!解决了。确实有个ghost process locked the table
L*******r
发帖数: 8961
41
来自主题: Database版 - I HATE Micro$oft
这个确实有点恶心。不过这不是SSIS的错,是EXCEL的DRIVER把
长字符TRUNCATE了。都是MS的东西,互相不匹配。
g***l
发帖数: 18555
42
你可以让DBA给你弄个固定的TABLE,你每次TRUNCATE,填充一下,你就什么都不用
RETURN了,我觉得你的STRING COMBINATION可能有问题

thought
y****9
发帖数: 144
43
来自主题: Database版 - SQL Servedr complete recovery question
I think I got the soluton, based on the book online:
"
If the database is offline and does not start.
Try to take a tail-log backup. Because no transactions can occur at this
time, using WITH NORECOVERY is optional. If the database is damaged, use
either WITH CONTINUE_AFTER_ERROR or WITH NO_TRUNCATE.
BACKUP LOG database_name TO [WITH { CONTINUE_AFTER_ERROR |
NO_TRUNCATE }
Important:
We recommend that you avoid using NO_TRUNCATE, except when the database is
damaged.
If the databa... 阅读全帖
D*******z
发帖数: 319
44
Here is the error message. Any ideas? Thanks.
Started: 3:00:00 AM Error: 2011-09-26 05:53:00.76 Code: 0xC02020A1
Source: Data Flow Task 1 Destination - astromembers_txt [154]
Description: Data conversion failed. The data conversion for column "
FirstName" returned status value 4 and status text "Text was truncated or
one or more characters had no match in the target code page.". End Error
Error: 2011-09-26 05:53:00.76 Code: 0xC02020A0 Source: Data Flow
Task 1 Destination -... 阅读全帖
t****3
发帖数: 2337
t****3
发帖数: 2337
m********d
发帖数: 82
47
still not working. same error.
error message:
Error 0xc02020a1: Data Flow Task: Data conversion failed. The data
conversion for column "MEMBER_Notes" returned status value 4 and status text
"Text was truncated or one or more characters had no match in the target
code page.".
(SQL Server Import and Export Wizard)
c*****d
发帖数: 6045
48
update语句没有问题
你如果怕有问题的话,可以做个备份
比如要操作cdb_posts表
先用create table cdb_posts_bck as select * from cdb_posts;
然后update cdb_posts 。。。
如果有问题,可以
truncate table cdb_posts;
insert into cdb_posts select * from cdb_posts_bck;
i****a
发帖数: 36252
49
来自主题: Database版 - 内推力量太强大了
真没 tricky questions. 通常我都问非常标准的技术问题, normalization, index,
truncate vs delete, troubleshooting skills 神马的
这次 interview, 因为是强力内推,加上 17年 DBA 经验, 我问都问没问入门级问题.
问的 high level 的比如, 熟不熟悉 replication 啊? 回答说他们不用 replication
,因为它 buggy. 微软 SQL补丁总会补 replication,就知道它buggy了
我私底下想, 公司现有的 replication 以后就别指望他 on call support 了...
y****w
发帖数: 3747
50
any lock-wait situation?
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)