sql-server's questions - Chinese 1answer

22.105 sql-server questions.

We have our clusters set to High Availability and manual failover. I have an alert to email DBAs whenever a failover occurs. What we would like to also see in the email is WHY and/or WHO. We have ...

I have a TVF that when called takes 10 secs to run. However if I take the query inside that TVF, it takes only 1 sec. I have added correct indexes on this underlying query tables. In the Execution ...

I setup Log Shipping. I have Secondary Destination Server as Monitoring server also. For some reason when running this system stored procedure or looking at Server-->Reports-->Transaction Log Shipping ...

I have been searching for 2 days for the solution to this, but every solution does not apply to my situation. I have 2 SQL servers: DataServer and InterfaceServer set up as linked servers. DataServer ...

This is an open request for any thoughts, advice or guidance about an issue I have while attempting to apply SP4 to a SQL Server 2012 installation. The server is currently the secondary node of a two-...

How can I execute a large (>40k char) block of T-SQL on each database in a MSSQL instance, considering the following have character limits which would truncate the command passed in a variable, and I ...

Does Read Committed Snapshot Isolation remove read-write contention in any condition? This is what I am reading online. However, if a read query executes and acquires a shared lock first, it can block ...

Parent question - Thanks to Tom V for answer. I am making little modification's to Tom V's answer to suit my requirements. I would like to change the following to replace a string instead of ...

I have a box that lists SQL Server 2014 SP2 (12.2.5000) in both add/remove programs and the registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\120\SQLServer2014\CurrentVersion\...

I want to concat a multiple column of table with separator "|" but if null data in some column separator should not come E.g Table +----+------+---------+-----+ |Code| M1 | M2 |M3 | +----...

I'd like to know if a resource exists which shows the earliest SQL Server version supporting each data type. For example, what was the first version of SQL Server to support binary/varbinary data ...

I'm slightly new to this field and have a performance issue ongoing at random times of the day with my SQL Server 2016 box. I notice the batch requests per second spike up and down for duration of a ...

We are moving our Data Warehouse to a hosting company, and they don't want to give RDP access to the server. This kind of bothers me, because it will make my life more difficult. Generally, I tend to ...

One of the SQL queries I am working on is slow in performance. I have been trying to fix it for the last two days, unsuccessfully. The query is generated from an application (Linq to sql -EFF), and ...

In my current project we are required to keep the records of data changes for the Employee table at least for specific field for NOW (it can be extended for all the fields later). We are also ...

I would like to see information on how many times has a table been fully scanned. I was hoping for something like sys.dm_db_index_usage_stats but for table scans. There is a method described at the ...

So, I'm having some difficult to migrate SQL Server to Oracle. This time there appears a new error message: Migration actions have failed check the migration reports for details. : Capture Offline ...

I've got a simple query that creates a daily snapshot that uses a WHILE loop statement in SQL for a range of dates. The problem is the query is taking quite long running at 25-40 mins. I've tried ...

I've put off asking this question for some time since it's tricky to encapsulate our situation and challenges without a wall of text, but the situation is getting worse so I'll do my best. I'm looking ...

We have recently migrated our SQL Server distribution database to a multi subnet failover cluster, and have found that occasionally when adding articles/viewing replication status from the publisher ...

I am trying to do database refresh within Sql server 2014 instances from lower env to production for making it to golive. All the required logins exist on current prod and as far as I understand while ...

We have a master database named MASTERDB which will be used by individual .NET application databases to select few tables or do JOINS between MASTERDB and app DB's using Linked Server pointing to a ...

I'm trying to send an email through SQL Server. The sp_send_dbmail has a parameter to specify the path of a file to send as an attachment. It works perfectly when the file is in the same server where ...

I am new to MSSQL and I tried to install it my local Machine, but above two instance instillation state is failed. I want to know, what are they and how i reinstall that features ? --------------...

(MS SQL Server 2008 R2) I have transactional replication setup from server A to server B. Server A is an Oracle server, so the publisher and subscriber both reside on server B (SQL 2008 R2). It was ...

I have created a Heterogeneous connection between SQL Server and Oracle and tried to call a oracle procedure from SQL Server.I got below error when i tried to execute the procedure. OLE DB provider ...

