Questions tagged [sql-server-2008]
SQL Server 2008 (major build version 10.00.xxxx). Please also tag with sql-server.
3,891
questions
0
votes
0
answers
24
views
two servers have linked to the same server - one connection is encrypted and second not - why?
I have some old SQL Server 2008r2 instances that do not have client certificate set up and force encryption is set to FALSE.
It is on Windows 2008 r2 and really hard to upgrade - for now it must stay ...
0
votes
1
answer
35
views
Database Dependency Chart?
I have several SQL Server (2008 forward) and Oracle (12c forward) legacy databases running on a server... I know for a fact that various stored procedures point to other databases, like select * from ...
0
votes
1
answer
45
views
Insert rows in 3 tables in a single query, SQL SERVER 2008
I need to insert data into 3 tables in a single query
Table SkillData
UserIndex
SkillPoint
TotalSkill
1
5202
99
Table Emblems
UserIndex
CountEmblem
Status
1
1265
1
Table Rewards
UserIndex
Level
...
0
votes
0
answers
22
views
DBCC error with sys.syscolpars DB upgrade failing
Consistency error in DB.
1 page from sys.syscolpars table is missing.
There is no any impact but the thing is can't able to upgrade the DB from 2008 to higher version. Backup restore fails. Old good ...
2
votes
2
answers
114
views
Using TRY_PARSE in SQL Server 2008
I have a script in SQL Server 2012 like this:
Declare @ParamSPKDateFrom varchar(50), @SPKDateFrom date,
Select @SPKDateFrom = TRY_PARSE(@ParamSPKDateFrom AS date USING 'id-ID')
Can I convert this ...
3
votes
1
answer
182
views
SQL equivalent to return value from WHERE EXISTS when unable to JOIN
Trying to figure out how to write the following pseudo-code in valid SQL (MS SQL Server):
SELECT
T1.Item,
T1.Set,
Has.SN
FROM T1
WHERE EXISTS
(SELECT SN FROM T2 WHERE Condition = 'X') AS Has
...
0
votes
0
answers
84
views
Trying to increase disk with GPT for SQL Server data, do we need to configure anything to SQL Server Application
I am not a DBA, but SQL Developer.
Our company has a Azure VM that has a very active SQL Server 2008.
Currently, a disk drive (H:\ drive) that holds SQL data is getting full (up to 2 TB, possibly due ...
0
votes
0
answers
40
views
How do I edit DataRows of DBF file via SQL Server Management with Query?
I have an old DBF file that I want to manipulate its data directly through SQL Server Management itself, for example, perform update, insert, delete operations.
I tried using the following code from ...
-1
votes
1
answer
497
views
conversion failed when converting date and/or time from character string only on one of the server
I have a sql query as follows:
select * from Txn_Master
where Txn_Type = 'TPD' and
Txn_Date = Getdate()
order by Txn_ID DESC
But in this sql-server query when i enter date manually like '01/06/2023'...
0
votes
2
answers
268
views
SQL Server 2000 to 2008 security logins transfer
I'm currently upgrading SQL Server from 2000 to 2008, the database was successfully transferred, the issue remains with the security logins, I have found the stored procedures that extracts the logins ...
-1
votes
3
answers
245
views
How to increment value in Master table column with number of records in Details table in performant and accurate way?
I am using SQL Server 2008 and above.
I have following two tables:
MasterTable
MId
DetailsCount DEFAULT 0
DetailsTable
DId
MId
In MasterTable.DetailsCount, I store number of records in DetailsTable ...
-1
votes
1
answer
72
views
Is there any way to find out if SQL Server is using all of CPU cores?
I'm using SQL Server Web Edition.
I have SQL Server licensed to 16 cores only. I have 48 cores of CPU. Is there any way to know that SQL is reaching or utilizing its peak 16 cores limit all time?
I am ...
0
votes
2
answers
143
views
Is there any way to find out if SQL Server is using all of CPU cores? [duplicate]
I have SQL server licensed to 16 cores only i have 48 core CPU.
Is there any way to know that SQL is reaching or utilizing its peak 16 cores limit all time? any way to find it out? as i am having ...
1
vote
1
answer
110
views
SQL Server: DBCC UPDATEUSAGE does not return
I am an experienced programmer (not a DBA) and would appreciate troubleshooting guidance if no immediate answer is possible.
The database itself is relatively small - a couple of million rows spread ...
0
votes
0
answers
48
views
How is there an apparent duplicate Primary Key in an identity PK column?
This is a labtrac database (dental software), hosted on-prem. The Order_Stage_Procedures table has a duplicate primary key, but there are some nuances. How is this possible, and what am I missing?
I ...
0
votes
1
answer
36
views
How to encrypt database in SQL Server 2008 Express edition
There are times when I need to move a SQL Server 2008 Express database (I'm aware it is EOL) from one machine to another. In order to do that I need to implement a mechanism using C# to encrypt the ...
2
votes
0
answers
370
views
How do I fix the Failed to retrieve data for attaching mdf file is which not primary database file
I'm using SQL Server 2019 in Windows 10 Enterprise and Administrator user
I have an MDF file and I want to attach it, and it has full access in the form of Everyone Full Control , when I try to attach ...
0
votes
0
answers
47
views
MSSQL Server Database Trigger Permissions - issue after migrating from 2008 to 2017 Server
I have some triggers set up on a database (Dynamics NAV) across various tables for Insert, Update, Delete. The triggers write to a separate database to log the DB, Table, RowId and date/time. The ...
1
vote
1
answer
247
views
Always on high availability groups option is grayed out
I'm trying to enable the Always on HA groups using SQL 2016 STD, but the option is grayed out as shown below
any hints on how to enable it would be appreciated.
Regards,
Hussein
2
votes
0
answers
42
views
Query to Extract all Values below Certain Amount ignores 0-values [closed]
Trying to write a query in SqlServer Dev 2017 with SSMS with Object Explorer.
I'm trying to extract all members ( PK) with totals ( Sum(ColumnValues)), below a certain amount.
My code extracts all ...
0
votes
0
answers
378
views
What can cause cyclical CPU spikes on a SQL Server precisely every 5min
Setup
Microsoft SQL Server 2008 on Windows Server 2008 (Yes I know I need to upgrade).
The server is accessed by a single Linux/Apache web server.
Problem
Starting about a week ago and slowly getting ...
0
votes
1
answer
587
views
Cannot Insert it into in my table for Special characters when ANSI_WARNINGS is Off even with nvarchar
I want to insert a data row into my table as name: DSKWOR00 , but I get this error :
String or binary data would be truncated.
so I turned ANSI_WARNINGS OFF and it inserted the row but the result ...
2
votes
1
answer
639
views
Why SERIALIZABLE level does not lock the table for other session in SQL Server
I want to Prevent concurrency in my table for Delete, Insert, Update, and Select
so I tried to use SERIALIZABLE for the table before transation, but that didn't lock the table for other processes! how ...
0
votes
1
answer
259
views
Anything but small ODBC queries failing over long distance VPN after SQL Server Swap
I recently swapped database servers (restored databases from old to new and then swapped IPs)...
Old: Sql Server 2005, Windows Server 2003
New: Sql Server 2008, Windows Server 2012
All processes ...
1
vote
2
answers
1k
views
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGIN'
I'm facing a very specific issue on my SQL Server instance. Recently, I had to create a Linked Server (referencing server B) in my server A, to connect to a database in B through A. Everything worked ...
0
votes
0
answers
43
views
Remove requirement to specify [default] MS SQL port in vb and vbscript connection strings
I need to 'swap' an old database server (Windows Server 2008, SQL Server 2005) with a newer/better one (Windows Server 2012, SQL Server 2008) I tested this swap yesterday and everything worked on the ...
0
votes
1
answer
155
views
schema ownership/permissions in MS-SQL vs Oracle
Hopefully I'm using the write terms here. I'm pretty good with concepts usually but don't always know the technical terms to describe it correctly. Here goes...
I'm used to working in MS SQL Server ...
0
votes
0
answers
138
views
Unable to attach other 2nd MDF file Error It is not a primary Database
The windows got crashed and we copied the file from hdd to other machine..... Let me explain you ..
We have this db since many years one day the c:drive got full so the dba make changes and create new ...
0
votes
1
answer
267
views
Most recent version of SQL Server Management Studio that works with Windows 7 pre SP1?
I am trying to do some work with SQL Server 2008 (not 2008 r2, just 2008) that is installed on a Windows 7 Pro 32-bit PC. It's just Windows 7 with no Service Pack 1 applied. I have no option to update ...
-5
votes
2
answers
7k
views
Select rows with a duplicate ID but different value in another column
I have a table like this
I would like to select the Itemid that occurs more than once with a different Rate with group by Masterid
The output should be something like:
0
votes
2
answers
1k
views
Is there any way to get current transaction id in SQL SERVER 2008?
I want to get current transaction id to log something in another process. The code is actually run in .net, but in SQL Server it will be similar to the following pseudo code:
BEGIN TRAN
<GET ...
1
vote
0
answers
162
views
Create Calendar with Pivot or function in SQL SERVER
Is it possible to get a calendar with this structure from my AUT_CALENDAR table?
I am applying PIVOT to obtain a calendar with the following query.
DEMO
SELECT IDCALENDARIO,NombreDia, [Lunes], [...
1
vote
0
answers
176
views
Migrate MSSQL 2008 database to MySQL 5.7 or 8.0
I am trying to migrate an old database runing in SQL Server 2008, to MySql 5.7 or 8.0
using MySql Workbench (Migration wizard).
It gave me this errors
Traceback (most recent call last): File "...
0
votes
2
answers
538
views
How To trim last two digit of the varchar in SQL SSMS? [closed]
I have a column [CALMONTH] which is a varchar in SQL Table. Data is like "202003" where 2020 is the year and 03 is the respective month. I need to trim the month'03' alone to use it in the ...
0
votes
0
answers
148
views
Microsoft SQL Server - Recovery MASTER Database
I have backuped "master" database from 1 server and need to recovery it to another server. In "master" database or in another database - not matter. Just i need access data.
When i ...
0
votes
1
answer
135
views
SQL Server Access Database in Filesystem
We have a Windows Server 2008 which is offline. We no longer have access to the server OS, or any GUI tools, but we do have a backup of the entire C:/ of this server.
This server used to host an SQL ...
-2
votes
1
answer
90
views
Sql 2008 export table csv with headers and data
I need to export a table in SQL Server 2008 with headers and data delimited with | ( pipes ), but some information inside of this table have , ( comma ) and CR or LR, it's possible to put it a "&...
1
vote
2
answers
190
views
Replicate one database in one server to 2 other servers SQL2008
In product
ion, we have a transactional replication between 2 servers with data from one database going from server A to Server B. We now want to add another server C for the short period of time ...
4
votes
1
answer
298
views
Changing SET options within cursor - Different behavior based on compatibility level
I have found a difference in behavior on a piece of code between database compatibility levels and wondered what the cause of this is. Below is a simple example that iterates through a tally table and ...
0
votes
1
answer
74
views
I want to pull a report from multiple sql servers, where the Database owner and job owner is not SA
I want to pull a report from multiple sql servers,
where the Database owner and job owner is not SA.
I need a report from a Central monitoring server, if the database owner and job owner is not SA, I ...
0
votes
0
answers
18
views
3 select and collate the result of the query or organize (order by) by fields of the tables
I have 3 tables and each one with different structure and number of different columns, but the first 4 columns are the same in all tables. For instance
Table 1
Type
id1
id2
Period
FirstName
LastName
...
0
votes
2
answers
396
views
Finding groups which have two values in another column
Given the following sample rows:
MTYPE RNO VAL
S 1 V1
S 1 V2
S 1 V3
R 1 V4
S 2 V5
S 2 V6
R 3 V7
R 3 V8
How can I list groups of RNO which has both 'R' ...
-1
votes
1
answer
201
views
Need best practices to maintain TempDB which is growing to 100GB now, is moving Tempdb to 35GB drive have any limitations? [closed]
Can moving TempDB to smaller drive cause failures?
How can TempDB be configure to use 35GB drive without any issues?
Please suggest if something needs to be taken care for this smooth transition of ...
0
votes
1
answer
274
views
How to delete duplicate from 140 GB SQL server table where 30% records are duplicate without causing overheads like transaction logs full? [closed]
How to delete duplicate from 140 GB SQL server table where 30% records are duplicate without causing overheads like transaction logs full?
table doesn't have primary key.
1
vote
1
answer
58
views
Separate Specific Indexes VS Single Inclusive Index
I have four tables, all of which have around the same large number of rows (except Customer):
Shipping (PackNumber, PackLine, OrderNumber, OrderLine, CustomerID)
Orders (OrderNumber, OrderLine)
...
0
votes
1
answer
24
views
Migration db (error when alter DB)
i am new as DBA. i want to migrate db, can i do one time alter for all data ?. or must one alter to one data ?
this my query.
DECLARE @name VARCHAR(50)
DECLARE db_cursor CURSOR FOR
SELECT name
FROM ...
-1
votes
1
answer
41
views
restore a corrupted page
I have Damaged a page in my database and now I want to restore it
let me get this straight
1- I created a full backup
2- then insert info in some tables
3- creat a deferential backup
4- specific a ...
-2
votes
2
answers
791
views
How to join two tables and rename the new table? [closed]
I want to join two tables in sql and want to connect it with my .net project where I used web forms. help is needed. thank you
3
votes
3
answers
3k
views
Copy tables to another SQL Server keeping the identity property
Objective
I want to make a exact copy of 10 tables from a database on a SQL Server into my local SQL Server. The local copy is used for testing.
Problem
The copied tables all have the identity ...
-2
votes
2
answers
33
views
Codeignier---sql database [duplicate]
[Microsoft][SQL Server Native Client 11.0][SQL Server]Column 'TantraBackup00.GuildName' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause....