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
0
votes
0answers
20 views

SSIS package run error indicates wrong credentials after VM migration

First, I am not a SQL DB admin. I inherited this system and working to migrate away from it...that said: I have an old MSServer2000 SQL DB we migrated to VM. That server offloads data to another SQL ...
3
votes
2answers
66 views

Max Server Memory configured but it increases more of its configuration

Following a previous post I've written, I've configured my server with the following parameters: I put 22497 as MAx Server Memory, disable AWE, since it runs in 64 bit environment and it's a ...
0
votes
2answers
29 views

SQL Server Setup failure - Cached MSI files are missing

Trying to apply SQL Server 2008 SP4 to an old instance I now have to look after, but the installer is failing with TITLE: SQL Server Setup failure. SQL Server Setup has encountered the following error:...
-1
votes
1answer
28 views

Migration from SQL SERVER 2008 R2 to 2019 with Log Shipping [closed]

Is possible to run swing migration from SQL SERVER 2008 R2 to 2019 with Log Shipping?
9
votes
2answers
556 views

SQL Server Instance How to recover memory used [duplicate]

I know that may be this question has been answered a lot of times, but I need a better way to solve it or to demonstrate to my boss that this is a normal behaviour or there is something that I'm ...
1
vote
0answers
51 views

Stored procedure to delete the 4 large table records in small chunks

As I am new to procedures, I request your help on below pls. There is a requirement to delete the records from a large table in small chunks like 10 Million records at a time. For example, if you have ...
0
votes
0answers
12 views

Enable query logging for single user on SQL server 2008 and SQL server 2016

I need to monitor queries executed by a specific set of users on a database. I need to check them on a weekly base. Is that possible on SQL server 2008r2? And 2016?
1
vote
6answers
270 views

MS-SQL-Server 2019 is slower than SQL-Server 2008

Since we updated from SQL Server 2008 to 2019, the queries have become much slower. The following query ran for ten minutes on version 2008. On version 2019 it runs for over 30 minutes. Until ...
0
votes
1answer
33 views

SSIS 2008: Illegal characters in path when trying to rename a file

I have a task that should rename a file I have a variable called RenameFileName \\servername\csv\BACKUP\" + (DT_WSTR,4)DATEPART("yyyy",GetDate()) + RIGHT("0" + (DT_WSTR,2)...
-3
votes
1answer
37 views

Change Consecutive Row Value [closed]

I am trying to change value of Consecutive AA to first AA as AA1 and second one as AA2, if only one AA then it should be as AA1, its possible to change all AA to AA1 and then search for 2nd ...
0
votes
2answers
21 views

Extract insertions that failed because of size limit from SQL Server Express Transaction Log

I have a SQL Server Express database with Full Recovery Model. Several months ago, the database hit it's size limit (10GB) and some data did not successfully get added to the database. Several weeks ...
0
votes
1answer
41 views

DB autogrowth issue

I have a database that will growth in 1 month time the autogrowth was set to 500MB but as I monitored it, the consumption is 1GB+ per day. Should I wait for it to auto grow or is it better to set the ...
0
votes
1answer
31 views

Minimal logging for bulk inserts?

I have many scripts running that truncate entire tables and rewrite data daily, however this fills my transaction logs very quickly. All these scripts use INSERT INTO .. SELECT. So recently I've ...
0
votes
1answer
44 views

The transaction log for the database fills up overnight everyday

Lately my server is overloaded because of daily running SQL jobs, my transaction log grows very large throughout the night and I run out of disc space. The short term solution was to shrink the log ...
1
vote
1answer
46 views

Store Decimal values without Trailing Zeros

I am using SQL Server 2008 R2 version. Is there any method to store decimal value in SQL without extra trailing zeros(like Float data type format). I have created a column with decimal data type with ...
0
votes
1answer
49 views

SQL 2008 permissions - cumulative or not?

I have a SQL 2008 production database which gets replicated using log shipping to a second, completely different SQL 2008 server. There is also another copy which is restored at irregular intervals to ...
0
votes
3answers
98 views

How to remove sysadmin from sa login in sql server

I have a requirement wherein I need to remove sysadmin server role from sa login. I created 1 more user and gave the sysadmin role to the user. When I uncheck sysadmin from sa login it throws an error....
0
votes
1answer
43 views

Log File Size and dbcc sqlperf (logspace)