I need to automate email notifications on blocking on some SQL 2016 servers. I have had a look at running a job through the SQL agent but seems hack n slash. I found an alternative method online that ...

There were 2 running, actually, the first one I killed went away quickly. The second is in suspended status, from sys.dm_exec_requests the percent_complete doesn't change (88.87) and the ...

When using an OLEDB source editor, is there a performance benefit or difference in using "Sql Command" over "Table or View" when you want the entire table? This is a variation on this question, in ...

I'm looking to store GPS co-ordinates in an SQL Server 2005 for location matching of users with GPS-enabled mobile phones. I've read about STDistance on MSDN, but it only appears to exist in SQL ...

Can someone help me to troubleshoot the below error? I am getting the error executing the below code. CREATE TABLE #Drive ( drive char(1) Primary Key, freespace int null ) Insert into #...

I have an existing database solution that is not performing very well. I am searching on multi-dimensional data with a traditional table structure using floats, etc. The database contains ~ 1-2M rows. ...

@@Version Microsoft SQL Server 2008 R2 (SP3) - 10.50.6220.0 (X64) If I try to insert data into a geography datatype in a temp table I get a CONVERT_IMPLICIT, converting a Geography datatype to a ...

I have a Reading Table with following details: Reading(rea_ide(PK), rea_ini, rea_dat, met_ide(FK)) I also have a Meter Table Explanation: The bill is received for a ‘Main Meter’ and then this bill ...

We have two MS SQL Servers (2012 Standard Edition on Windows 2012 Server) which are located in the same subnet. One is production server. Another is reserve server. Currently there is a ...

I am investigating migrating an on-premises SQL Server availability group to an Azure SQL Managed Instance (2 databases, 600 tables, 3TB, of which 2TB is blobs). A significant amount of on-premises ...

First, I want to say how wonderful a tool this has been over the years to implement a great backup strategy. I did run into a unique situation this last month. During an upgrade to a third party ...

We have an application from JD Edwards, for which the database runs on SQL Server 2005 or 2008R2. They have a new application vendor and he suggested to change isolation level to Read Committed ...

I previously used MS SQL and then MySQL and Postgres. If one uses ANSI SQL then I suppose it should be portable between vendors but if there are stored procedures then I don't think it is 100 % ...

I am looking for a step by step walk through of how to setup a distributed availability group with manual seeding. I can get the automatic seeding working but when I try to manually seed I cannot get ...

I am looking for a robust open source tool for monitoring SQL server. Ours is a small organization and we don't have any monitoring tool in place and would like to know if any open source tool is ...

I would like to change all file groups in my database to AutoGrow_all_Files, but only if it is currently AutoGrow_Single_File, like this: ALTER DATABASE mydatabase MODIFY FILEGROUP [myfilegroup] ...

What is Symantec Backup Exec (TM)? I noticed that it is running in one the database server i am maintaining. I am a newbie in db administration and i am not sure what it is. It is running DBCC CheckDB ...

We have been using this syntax when using OpenRowset to collect data from other SQL Server instances SELECT a.* FROM OPENROWSET('SQLNCLI11', 'Server=STARDBS1004\T12;UID=user;PWD=pwd;', 'select * ...

Will you please help me understand pros and cons of using Ola’s solution over maintenance plan? I have prepared a presentation based on SQL Pass (http://www.pass.org/DownloadFile.aspx?File=ebae1b31) ...

Does the order of operation that you place your LTRIM and RTRIM matter when used in conjunction with ISNULL? For instance, take the following example where a user potentially enters a bunch of spaces ...

I've created a materialised view in SQL Server, but when selecting from it I get the same performances and the same execution plan than when I select from the same query not "materialised". The view ...

I am investigating the reason why a query is performing bad in my SQL server 2016. The query executes in 1 sec when i give the date range filter as 2017-06-21 and 2018-06-20. When i give the date ...

Question UPDATED: Yes I know the tables are not normalized and yes I know there are no primary keys. Semester table Semester, Year, City 1|2017|Washington 2|2017|Paris 3|2017|London 1|2018|Paris 2|...

I'm trying to estimate the restore time for a few 1TB+ databases on SQL 2012. Is it possible to look at completed restores from the last year and list the completion time ? It's an odd remote server ...

Related tags

Hot questions

Language

Popular Tags