Questions tagged [sql-server-2005]
Use this tag for questions specific to the 2005 version of Microsoft's SQL Server.
sql-server-2005
18,355
questions
0
votes
0
answers
22
views
Locked out of SQL Server 2005 .... User number set to "1" in Enterprise manager? [migrated]
Whilst trying to restore a "master" backup file (on my Windows Server 2003 / SQL Server 2005) machine I've dropped a clanger and re set the number of users from "0" (unlimited) to &...
0
votes
2
answers
100
views
Extract and process substring between varying numbers of delimiters in a variable length string
I have a table dates with a column SENTDATE where each row has a varying number of dates in it, separated by a semi colon (;). The dates are currently in the format YYYYMMDD - for example:
20240529;...
1
vote
1
answer
59
views
How to dynamically set the value of a parameter in sp_executesql without modifying the calling software
I'm currently working with a stored procedure that executes an INSERT statement using EXEC sp_executesql. The procedure takes several parameters, including @TRANSACTIONNUM, @CUSTOMERNUM, @VALUE, and @...
0
votes
1
answer
42
views
How to pass symmetric key to query
I want to know how to pass symmetric key to SQL query as parameter.
I'm usually hardcoding it within the query as follows:
OPEN SYMMETRIC KEY SymKey
DECRYPTION BY CERTIFICATE CertiFi;
SELECT * FROM ...
0
votes
0
answers
39
views
Possible reasons for an SSIS conditional split into the same destination table?
I've been given the unenviable task documenting the catalogue ingest process of our data warehouse. All was going well until the end where I came across the use of a conditional split inside of an ...
0
votes
1
answer
85
views
Replace occurrences of characters in a string
Values in the column Name_Orig look something like this:
**Ang-Stl-A36-6X4X.5**Angle,A36*,4X6X1/2****
I want
First occurrence of ** to be replaced by Xx_
Second occurrence of ** to be replaced by a_
...
0
votes
0
answers
122
views
What does the value 30 indicate in the type column in the MSrepl_commands table?
Result Set of MSrepl_commands
I want to infer that whether its a insert/update/delete command . We need to check at day end the amount of data replicated per article by the transactional replication. ...
-1
votes
1
answer
115
views
What is the fastest way to extract data from SQL Server 2005 using PowerShell 7?
This is not just a simple extraction.
I have two tables. I take the values from one table and then use one column from this table to find a corresponding value in another table and then extract all ...
0
votes
1
answer
80
views
Auto applied migrations using EF Core 7.0.14
When I make a new migration (Add-Migration Example) , and then I try to get all the migrations (Get-Migration) I find that the "applied" field is "True" without even using (Update-...
1
vote
4
answers
94
views
Need a SQL Query for Getting matched and not matched Records
My table structures are shown here:
Table1
Col1
10
20
20
20
30
30
40
Table2
Col1
10
20
30
40
My expected result is this:
Col1
Col2
10
Matched
20
Matched
20
Not Matched
20
Not ...
-1
votes
3
answers
130
views
SQL Server query returns multiple line results instead of returning 1 line
Using SQL Server, I have multiple tables:
Assignments
aID,
acID,
clientID,
userID,
pos,
dateOn
AssignmentCarriers
acID,
clientID,
cName,
isAssignment
Users
userID,
fName
Clients
...
0
votes
0
answers
109
views
Write error with spark.write against SQL Server table (via JDBC Connection)
We are trying to save a DataFrame in SQL Server (V2005) using the following method:
df_cards.write.jdbc(url=conn_str, table=tablename, mode='append', properties=properties)
However, we encountered ...
0
votes
1
answer
120
views
Extract data using multiple conditions for the column value?
From a certain column I need the following type of data:
Value is 6 characters long and is numerical
“L” is any letter followed by 5 numerical characters, for example L12345 the L needs to be turned ...
1
vote
0
answers
77
views
MS SQL SERVER 2005 temp db log file size is increasing
Sometimes, when there is no load on the server, the size of the MS SQL database tempdb log file (templog.ldf) starts increasing. As a result, the available space on the C drive decreases. To resolve ...
1
vote
3
answers
738
views
How to get the sum of a column for the current month?
I have a column Amount which I want to get its sum by month within each year.
I have tried the following query and it works well for year but month is summing up incorrectly. For instance in this May, ...
0
votes
0
answers
889
views
Cannot connect to server - An existing connection was forcibly closed by the remote host
I have updated my PC to Windows 11 Pro ver 22H2, Os build 22621.1
After this update, I cannot connect to SQL Server 2005 from SSMS v.18.4
Client OS: Windows 11 Pro ver 22H2, Os build 22621.1
Client ...
0
votes
1
answer
54
views
MS SQL Sort Alphanumeric values (1, 2, 3, 5, 6, 7, 9, 10, 4a, 8a, 4b, 8b) [duplicate]
In SQL database (2005/2008), I have a field named Ordernumber having the following values: 1, 2, 3, 5, 6, 7, 9, 10, 4a, 8a, 4b, 8b I want a way to sort them to be 1, 2, 3, 4a, 4b, 5, 6, 7, 8a, 8b, 9, ...
0
votes
1
answer
374
views
Is there a way to Manually unlock the Opentext Exstream Design Database?
I have encountered an error after attempting DB Maintenance from within Design Manager, and cannot figure out how to get the DB unlocked.
Essentially, ran the DB check for errors utility, and during ...
0
votes
1
answer
45
views
how to put a count or sum to all duplicates and make every unique data has a row
I have this table called Table1 with fields subkey, category and frequency. I want to populate the frequency by counting per category.
Subkey
Category
Frequency
AA
apple
BB
apple
CC
banana
BB
...
0
votes
1
answer
48
views
SQL Server 2000 database after restore to 2005 is empty
I have very old backup file (.bak) of SQL Server 2000. After restoring it to SQL Server 2005, the database looks empty (please see screenshot).
What is the probable cause?
screenshot
0
votes
0
answers
33
views
How to configure the session to stop executing all following commands on first error?
Suppose I have a script:
alter table ....
go
insert into ...
go
alter table ...
go
delete from ..
go
How do I configure this session at the beginning of this script, so that if any of the four ...
0
votes
0
answers
62
views
Can't connect firebase functions with google cloud sql
I'm hosting a sql instance on google cloud sql. Firebase functions worked with this instance flawlessly.
Now it stopped working out of nowhere and I can't seem to get any error.
Code:
const mssql = ...
0
votes
0
answers
26
views
What is wrong with my SQL RESTORE statement?
I am trying to recover a database for a customer who has been depending on MS Dynamics for a long time. His Server 2003 data drive failed irrevocably, but he had a recent backup of the his Server ...
0
votes
1
answer
30
views
I want order details also like order columns
select o.*,x.cust_name from(
select cust_name from customer c where salesman_id IN(
select salesman_id from Orders o where ord_date ='2012-08-17'))x
I only got customer names but i need order ...
-2
votes
1
answer
42
views
By using single CTE with multiple statements in it. can I perform mathematical operations on CTE output to get final output?
Below is my CTE Example It's just a example my actual query is different
;with CTE as
( select 1+1 as A,2+2 as B,3+3 as C
)
select (A+B)-C as Final_Count from CTE
here in above example A,B & C ...
1
vote
0
answers
147
views
Best way to create an SQL Server DB in AWS using Terraform?
To Devs, I am trying using the following:
enabled_cloudwatch_logs_exports = var.enabled_cloudwatch_logs_exports
create_cloudwatch_log_group = var.create_cloudwatch_log_group
...
-1
votes
2
answers
55
views
Need to rank the data in SQL Server
From the input data, I need to rank the id. The data is order by time ascending.
Example: id number 421492036 has two record with code '05' and is ordered by time ascending.
The ID 421492036 has same ...
0
votes
0
answers
25
views
Create an Identity column [duplicate]
I am trying to create a column with incrementing numbers inside a group as per Table below.
RecordID
OrderID
IncrementInGroup
a
1
1
b
2
1
c
3
1
a
4
2
a
5
3
a
6
4
a
7
5
b
8
2
c
9
2
I am ...
0
votes
1
answer
888
views
How to resolve "...Error occurred during the execution of xp_cmdshell"?
The engineers uses this Access based app that takes data from SQL Server 2005.
The users download a file containing details of parts etc make amendments and upload it again. When the file is upload(...
0
votes
1
answer
45
views
How to limit the results of a query and group them together,
I have the two tables pictured from a "city jail' DB, one is the sentences given to criminals and the other criminal information. I am trying to write a query the lists only the criminal_id, ...