Questions tagged [sql-server-2008]

SQL Server 2008 (major build version 10.00.xxxx). Please also tag with sql-server.

Filter by
Sorted by
Tagged with
1
vote
1answer
50 views

Is it better to add a data file or better to increase the existing files (MAXSIZE)

I'm quite familiar with SQL-Server as a developer but not so much in the DBA role. Currently I'm working on a rather large DB (~7TB, living in 7 files, all equal in size and all within one single ...
1
vote
0answers
72 views

Restarting SQL service doesn't fix performance, hard reboot of system does, how to troubleshoot? [closed]

I have a high-load OLTP SQL Server 2008 Enterprise. 4 NUMA, 96 cores, 430 GB RAM allocated to SQL. Most data and logs are on NAND SSD, some logs on 10K drives. It's linked to a few other systems as ...
1
vote
1answer
41 views

Update statistics

For the data retention purpose I am deleting records from some 60 tables. Some of the tables have less number of records while some have more. I don't want to update the stats for all the tables. Is ...
-1
votes
1answer
64 views

Improve performance in Deletion Operation

I Am doing Import Process of half a million records. Initially i will move the .csv file data to a sql table,then i will parse the records (Split the records to different tables and then parse) and ...
0
votes
0answers
33 views

Strange SQL 2008 R2 Sp3 Ent behavior - redistribute data across multiple files

I’ve got a 5TB database (Database_PROD) in one data file (1,5 TB of empty space in it). Installed some time ago by someone on SQL Server 2008 R2 SP3 Enterprise. Database contains 2726 tables and 5399 ...
2
votes
1answer
35 views

Error while creating Extended Events on 2008 SQL Server

I am trying to create an extended event to capture the login information of my server. While creating an extended event on SQL 2008 using the below query CREATE EVENT SESSION [SA_Monitor] ON SERVER ...
0
votes
0answers
22 views

SQL Server 2008: The target name, “package0.event_file”, is invalid, or the object could not be found

What can cause the following error? Msg 25623, Level 15, State 2, Line 1 The target name, "package0.event_file", is invalid, or the object could not be found Given the following TSQL: CREATE EVENT ...
0
votes
3answers
65 views

MS SQL 2008 R2 - How to use a production database through dev/test environments or how to copy a SQL schema and all its data to another

We currently have 3 Windows Server 2008 R2 VM identically build for Sage x3 v6.5, one for production/formation/budget database, a second one for QA (qualification) and a third one for dev & tests. ...
0
votes
0answers
29 views

Unable to create linked server from SQL Server 2008R2 to Azure SQL

I have created a couple of databases in Azure and added them to an Elastic Pool. I am able to create a linked server on SQL Server 2017. The issue I am faced with is when creating the linked server ...
1
vote
2answers
95 views

Oracle to T-SQL OPENQUERY special character conversion issues

I'm struggling to figure out where the character encoding issue on my Linked server may be coming from here. The ZPDT_PAT_ALPHA column should have a degrees symbol at the end, as shown by the DUMP. ...
0
votes
2answers
25 views

Merging or transposing data

Data structure as follows: ID Oper DateTime 3849 Login 2019-12-17 06:30:57.500 3849 Logout 2019-12-17 15:46:37.880 3849 Lunch 2019-12-17 12:16:11.373 3849 LunEnd 2019-12-17 12:46:26....
1
vote
3answers
69 views

How to Add A User To A Database In Standby / Read-Only Mode In Sql Server

I have a database which is in standby / read-only mode in my reporting server. But, I can not add a new user to this database. How can i add a new user to this database?
0
votes
3answers
184 views

How to optimize this Select MAX() SQL query?

In the following select query, it take almost 1 min to return the result, seems the table has over 2 millions record and growing. There are no index i can use from the table. How do I optimize this ...
0
votes
0answers
33 views

Unfinished A Killed/Rollback Transaction [duplicate]

I have killed a transaction 2 days ago but it hasn't finished yet. You can see the situation in the pic. What can i do?
4
votes
1answer
86 views

Insert multiple rows into a table with only an IDENTITY column [duplicate]

I have a table called dbo.Groups defined like this: CREATE TABLE dbo.Groups ( GroupID int NOT NULL IDENTITY (1,1) PRIMARY KEY ); The table really consists of just the one IDENTITY column. ...
6
votes
3answers
809 views

Keeping data in old Database (SQL 2008) identical to new Database (SQL 2016)?

I am moving database to new server. New server has SQL Server 2016 running, current server has SQL Server 2008. I need to have backup/fallback plan in place for few weeks (in case something goes ...
-1
votes
1answer
34 views

How to Find All Sql Server Users Privileges Rights

I want to list all user's privileges which is in Active Directory accout or using Sql Server account to connect to my database server. I want to see that which users have ddl right or which users can ...
0
votes
2answers
41 views

Database Log File Size Growth So Huge Unexpectedly [duplicate]

My database has two log files. Their sizes are growing very fast. My backup sizes are becoming massive. I know that when I take full backup of my database, the log files are emptied but it is not. I ...
3
votes
2answers
111 views

Restore from SQL Server 2008 to 2014

When a full-backup is restored by the DBA, does the DBA need to restore permissions, users, and roles separately? Or does it all come with the full restore? I am from the dev team. We are migrating ...
1
vote
1answer
64 views

How to Get Backups & Restores Start and Finish Times?

I backup my databases from prod environment to file server. After taking my backups, i restore them to my report server. And i want to know that if i can get information about when backup and restore ...
3
votes
1answer
32 views

Permission Denied for a User that is part of AD

I have a group created in Active Directory. This Group contains 3 users. For some strange reason one of the user within the group can't select from specific type of SCHEMA whilst the 2 other users ...
1
vote
0answers
30 views

Capture trigger update() with inserted & Deleted changes only

I have price table that has over 100 columns. I'm in the process of fine tunning triggers and reducing amounts of records inserted, to audit changes when updates are applied. The audit table ...
0
votes
0answers
25 views

How to create difference value in last group row

I want to create a query for a find difference value between Quo QTY and INV QTY and display in the last group row. For example, in this picture, I want to query a display like this. but now it ...
0
votes
1answer
66 views

Moving Partitioning Files To Another Disk Drive In SQL Server

There is a production table which was partitioned by someone in our company. Some partitioning files was wrongly located to different disk drive. I have to move those files to the disk where they ...
0
votes
1answer
65 views

Unable to trace “Arithmetic overflow error converting numeric to data type numeric” error in profiler

I have a .net application. Its trying to create tables, views and insert/update data into many tables. while application running i got an error. I tried to trace the query in SQL Profiler, but i ...
2
votes
2answers
123 views

'Row Goal' different behavior - why?

This is a heap with 400+ Million rows and 16 non clustered indexes, 146 columns. Please do not focus on why I cannot create a clustered index. That is not in my control and not in scope to my question....
4
votes
1answer
65 views

How do I solve the following error on attaching ldf-less database in SQL Server?

Before you write about the dangers of not having backups, etc., please withhold judgement... perhaps I just inherited the problem? I have an .mdf which which I am trying to attach to SQL Server 8. I'...
-1
votes
1answer
57 views

How to sync data between two databases on two different ms sql server instances - one 2008 and the other 2016

What is the easiest way to sync data between two databases on two different instances. I am not thinking replication. Just sync e.g. production database to test database from time to time.
0
votes
1answer
58 views

Migrating a maintenance plan from ms sql 2008 to 2016

I have a bunch of maintenance plans that I want to copy/migrate to sql server 2016. I am able to connect to Integration Services on sql server 2016 but I get the following error when expanding 'MSDB' ...
-3
votes
1answer
30 views

Sql query to Clear existing email addresses from table [closed]

Sql query to Clear existing email addresses from table. please I need help
0
votes
1answer
65 views

What firewall ports should be opened for central management server

Within my environment we currently have a MSSQL installation which serves as the Master in a Multiserver Agent environment (MSX). Due to this server being within a tightly controlled network the ...
3
votes
1answer
104 views

Full recovery model and tablock inserts logging

When testing some queries, I set the recovery model to full on a database and ran two identical 1M row inserts, with and without TABLOCK. On the one with TABLOCK, I got around 9295 log records on a ...
2
votes
3answers
700 views

How to restrict deletion of specific row of SQL server table

I want to restrict deletion of specific row. For example if someone wants to truncate a table or delete all the records from table then an error message should be thrown, for particular id it is not ...
1
vote
0answers
42 views

ODBC connects but authentication fails on users table

We have sql 2008 running in mixed mode. The site where sql is running the ODBC connection works and ms access authenticates against the user table. We have an IPSec vpn to a satellite office using ...
0
votes
1answer
51 views

Correct way to restore dbs to new server

We are migrating from sql server 2008 to 2017 and will do the following install sql server 2017 on the new machine make backups of all dbs on old server RESTORE DATABASE DbName FROM DISK = 'C:\temp\...
0
votes
0answers
14 views

Import mysql tables and data into Sql server2008, when mysql is on a remote server and sql server 2008 is my local server

I am trying to import mysql tables and data (on a remote server), to sql server local database. I have exported data from mysql workbench and saved them as .txt and then imported flat text files into ...
-2
votes
1answer
81 views

Send by SQL sales report for each seller [closed]

How can I send a report to each seller about their sales? I can already generate the report, but I cannot send it individually, this is an example of my data this is my script, i hope someone can ...
1
vote
1answer
26 views

Updating values based on 3 table join

I have three tables orders, customer_old and customer_new. The orders table contains the old_user_login and associated order number. The customer_old table contains the information on customer, ...
0
votes
2answers
71 views

Sync database table schema and stored procedures

We have 2 databases. One is at our server, the other is local. We need to sync them both in a manner that local database has all data and server database has no data only empty tables and stored ...
3
votes
2answers
117 views

Can subqueries produce different execution plans than CTE's?

I was talking with the bossman, and he prefers subqueries over CTE's. Personally, I loathe subqueries. He mentioned that subqueries can be faster, but I am not convinced. I ran this short test: ...
0
votes
2answers
82 views

Memory issue in Transactional Replication

I want to replicate a data of 500 GB through transactional replication once in a day, so my query is this, will it create a new file in the snapshot folder on daily basis of 200-300 GB or will update ...
0
votes
1answer
257 views

Passing Variable in json_value in sql server 2016 [duplicate]

declare @id int set @id = 1754 select (JSON_VALUE(cast(ad.data_map as varchar(max)),'$.dataMap."1754".value')) CorrespondanceNumber, (JSON_VALUE(cast(ad.data_map as varchar(max)),'$.dataMap.***"'+...
0
votes
0answers
34 views

Insert Into Table From SQL Server To MySQL

I am on server1 which has a linked server to server2 and server3. This must be done on server1, but I can not get the syntax accurate. What I want to do is query server2 using OPENQUERY, and ...
0
votes
2answers
47 views

How To Grant A User Just To Create A Table In Existing Database But Not To See Other Existing Tables In It

We have dealed with an outsource company to install an application for use of our accounting department. Now, they want to access our existing database to install their application but i don't want ...
15
votes
5answers
6k views

How to add 1 milliseconds to a datetime string?

Based on a select, I can return x rows like this: 1 2019-07-23 10:14:04.000 1 2019-07-23 10:14:11.000 2 2019-07-23 10:45:32.000 1 2019-07-23 10:45:33.000 We have all milliseconds with 0. Is ...
-3
votes
1answer
666 views

The login is from an untrusted domain and cannot be used with Windows authentication

I am facing this issue after trying to run a Windows application on sharing client side in a workgroup environment, while this application working on server machine fine.
0
votes
1answer
210 views

Mssql query problem. Column '' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause

There is a problem I have experienced in mssql. ( but I don't have this problem in mysql. ) They know two different engines. but I could not find a solution. Do you think I can fix this error? My ...
3
votes
1answer
96 views

SQL Server 2008 R2 Edition Upgrade Process

I have several SQL Server 2008 R2 Standard Edition instances that we need to upgrade to SQL Server 2008 R2 Enterprise Edition. If I have valid SQL Server 2017 Enterprise Edition (with SA) PIDs, do I ...
0
votes
1answer
33 views

Get last Reoganized OR Rebuild index date

I am currently working on migrating sqlserver 2008r2 to SQL server 2016.The DBA before me used "IndexOptimize" from https://ola.hallengren.com/downloads.html to create the iIndex solution. I can see ...
2
votes
1answer
66 views

SQL Server takes an hour to fail over to secondary node

I am at a new job, we have a 2008 R2 (SP1) WSFC which hosts SQL Server 2008 FCI. Each node has it's own storage, nodes are 32 core with 32 GB memory (don't ask me why it is configured this way). ...

1 2 3 4 5 77