Consider the following log file setting for a database named XYZ: Initial size = 250MB, Autogrowth by 500MB, Limited to 1GB I have created a SQL Job to monitor the size of XYZ database ldf using the ...
0
votes
1answer
14 views

Extracting string after and before a character '-' or '<' using Sql Query

I have table with one column 'UDF_WorkLocation_6' which contain string.Please Review following table. UDF_WorkLocation_6 MUMBAI - Maharastra<6> AHMEDABAD - Gujarat<1> MUMBAI - Maharastra&...
0
votes
1answer
34 views

Delete records from table A where col 1 and col2 are in table B

I am wanting to delete records from a table if multiple columns in this table are in another table. Currently, I usually just concatenate the columns and use the WHERE IN method: DELETE FROM TableA ...
2
votes
1answer
99 views

Does SQL Server Support Parallel Bulk Inserts From Multiple Connections?

Does SQL Server support parallel bulk inserts into the same database table? Some clarifications for my particular use case: The table has a clustered index composed of two distinct index keys, and ...
0
votes
2answers
68 views

T-SQL query must include and exclude child rows

I have simple parent -> child (one to many) relationship. Need to return children that have all given attributes, in this case red hair and brown eyes. Table: CREATE TABLE [dbo].[children]( [...
0
votes
1answer
26 views

Where to find the whole log of a maintenance plan package job that failed with error?

I have a maintenance plan that runs on SQL Server agent as a the job and finishes with error. However the error is not visible in job history in SSMS, the text of Message is seemingly truncated. How ...
-3
votes
1answer
244 views

RESTORE HEADERONLY is terminating abnormally [closed]

I am unable to restore my database. I am getting this error message: RESTORE HEADERONLY is terminating abnormally(Microsoft SQL Server, Error: 3242 Please help with a solution. Version is 2008. Am ...
0
votes
1answer
29 views

Table size increasing drastically in sql server

When I ran: SP_Spaceused TEST. I got this output which is very strange for 20918 rows. Output: name rows reserved data index_size unused TEST 20918 6240816 KB 6235480 KB 2304 ...
3
votes
1answer
82 views

How can I go about building a relationship with variable but ordered number of columns in a table?

First, I'm not a DBA or even much of an SQL person, so I apologize if this is too much of an entry-level question! I have been tasked with redoing an old csv file and turning it into a relational ...
0
votes
1answer
65 views

Restore Database without taking RDP [closed]

I have a DB server 192.168.X.X, Now due to some Issue with the domain user we are unable to get the RDP of that server. but we can get the DB connected from other server which is there on the network. ...
-1
votes
1answer
67 views

MYSQL Error: Incorrect usage of UNION and ORDER BY?

Am trying to randomize my first query but ran into an error "Incorrect usage of UNION and ORDER BY" Kindly find below my queries: SELECT * FROM( SELECT deal_page.id, ...
0
votes
1answer
34 views

SQL Merge Replication Issue - problem where backup and maintenance job which is running till morning and most of the server jobs are stuck

We have a merge replication environment which includes Publisher: Server1 where only one database of 125 GB in replication and also Distributor is also configured on same server hosted in a HyperV ...
0
votes
0answers
18 views

Is the Change Data Capture __$update_mask value still valid after removing and adding columns to table?

Let's say I have table I enabled cdc for. Now, if I want to add some columns to the table and also remove some columns and preserve the CDC data for the old columns, is it going to mess up the update ...
0
votes
3answers
606 views

How to remove database from explorer after deleting .MDF and .ldf files

I wanted to know if I can delete or remove the database shown in the object explorer after someone has manually deleted the MDF and ldf files from the database folders.
1
vote
2answers
105 views

How to remove dbcreator server role?

I was able to add the dbcreator server role to a user of a SQL Server DB, thanks to this nice question/answer: create-database-permission How can I REMOVE that permission? Is there a stored procedure ...
-2
votes
3answers
572 views

sql query for select first word of data from column

I have a table with this data: shyam banarjee rahul khanna priya kumari rohit srivastava I just want first names, like this: shyam rahul priya rohit
-2
votes
1answer
56 views

Shrink of a big databases ? SQL Server [duplicate]

In this moment I have a very big database (almost 4 TB) and wanna shrink data files for a future migration Unused space : almost 3000 GB I have in mind shrink data files day per day with low amount of ...
0
votes
3answers
600 views

I want SQL query for select multiple columns into one

I have one single table and in that table there are three columns company1, company2, company3. Below is my table data : Company1 Company2 Company3 ABC Test1 Test3 Test5 Test2 ...
1
vote
0answers
54 views

Missing tables in AdevntureWorksDB

Recently I found some old questions that involve querying data from AdevntureWorksDB across several operations(DML,DDL). One such question was : Create and execute a query that computes the total ...
0
votes
1answer
31 views

SQL Server 2008 - Replacing csv substrings in view-row using data from other table

Using SQL server 2008, is there a way to perform SELECT query in a view replaces a row containing comma-separated values with their corresponding text value from another table? STRING_SPLIT and ...
0
votes
1answer
92 views

SQL server row count

I had an activity for restoring a full database in SQL server 2008. I had to restore the database will norecovery since I had to restore the differential backups as well which will be shared everyday. ...
-1
votes
3answers
71 views

how to count second col if first col value is null and avoid duplicate count

I'm making sales statistic report to calculate scanned documents station wise using below Query: SELECT RIGHT(CONVERT(varchar(11),DATEADD(MONTH,DATEDIFF(MONTH,0,InvoiceDate),0),13),LEN (CONVERT(...
0
votes
1answer
28 views

Max Price Using Multiple Tables and Columns

The below code is working for me to pull out the max Avg Price, but I need to add another couple of fields from the dbo.TreatmentEvent table, when I add another column it stops giving me the max and ...
0
votes
0answers
23 views

MSSQL Mirai Botnet, cleaned but connects again using ANOYNMOUS LOGON

well this problem is making me go nuts my server was hacked with the Mirai Botnet, we cleaned the system, Disabled the Server Agent completely and the system is stable and clean BUT... if i re-open ...
0
votes
1answer
228 views

SQL EXECUTE TASK IN SSIS WITH ORACLE CONNECTION

following my previous question: Oracle source with SSIS 2008 on how to connect to an Oracle instance, which ended up working for me. However, I am currently stuck trying to run a merge statement on ...
0
votes
1answer
40 views

odd OS memory consumption by two nearly-identical SQL 2008 R2 instances

Instances are legacy, something we have to carry for the next 3 years, 2008 R2 64-bit, both SQL Server and Windows Server OS. Two copies on two nodes. Both servers are set to consume "Maximum server ...
0
votes
1answer
120 views

Add Leading Zeros in CASE, CHARINDEX and SUBSTRING Query

I am splitting a column based on the colon using this code which works. ,CASE WHEN CHARINDEX (':', ref) > 0 THEN SUBSTRING(ref, 1, CHARINDEX(':', ref) -1) ELSE NULL END AS EndVal The '...
0
votes
0answers
61 views

Sql server bulk loading optimization

We've got a process that's importing a 7gig / 334 million row data file. The data file is sorted on the first column The process is built on the "import first, index later" methodology. It uses BCP. ...
1
vote
1answer
38 views

Fetch data if exist in distinct of another column

I am trying to generate the query to fetch the data on the basis of company which have tax paid record in each year of : Select * From ( Select CompanyName , TaxPaidOn , ...
0
votes
2answers
27 views

I have to create tables where both have each as the foreign key . Which one should be created first

DDL QUERY FOR CREATING MAINTENANCE_PROBLEM CREATE TABLE MAINTENANCE_PROBLEM ( MP_ID int primary key, MP_Description varchar2(250), Standard_Min_Labor_Cost number(4,2), Standard_Min_Labor_Hours int,...
1
vote
2answers
55 views

SQL Server 2008 - Two FULL backups in one day

There is a database backed up by NetBackup once a day (Full backup 6PM to tape + 3/4x log backup per day). Database is in FULL recovery mode. Vendor of application has remote access and he scheduled ...
1
vote
1answer
53 views

Truncation error creating clustered index on schema-bound view

I was just creating a schema-bound view that I wanted to put an index on (to try out some computed column variations). I created the view WITH SCHEMABINDING, then I had to create a clustered index ...
-2
votes
2answers
49 views

query tuning help [closed]

All, Would need some tips / tricks to tune this query please: WITH Candidates(ActivityId) AS( SELECT ActivityId FROM EmailHashBase WITH (NOLOCK) WHERE ActivityId IN ( ...

1
2 3 4 5
78