如何在没有创建自己的表的情况下实现Sql server会话模式(不使用任何命令生成临时表) [英] How to implement Sql server session mode with out own tables created(not generating temp tables using any commands)

查看:65
本文介绍了如何在没有创建自己的表的情况下实现Sql server会话模式(不使用任何命令生成临时表)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以告诉我如何使用sqlserver会话模式而不创建任何预定义的存储过程和表。

任何人都可以通过创建我们自己的表来解释如何使用此模式

Can anyone tell me how to use sqlserver session mode without creating any predifined stored procedures and tables.
Can any one explain how to use this mode by creating our own tables

推荐答案



如果我正确你想在Sql server中存储会话而不创建任何表格。



以下是您可以在web.config中添加的示例配置块

Hi,
If i''m correct you want to store the sessions in Sql server without creating any tables.

Here is a sample configuration block that you can add in web.config
<sessionstate>
    mode="SQLServer"
    allowCustomSqlDatabase="true"
    sqlConnectionString="Data Source=.;Initial Catalog=SessionStateDB;"
    cookieless="false"
    timeout="20"
</sessionstate>



另外,有关更多信息请参阅本文



http://support.microsoft.com/kb/317604 [ ^ ]


根据您的最新评论,有一些误解。 SQL Server Express Edition没有限制,可以防止您事先创建表,存储过程,视图,触发器等。 Express Edition的工作方式与其他版本相同。 Express Edition的局限性主要与数据库大小,内存或CPU使用率以及高级功能有关。



可能导致混淆的一件事是,如果您已附加数据库对于您的项目,每次运行应用程序时,项目中的数据库都可能会替换bin文件夹中已更改的数据库。在这种情况下,看起来所有修改都会丢失。



如果是这种情况,那么解决问题的一种方法是将Express Edition作为普通服务器运行(作为后台服务)并从应用程序连接到它而不是使用用户实例。
Based on your latest comment, there''s some kind of misunderstanding. SQL Server Express Edition does not have a limitation that would prevent you from creating tables, stored procedures, views, triggers etc beforehand. Express Edition works just like other editions what comes to this aspect. The limitations of Express Edition are mainly related to database size, memory or CPU usage and advanced capabilities.

One thing that could cause confusion is that if you have attached the database to your project, every time you run the application the database in your project may replace the changed database in bin folder. In such case it would look like all modifications are lost.

If that is the case, then one way to tackle the problem is to run Express Edition as normal server (as a background service) and connect to it from the application instead of using user instances.


这篇关于如何在没有创建自己的表的情况下实现Sql server会话模式(不使用任何命令生成临时表)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