MS访问SQL Server [英] MS Access to SQL Server

查看:62
本文介绍了MS访问SQL Server的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们遇到了问题。 
以下是详细信息。

We have a problem.  Here are the particulars.

 

1.  
在MS Access 2007中开发了一个应用程序。  所有表单和查询都在Access中。

1.  Developed an application in MS Access 2007.  All forms and queries are in Access.

2.  
在开发服务器上创建MS SQL 2005中的应用程序数据库(“&devdquo;)。 
Access前端没有使用任何视图或存储过程。
 
只是表格。

2.  Created the application database in MS SQL 2005 on a development server (“Dev”).  There are no views or stored procedures used by the Access front end.  Just tables.

3.  
在Dev上的MS Report Server中创建应用程序报告。

3.  Created the application reports in MS Report Server on Dev.

4.  
在Dev上完成开发。

4.  Completed development on Dev.

5.  
在生产服务器上创建了Dev数据库的副本(“ Prod”)。

5.  Created a copy of the Dev database on the production server (“Prod”).

6.  
制作开发Access accdb的副本。  删除了链接到Dev数据库的所有表。 
将所有表链接到Prod数据库。

6.  Made a copy of the development Access accdb.  Deleted all of the tables linked to the Dev database.  Linked all of the tables to the Prod database.

7.  
将此版本发布给用户。  一切都很好。 
然后Prod服务器版本变得很慢。

7.  Released this version to the users.  Everything was fine for a while.  Then the Prod server version got very slow.

 

 
经典SQL失误。  我们没有为未来做好计划,我们的数据库也在增长,所以确定它的运行速度有点慢。 
这是一个很好的想法。  最初也是我的。 
唯一的问题是,所有这些中间的表只有65条记录。

It’s at this point that I can hear all the gears churning.  Classic SQL misstep.  We didn’t plan for the future and our database has grown and so, sure it’s running a little slower.  That’s a nice thought.  Initially mine too.  Only thing is, the table that is at the center of all of this only has 65 records in it.

 

8.  
Dev仍然正常运行。  DBA将数据从Prod复制到Dev上,因此我们拥有相同的数据。 
仍然运行良好。  MS Access表单刷新一两秒。

8.  Dev is still running fine.  The DBA copies the data from Prod onto Dev so we have the same data.  Still runs fine.  MS Access forms refresh in a second or two.

9.  
在Prod中,主表单可能需要20到30秒才能刷新,并且需要相同的时间来刷新。 
此外,有趣的是,在SQL Management Studio中打开此表也可能需要一段时间。

9.  In Prod the main form can take 20 to 30 seconds to come up and the same amount of time to refresh.  Also, something interesting is that it can take a while to open this table in SQL Management Studio also.

10.  
服务人员看一下服务器和网络。 
DBA人员查看了Dev和Prod数据库。 
一切看起来都一样。  一切看起来都不错。

10.  The server people took a look at the server and network.  The DBA people looked at the Dev and Prod db.  Everything looks the same.  Everything looks ok.

11.  
报表服务器中有一个报表显示与应用程序相同的数据。 
此报告会在一两秒内运行。  在Prod数据库上。

11.  There is a report in Report Server that displays the same data as the application.  This report runs in a second or two.  On the Prod database.

12.  
服务器和DBA人员创建Prod(vProd)的虚拟服务器副本。

12.  Server and DBA folks create a virtual server copy of Prod (vProd).

13.  
制作生产accdb的副本。  删除了表格链接并重新链接到虚拟服务器。 
BAM,运行得很好。  快速,没问题。

13.  Made a copy of the production accdb.  Deleted the table links and relinked to the virtual server.  BAM, it runs great.  Quick, no problems.

 

摘要

我可以获取数据开发。

我可以得到通过报告服务器上的数据。

我可以查看vProd上的数据。

我无法让Prod与Access前端一起工作。

 

想法?

 

Larry Geiger

推荐答案

Larry

Larry

你是否对Prod进行了常规维护,比如重新索引,备份,缩小文件等等。我使用Access前端时有一个运行速度非常慢的SQL数据库。当我重新索引每个表时,这一切都被清除了。

Did you do the usual maintenance on Prod like re-indexing, backing up, shrinking the files, etc. I had one SQL db that ran really slow when using an Access front end. It all cleared up when I re-indexed every table.

我可以发布一个查询的SQL,如果你需要,它将重新索引所有表。

I can post the SQL for a query that will re-index all tables if you want it.


这篇关于MS访问SQL Server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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