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

Is it possible to capture the connection string used to connect to SQL Server

I have recently taken over a number of SQL Server 2008 databases that are configured with mirroring. I understand there are some applications that connect using the "Failover Partner" option ...
user avatar
-1 votes
0 answers
24 views

Columnstore or page compression

We've got a lot of code and data in Sql Server 2008 dbs and a lot of our design choices have been frozen at 2008 available functionality. We've recently gotten a tentative green light to upgrade to ...
user avatar
-2 votes
1 answer
25 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:
user avatar
  • 1
0 votes
2 answers
51 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 ...
user avatar
  • 1
1 vote
0 answers
33 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], [...
user avatar
  • 119
1 vote
0 answers
49 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 "...
user avatar
0 votes
0 answers
44 views

Can't connect to SQL Server using its actual server name

I have a SQL Server instance, its actual server name (@@servername) is actual_name, and its alias is alias. When using SSMS to connect, I can only connect using alias, but not using actual_name. ...
user avatar
  • 23
0 votes
2 answers
74 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 ...
user avatar
0 votes
0 answers
52 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 ...
user avatar
0 votes
1 answer
47 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 ...
user avatar
-3 votes
1 answer
37 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 "&...
user avatar
  • 1
1 vote
2 answers
43 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 ...
user avatar
4 votes
1 answer
183 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 ...
user avatar
  • 1,450
0 votes
1 answer
41 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 ...
user avatar
0 votes
0 answers
8 views

Collection Targets on the basis of Previous Months Sales Figure

I have having following Yearwise and Monthwise Sales Figures. +-------+-------+------+---------+ | S. No | Month | FY | SaleAmt | +-------+-------+------+---------+ | 1 | Jan | 2020 | 500 |...
user avatar
0 votes
0 answers
14 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 ...
user avatar
0 votes
0 answers
28 views

script only works with execute as SA

I created a simple script to send us disk alerts when a disk is almost full ( i know there are better ways to do this, this is just a simple question ) EXECUTE AS login = 'SA' CREATE TABLE ##...
user avatar
  • 7,100
0 votes
2 answers
57 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' ...
user avatar
-1 votes
1 answer
60 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 ...
user avatar
0 votes
1 answer
122 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.
user avatar
1 vote
1 answer
48 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) ...
user avatar
0 votes
1 answer
23 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 ...
user avatar
-1 votes
1 answer
39 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 ...
user avatar
-2 votes
2 answers
389 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
user avatar
3 votes
3 answers
688 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 ...
user avatar
  • 133
-2 votes
2 answers
32 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....
user avatar
0 votes
1 answer
111 views

Breaking down SSIS keystring values for connection manager between Server2000 and Server20008

I have an SSIS package between a SQL2000 and SQL20008 server that cannot connect since migrating to VM. The SSIS package runs a data transfer between the two servers using 3 Connection manager strings....
user avatar
  • 75
0 votes
0 answers
30 views

Changing SQL Server2000 settings after converting to VM?

We have migrated a SQL 2000 server to VM and I am wondering what changes will need to be made on the VM? After the VM migration an SSIS package that transferred data from the 2000Server to a ...
user avatar
  • 75
0 votes
1 answer
27 views

issues with subquery sql

Hi im getting this error: Only one expression can be specified in the select list when the subquery is not introduced with EXISTS. this is my current SQL query: DECLARE @UgpEntry VARCHAR(50) SELECT @...
user avatar
0 votes
1 answer
58 views

Can SSIS packages call other SSIS packages in the connection string?

I am running an SSIS package that transfers data from one (SQL2008) server to another (SQL2000). However after P2V conversion the SQL2008 server cannot execute an SSIS package due to a user ...
user avatar
  • 75
1 vote
1 answer
169 views

Able to connect with connection manager but SSIS package does not authenticate

I have an SSIS package that connects MSSQL2008 server to MSSQL2000 and pulls data off the 2000 server and transfers it to the 2008 server. The 2000 server was recently virtualized and since then the ...
user avatar
  • 75
3 votes
2 answers
104 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 ...
user avatar
  • 123
0 votes
2 answers
1k 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:...
user avatar
-1 votes
1 answer
2k 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?
user avatar
9 votes
2 answers
727 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 ...
user avatar
  • 123
1 vote
0 answers
65 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 ...
user avatar
  • 11
2 votes
6 answers
3k 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 ...
user avatar
  • 59
0 votes
1 answer
231 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)...
user avatar
  • 194
-3 votes
1 answer
81 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 ...
user avatar
0 votes
2 answers
28 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 ...
user avatar
0 votes
1 answer
60 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 ...
user avatar
0 votes
1 answer
210 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 ...
user avatar
0 votes
1 answer
91 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 ...
user avatar
1 vote
1 answer
261 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 ...
user avatar
0 votes
1 answer
59 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 ...
user avatar
0 votes
3 answers
428 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....
user avatar
  • 217
1 vote
1 answer
259 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 ...
user avatar
  • 13
0 votes
1 answer
1k 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&...
user avatar
  • 1
0 votes
1 answer
247 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 ...
user avatar
2 votes
1 answer
710 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 ...
user avatar
  • 21

1
2 3 4 5
78