问题标签 [sql-server-administration]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
sql - 数据库“tempdb”的事务日志已满
我只有对我正在查询的数据库的读取权限。从昨天开始,相同的查询一直在工作,但今天我在 sql server management studio 中遇到了以下错误。
数据库“tempdb”的事务日志已满。要找出日志中的空间不能被重用的原因,请参阅 sys.databases 中的 log_reuse_wait_desc 列
非常感谢任何想法或建议。提前致谢!!
sql-server - Detaching a database as a backup strategy
I've read dozens of articles about why this is a bad idea. The arguments against using a detached database as a backup are legion. However, I still think that in my case, it makes good sense. Realizing that those are often the words of admins who know too little, I'd like to put my strategy to the good folks here to see if someone can tell me why what I'm doing would be more properly done with the internal backup mechanism.
Let me address some of the common issues.
- My database files are almost full, so the fact that backups only copy utilized pages isn't relevant to me;
- I'm not using any filestream storage;
- my application can handle small bursts of downtime when I detach and make a copy;
- The various file permission nightmares that accompany detaching databases have already been solved.
The total size of the DB is about 1TB. My main reason for detaching and attaching instead of using backups is performance. In my testing, it is significantly faster to detach the database, make a copy of the underlying files, and attach the original files again than it is to perform a backup. During recovery, it is also significantly faster to attach files (even if I have to copy them to the proper location first) than it is to restore them.
I can get around the backup performance problem by using something other than a full backup, but that doesn't help when it comes to restoration. In the event of a disaster, I need to be back up and running quickly. My application can handle small amounts of downtime periodically, but any large stretch of downtime is disastrous. Restoring 1TB of database takes longer than the business wishes to tolerate for the application.
The last item I've often read is that detaching a database comes with some risk. Just like we ought to perform test restores of backups, I immediately attach any copied MDF/LDF/NDF files to a disaster recovery SQL Server to make sure the copy is good. I suppose my exposure here is that I could detach the database and break something such that the original DB files can no longer be re-attached. Honestly, I've never seen this, so if this is really a possibility, I feel that it's quite remote. I'm doing this nightly, so I'd lose a day's worth of reporting data in this (unlikely?) scenario.
Am I missing anything else?
sql-server-2012 - 扩展事件和 SQL Server Profiler
我了解扩展事件和 SQL Server Profiler 的概念,我觉得它们都在做同样的工作。我无法理解它们之间的主要区别。谁能解释一下扩展事件和 SQL Server Profiler 之间的主要区别?我们什么时候可以在生产环境中使用?SQL Server Profiler 是否更适合生产服务器?
sql-server - 可以重置/更改 SQL Azure Globan 管理员和创建的用户密码吗?
在我使用全局管理员登录名/密码配置 SQL Azure 单一数据库后,是否可以在通过 SQL 脚本进行初始部署后对其进行更改?
上述全局管理员创建的 SQL 登录名/用户的密码是否可以在初始部署或通过 SQL 脚本设置后更改/重置?
sql-server - 如何从 Azure AppService 安全访问 onprem 数据库
有没有办法从 AppService 安全地访问本地 Sql Server?
IT 人员对于让需要访问我们本地数据库的应用服务感到紧张。
我不是网络人,我正在尝试提出解决方案。
我唯一想到的是创建一个新数据库(CDS_API)。然后为 AppService 提供一个到该数据库的连接字符串。然后,该数据库将有权访问主数据库 (CDS)。
如果 AppService 只有 CDS_API 的执行权限,这对我来说似乎是安全的。我错过了什么吗?
有一个更好的方法吗?
sql - SQL Server 2019 Express 安装错误挂在 sqlenginedbstartconfigaction_install_configrc_cpu64
SQL Server 2019 Express 安装在 sqlenginedbstartconfigaction_install_configrc_cpu64 处挂起。
错误日志如下
database-performance - SQL Server 2019 慢查询性能问题
我们有一个具有以下规格的物理服务器(非虚拟):
- 服务器型号:HPE ProLiant DL360 Gen8
- CPU:2xE5-2696V2(2.5GHz/12核/30MB)(48逻辑核)
- 内存:128GB
- 存储:128GB SSD (OS) 4x900GB SAS (Raid Backup)
我刚刚在其 Windows Server 2019 操作系统上安装了 SQL Server 2019(企业版)。不幸的是,任何查询的性能都很慢,即使是从一个简单的表中进行简单的选择,执行时间也是我的开发系统的两倍。
我的开发系统规范是:
- CPU:酷睿i7 8700K
- 内存:32 GB
- 硬盘:256 SSD
- 操作系统:Windows 10
这是令人难以置信的结果(我知道)并且震惊了我与他们分享这个问题的每一位 IT 专家,但直到现在我还没有任何解决方案。
我考虑过这些事情:
服务器上的操作系统一点压力都没有,SQL Server只是已经安装好的软件
我已经监控了所有 CPU 活动并确定所有逻辑核心都在处理
所有索引都已重建并且统计信息已更新(尽管我之前提到过,我有两次执行时间来从仅涉及聚集索引的单个表中进行简单选择)
由于情况相同,我从我的开发系统中备份了数据库并直接在服务器上恢复,没有任何更改(我们的比较情况完全相似)
我检查了很多硬件参数,比如存储的读写速度……但我没有弄清楚当我得到这些结果时会发生什么。
我知道情况很复杂,可能会影响许多参数,但是有什么建议可能我错过了解决这个问题吗?谢谢你。真挚地
sql-server - SQL Server 代理新作业依赖于现有作业的现有步骤
我有 2 份工作;Job2 依赖于 Job1 的 Step16 的完成。所有这些步骤都在为不同的系统执行数据刷新。Job1:按顺序有 25 个步骤,即 Step 1 完成,然后 Step2 开始,依此类推 Job2:只有 1 Step,稍后我们计划添加更多步骤。
但是现在的问题是我不能修改Job1的顺序,而且完成从Step16到Step25的步骤所花费的时间是巨大的。所以我不能将 Job2 Step1 添加为 Job1 Step26。
我需要的是我的 Job2 只关心 Job1 的 Step16 是否完成。Job1 Step16完成后是否可以触发Job2?