免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 7782 | 回复: 10
打印 上一主题 下一主题

sybase再事务中为什么不能创建临时表? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-12-05 13:18 |只看该作者 |倒序浏览
SELECT INTO command not allowed within multi-statement transaction.

论坛徽章:
0
2 [报告]
发表于 2003-12-08 15:35 |只看该作者

sybase再事务中为什么不能创建临时表?

ding

论坛徽章:
0
3 [报告]
发表于 2003-12-08 20:25 |只看该作者

sybase再事务中为什么不能创建临时表?

好像不行

论坛徽章:
0
4 [报告]
发表于 2003-12-29 11:03 |只看该作者

sybase再事务中为什么不能创建临时表?

有什么办法解决嘛
chy740118 该用户已被删除
5 [报告]
发表于 2003-12-29 11:33 |只看该作者
提示: 作者被禁止或删除 内容自动屏蔽

论坛徽章:
0
6 [报告]
发表于 2003-12-30 11:58 |只看该作者

sybase再事务中为什么不能创建临时表?

对呀,正如楼上所说,要选中数据库选项事务中的DDL。

论坛徽章:
0
7 [报告]
发表于 2003-12-30 12:37 |只看该作者

sybase再事务中为什么不能创建临时表?

sp_dboption "ddl in tran",true
go

论坛徽章:
1
2017金鸡报晓
日期:2017-01-10 15:19:56
8 [报告]
发表于 2003-12-30 13:00 |只看该作者

sybase再事务中为什么不能创建临时表?

没用的,加上ddl in tran也不行,sybase手册上明确说了不允许。

论坛徽章:
0
9 [报告]
发表于 2004-01-04 20:14 |只看该作者

sybase再事务中为什么不能创建临时表?

Explanation
SQL commands are grouped into the following categories:


SQL commands that are not allowed in transactions at all.

SQL commands, such as Data Definition Language (DDL) commands, that are allowed in transactions only if the required database option (ddl in tran) is set to TRUE.

SQL commands that are allowed only if the transaction affects some other database. These commands include create table, drop table, and other commands that are run across databases to create or drop objects in another database when the database in which the objects are being created or dropped has the database option ddl in tran set to TRUE.


Error 226 occurs when Adaptive Server detects a command that is not allowed in a multi-statement transaction. A multi-statement transaction is a set of commands prefaced with the begin transaction command.

The following commands are never allowed in multi-statement transactions:


alter database

create database

dbcc reindex, dbcc fix_text

disk init

drop database

dump database, dump transaction

load database, load transaction

select into

set transaction isolation level

truncate table

update statistics

setuser


The following commands are not normally allowed in multi-statement transactions but you can use them if you use sp_dboption to set ddl in tran to TRUE first:


create default, create index, create procedure, create rule, create schema, create table, create trigger, create view

drop default, drop index, drop procedure, drop rule, drop table, drop trigger, drop view

grant

revoke


Action
If the command is allowed in a multistatement transaction when ddl in tran is set to TRUE, set ddl in tran to TRUE before running the transaction. Setting ddl in tran to TRUE causes locks on system tables and this can affect performance. You can check the current setting of ddl in tran with sp_helpdb.

If the command is never allowed in a multi-statement transaction, execute it outside the multi-statement transaction.

论坛徽章:
0
10 [报告]
发表于 2006-06-22 14:17 |只看该作者
两年后再次把问题顶上来,大家讨论一下
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP