Questions tagged [sql-server]

All versions of Microsoft SQL Server (not MySQL). Please also add a version-specific tag, like sql-server-2016, since it is often relevant to the question.

Filter by
Sorted by
Tagged with
0
votes
0answers
22 views

Conflict Viewer in merge replication

i created merge replication on sql server 2014 Enterprise edition and i saw some conflicts in conflict table but when i opne conflict viewer it showing below Error before this it is working fine and ...
0
votes
0answers
23 views

How to remove Sql Server Fingerprints? [duplicate]

I have a sql server which being monitor by Nagios. One day, i received some alerts from nagios come with some sensitive information like: Critical Alert: dbi connect (Server name: ABC, Encrypted ...
0
votes
0answers
40 views

Why do I have to omit SQLEXPRESS when connecting from remote machine

I tried to connect to my remote SERVER\SQLEXPRESS for a couple of minutes, after I enabled TCP/IP with Port 1433 and Named Pipes. However, it will only connect when I omit the SQLEXPRESS, so I only ...
0
votes
0answers
38 views

Pull out top stored procs with high recompile rate

Is there any other easy way other than running profiler that I can pull out the worst offending stored procs with high recompiles? Any helpful DMVs?
0
votes
0answers
32 views

How can I tell which queries and nonclustered indexes are doing bookmark lookups on my primary key for a specific table?

Is it possible to get the queries and the names of the nonclustered indexes in my database which are doing bookmark lookups / key lookups in the execution plans? Would I have to go through the plan ...
0
votes
1answer
37 views

Select records between different work shifts depending on datetime

I have a data table called "Requests" that records the requests made by employees in a company, I used to use a Stored Procedure to get all the request from a single workday (starting at 6am and ...
0
votes
0answers
25 views

Cannot connect to integration services remotely on one machine

Something on workstation has broken the ability to get into any integrated services. SMS and SQL (ssis) are same versions. The error "The specified service does not exist as an installed service" ...
0
votes
1answer
20 views

How to have a fail-over resilient SQL Server view over linked mirrored database table

Say I have a set of servers with mirrored application databases and a set of statistics servers where a couple of the tables are exposed from the application database as views (with some tenant ...
0
votes
0answers
37 views

Different execution plan - Delete TOP 10 vs Delete TOP 1000 [duplicate]

Was troubleshooting a delete statement that periodically delete old data from a monitoring table and noticed different behaviour with different TOP numbers and wanted to understand why. Delete ...
0
votes
1answer
23 views

Select images where ALL images are greater than pixel width

I will try to explain this clearly. I have a table of 200,000 records that stores pixel sizes for our product images. A variety of image sizes have been saved over 20 years, and products do not ...
0
votes
1answer
16 views

Does anyone knows how the filestream folder structure works?

I am trying to find the database/table that these files correspond to. In the filestream data store they are always stored under two GUID. Do they correspond to object id / column id? how to i ...
0
votes
0answers
70 views

SQL Server 2012 service crashed

A few days back we had an instance we noticed that the SQL Server 2012 service crashed. This had happened for the first time in the past 3 years. I got error logs but didn't the dump file... here few ...
0
votes
0answers
34 views

sqlpackage RegisterDataTierApplication errors with Azure SQL Database

I am trying to run sqlpackage from an locally hosted Azure Function inside a Docker container (so Linux), I have downloaded the latest 18.4.1 sqlpackage and running the following :- sqlpackage /a:...
0
votes
1answer
48 views

how to find backup history of SSAS database

Shockingly on Internet, I am unable to find backup history of SSAS database. Is there no way to do it? Also should we take multiple backups of SSAS database? I am not much aware of SSAS database. ...
0
votes
0answers
21 views

Sql Server with S4 HANA linked server queries with table variables [duplicate]

This is a relatively simple question that may not have an answer, but I have a SQL 2017 instance that has a Linked S4 HANA server connected through the HDODBC drivers. I have done many OPENQUERY ...
0
votes
1answer
33 views

SQL: Merge rows when value doesnt change in continuous time

I am new to SQL and I need to summarize a table that has this information: Serial Number, StartDate, EndDate, StatusID and TimeInState, what I need is to merge rows that keep the same StatusId during ...
0
votes
0answers
19 views

questions on sqltabledependency, servicebroker and replication

is the activation of the servicebroker on a database permanent so i can use it with the sqltabledependency , or it will auto desactivate after some amount of time ? i am developping an application ...
0
votes
1answer
35 views

Register the time a machine running in a timerange using sql

machinename startdatetime enddatetime timerunning(mins) timerange vxx:2019 2020-02-07 13:45:18.790 2020-02-07 16:00:38.920 135 12:00 the above machine ...
0
votes
0answers
51 views

T SQL/ Reporting Question

I have a view that is pulling sales from multiple companies and I need to basically 'combine' two rows so they display as one. Here is a picture of what the data looks like: I need to take all rows ...
0
votes
0answers
54 views

SQL Job get stuck on a simple Select into vaiables query

I have an issue that I please need help in trying to resolve as its really becoming a bit pain. I have some Jobs that monitor our systems for calls stuck and it's getting stuck (the irony is not lost ...
0
votes
0answers
13 views

GROUPING SETS equivalent in MDX?

I'm creating an SSRS report that allows the user to select the different type of aggregations that are displayed in the report (e.g. overall, by type, by discipline, by type/discipline). Currently ...
0
votes
1answer
31 views

The join part uses OR that's why running long I'm trying to make it faster

The join part uses OR that's why running long I'm trying to make it faster SELECT sc.clientid ,sc.dictionid ,sc.firstname ,sc.lastname ,sc.DB ...
0
votes
0answers
24 views

Pivot table and summarizing 2 columns

so, I have a pivot table in which I have orders and they're grouped by year, I want to also count all the orders by year. I'm having a hard time doing this. this is the query: DECLARE @fromDate AS ...
0
votes
3answers
58 views

Discarding results from CTE based on another CTE

WITH R1 AS ( // some complex query ), R2 AS ( // uses R1 // another complex query ), // here I already have dataset with Id, Name, ProductReference and other columns R3 AS ( select ...
0
votes
0answers
24 views

sql developer client for sql server multiple sessions

I am using sql developer to work on SQL server. The connection uses jtds-1.3.1.jar. When i query sql server everything works fine. i am monitoring the session direcly on sql server through ssms. The ...
0
votes
0answers
37 views

Create multiple logins with the same permissions

I have a server instance with 100 databases in it. I need to create 20 new logins with access to 65 of the 100 databases. They all need to have the exact same permissions. The 20 logins should not ...
0
votes
0answers
52 views

Setup certification for SQL Server running on Debian

I have successfully setup an instance of a SQL Server 2017 instance on the latest Debian release, and a domain that points to that server, and I have gotten the respective certificates by using ...
0
votes
0answers
33 views

Best Practice: Persisted Computed vs Computed with Index vs?

I am an accidental DBA charged with performance tuning a mess of queries (both literal, and figurative). One pattern we have is to always store Dates as DateTime2(7) regardless whether we need the ...
0
votes
0answers
84 views

SQL Server 2019 Always On performance [closed]

We are in process of development of project which will process around 51 000 000 records daily (~around 500-600 inserts per second). We choose Always On solution in SQL Server 2019 which will contain: ...
0
votes
0answers
47 views

Unable to create ssis db catalog

I am trying to create ssis db catalog using wizard but getting this error message: The catalog backup file 'C:\Program Files\Microsoft SQL Server\120\DTS\Binn\SSISDBBackup.bak' could not be ...
0
votes
1answer
24 views

Convert a numeric column with number eg.(-1222222) to two float column with two decimal places eg (-12222.22)

I know there are different variations of this question asked. But what I am trying to do is that, there is a table with a numeric column (12,0) that has data looking like Units ----- -1222222 0 -19 ...
0
votes
0answers
21 views

Alter Filegroups to move from alternative FG back to Primary [duplicate]

I have a multitude of SQL Db's that have in excess of 80 individual file groups - I have been tasked with a project to try and get those FG's moved back to the primary - so I'd essentially have to ...
0
votes
0answers
25 views

Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, page server reads 0 [duplicate]

When I turn on the STATISTICS IO in SQL Server the provided message include the following: Table 'Customers'. Scan count 9, logical reads 19500, physical reads 0, page server reads 0, read-ahead ...
0
votes
3answers
46 views

Query to seed many to many table

How can I write a query to seed a many to many table. Let's say I have an Employee table, a Branch table, and I am introducing an EmployeeBranch table for the many to many relationship. I need to ...
0
votes
0answers
41 views

SSIS Script transform package won't compile when deployed to dev [Visual Studio 2017]

I have visual studio 2017. I have a script transform that I can run locally just fine, however when I deploy to the Integration Services Catalog on the dev server and run it, it fails with the ...
0
votes
1answer
82 views

Unable to attach SQL Server database with shared folder in docker on Linux

The problem I'm having is that my SQL Server 2017 Linux container is not able to read my database files. I guess it has something to do with permissions and I'm sure I've overlooked something but I ...
0
votes
1answer
34 views

Invalid object name 'ApexSQL.ApexSQL_SourceControl.Objects'

I was trialing Apex source control - trial ended. Uninstalled Apex (well I thought I did). Today I deleted the Apex database. Now I get Msg 208, Level 16, State 1, Procedure ...
0
votes
1answer
17 views

Select rows from table having specific values depending on another values in the same table

I need to be able to select all Userpin that have tr_type 7 only but if there is tr_type 7 and 8 in other row ignore 7 and 8 example: Userpin TrDate Time1 Tr_type 4555 12-02-2020 ...
0
votes
1answer
80 views

change stored procedure to accept a range of ids

So I'm looking at a stored procedure, which works with nopcommerce. It's used when searching products. There is one section which allows filtering of specification attributes, and it it seems to only ...
0
votes
1answer
37 views

Select Column data, from sys.column info

Either this is impossible, or I can't write a good internet search. I have a query to get the table and column information for our database: Select t.name [table], c.name [column] From sys.tables t ...
0
votes
0answers
56 views

Why additional plans are created under simple parameterization?

I have a table which has 2163 rows and clustered index on id column. I run the following queries: select id from ticket_attach where id = 1 select id from ticket_attach where id = 2 select id from ...
0
votes
0answers
55 views

SQL Server database restore from backup changes all dates with datetime2 type return with values to future dates

I'm trying to restore a SQL Server database from a .bak file. The process completes without any issues, but the dates with datatype datetime2 are presented with totally different values (change to ...
0
votes
0answers
70 views

Explaining about SQL Server query Execution Plans and understanding Clustered and Nonclustered Indexes

I'm Christine and I'm a newbie. I would like to know if someone could help me clarify what I'm drilling down this execution plan as below : Here's query generated from SQL server that is accompanied ...
0
votes
1answer
26 views

Processing Dimension completed but error occurs

I have problem while processing cube in SSAS, everytime I have an error: I tried to process every dimension separately and it looks like something bad was going on after processing 'Date' dimension. ...
0
votes
1answer
32 views

SQL SERVER: Header Blocker Across Multiple Databases with wait type CXCONSUMER

We have an instance of SQL Server which has multiple databases. A process in one database seems to be blocking a process in another database. When I look in activity monitor I can see a header blocker ...
0
votes
1answer
111 views

Backup from Azure SQL Managed Instance and restore on an On-Prem version

As per my understanding Azure SQL MI runs SQL Server under the hood. So a backup from MI can be restored on latest version of SQL Server (2019). I have a task to find a rollback strategy if the move ...
0
votes
1answer
19 views

Is there a way to specify which schema the database task “Export Data-tier Application” exports for the other entities besides the tables?

I noticed in the Export Data-tier Application database task, you can specify which schema to export data from in regards to tables, but I also want to exclude certain schemas for the other object ...
0
votes
2answers
44 views

How to get first and last value by same item in sequence, with possibility of the same item occurring again

Similar to this question but with the possibility that the same name can appear again in the following rows. I have this table: id name value 1 Daniel 3 2 Daniel 7 3 Daniel 2 4 Carol ...
0
votes
0answers
42 views

Audit sysadmin activities on SQL Server

because of GDPR we need a system that monitores all activities that administrators does on an SQL Server. First goal is to audit sysadmin activities (selects too), but if possible activities of ...
0
votes
0answers
48 views

Within a given database: what objects cant have the same name?

In a given database what objects (Table, View, Index, Constraint, Trigger etc) can or can't have the same name? So a table or view can have the same name if they are in a different schema. Is this ...

1
501 502
503
504 505
562