MS HotFixes/patches Possibly Stunting DB Activity For Certain Amounts Of Data?

Jun 14, 2004

I’m wondering if anyone can shed light on a problem I’ve noticed that's really made for a major thorn in my side. I recently had a Microsoft patch installed on my server, and now for some reason, trying to run INSERT or UPDATE queries against the SQL 2000 database are severely limited. I constantly get the error:





“Error: A severe error occurred on the current command. The results, if any, should be discarded.�





My Event Logs also return the following:





"Invalid buffer received from client."





I think I’ve isolated the problem to be that I can’t add new or modify existing records that try using a field which is of type TEXT, but now can’t be longer than 4,000 characters, else the error fires. This is really weird, as I’ve used the same ASP.NET script to call a stored procedure to INSERT/UPDATE records thousands of times before with 100% success.





I have a feeling this might have something to do with the patch, but has anyone come across this problem specifically, or know for sure which patch(es) cause it? Why all of a sudden would a TEXT field be so limited in capacity?

View 2 Replies


ADVERTISEMENT

Storing Large Amounts Of Data

Mar 31, 2008

Hi,

I was wondering if any one could help me, I need to store large amounts of data in my database, at present I have it set to nvchar (8000), I've looked around and noticed you can use text which stores up to 2 million, but is slow in displaying the information.

Any ideas or points in the right directions would be great.

Thanks

View 6 Replies View Related

Inserting Large Amounts Of Data

Sep 8, 2005

Does anyone have ideas on the best way to move large amounts of databetween tables? I am doing several simple insert/select statementsfrom a staging table to several holding tables, but because of thevolume it is taking an extraordinary amount of time. I consideredusing cursors but have read that may not be the best thing for thissituation. Any thoughts?--Posted using the http://www.dbforumz.com interface, at author's requestArticles individually checked for conformance to usenet standardsTopic URL: http://www.dbforumz.com/General-Dis...pict254055.htmlVisit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz.com/eform.php?p=877392

View 4 Replies View Related

Dealing With Large Amounts Of Data

Jul 20, 2005

We are looking to store a large amount of user data that will bechanged and accessed daily by a large number of people. We expectaround 6-8 million subscribers to our service with each record beingapproximately 2000-2500 bytes. The system needs to be running 24/7and therefore cannot be shut down. What is the best way to implementthis? We were thinking of setting up a cluster of servers to hold theinformation and another cluster to backup the information. Is thispractical?Also, what software is available out there that can distribute querycalls across different servers and to manage large amounts of queryrequests?Thank you in advance.Ben

View 10 Replies View Related

Problem With Large Data Amounts

Jun 24, 2005

I have a dataset with 300,000 records and I'm getting the following error with MS Reporting Services.  "An error has occurred during report processing.  Exception of type System.OutOfMemoryException was thrown.  any help with this would be highly appreciated.

View 11 Replies View Related

Graphing Large Amounts Of Data

May 8, 2007

Greetings



I need to be able to graph roughly about 150 employees/ supervisor and their monthly cell phone usage in minutes. I understand that I will need to group this on say one graph for every ten employees so it doesn't look messy and cluttered. I have read some threads here but they dont seem to work for me.



So again each supervisor has 100+ subordinates and I need to graph theie phone usage by month



thoughts???

km

View 2 Replies View Related

Sqlserver 2000- Large Amounts Of Data 1.2 TB

Apr 20, 2001

p.s. my email was incorrect in the last mail.
Hi all,
is there a sql 2k thread. Am interseted in finding out what the largest database size of a sqlserver database people have worked with.
We have a 1.2 Terabyte db with about 150-200 million new rows being processed everyday. Would like to share some thoughts on this with other people who are working with this much data and what they are doing with it.

bhala
----------------------------------------
Please check us out at: http://www.bivision.org/bivision

View 2 Replies View Related

Migrating Large Amounts Of Data From SQL Server 7.0 To 2000

Jul 20, 2005

I'm in the process of migrating a lot of data (millions of rows, 4GB+of data) from an older SQL Server 7.0 database to a new SQL Server2000 machine.Time is not of the essence; my main concern during the migration isthat when I copy in the new data, the new database isn't paralyzed bythe amount of bulk copying being one. For this reason, I'm splittingthe data into one-month chunks (the data's all timestamped and goesback about 3 years), exporting as CSV, compressing the files, and thenimporting them on the target server. The reason I'm using CSV isbecause we may want to also copy this data to other non-SQL Serversystems later, and CSV is pretty universal. I'm also copying in thisformat because the target server is remotely hosted and is notaccessible by any method except FTP and Remote Desktop -- nodatabase-to-database copying allowed for security reasons.My questions:1) Given all of this, what would be the least intrusive way to copyover all this data? The target server has to remain running and berelatively uninterrupted. One of the issues that goes hand-in-handwith this is indexes: should I copy over all the data first and thencreate indexes, or allow SQL Server to rebuild indexes as I go?2) Another option is to make a SQL Server backup of the database fromthe old server, upload it, mount it, and then copy over the data. I'mworried that this would slow operations down to a crawl, though, whichis why I'm taking the piecemeal approach.Comments, suggestions, raw fish?

View 2 Replies View Related

Best Way To Insert Large Amounts Of Data From A Webform To SQL Server 2005

Oct 21, 2007

HiI have a VB.net web page which generates a datatable of values (3 columns and on average about 1000-3000 rows).What is the best way to get this data table into an SQL Server? I can create a table on SQL Server no problem but I've found simply looping through the datatable and doing 1000-3000 insert statements is slow (a few seconds). I'd like to make this as streamlined as possible so was wondering is there is a native way to insert all records in a batch via ADO.net or something.Any ideas?ThanksEd

View 1 Replies View Related

SQL Server Storing Large Amounts Of Data In Multiple Tables

Jul 20, 2005

Hello,Currently we have a database, and it is our desire for it to be ableto store millions of records. The data in the table can be divided upby client, and it stores nothing but about 7 integers.| table || id | clientId | int1 | int2 | int 3 | ... |Right now, our benchmarks indicate a drastic increase in performanceif we divide the data into different tables. For example,table_clientA, table_clientB, table_clientC, despite the fact thetables contain the exact same columns. This however does not seem veryclean or elegant to me, and rather illogical since a database existsas a single file on the harddrive.| table_clientA || id | clientId | int1 | int2 | int 3 | ...| table_clientB || id | clientId | int1 | int2 | int 3 | ...| table_clientC || id | clientId | int1 | int2 | int 3 | ...Is there anyway to duplicate this increase in database performancegained by splitting the table, perhaps by using a certain type ofindex?Thanks,Jeff BrubakerSoftware Developer

View 4 Replies View Related

Sql 2005 Updating Table Definition With 'large' Amounts Of Data - Timeout

Feb 4, 2006

I'm trying to move my current use of an sql 2000 db to sql 2005.



I need to update a table definition (to change a field to an Identity)



I'm getting a dialog box (in SQL server management studio) on save saying :



'xxxx' table

- Saving Definition Changes to tables with large amounts of data could
take a considerable amount of time. While changes are being
saved, table data will not be accessible.



I press 'Yes' to the dialog box.



After 35 seconds, I get another dialog box saying:



'xxxx' table

- Unable to modify table.

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.



Well, the server is responding and I can query that talbe and other, I
can add/delete rows to other columns. I can modify other
(smaller) tables.



Any ideas where I can change this timeout?



Daniel

View 10 Replies View Related

SP1 And Hotfixes On Client

Sep 28, 2006

I've just finished applying SP1 and the hotfixes (in the prescribed order) to my development SQL2005 server. I'm guessing that I need to upgrade my clients, too. I imagine the clients can be upgraded using the big SP1 installer, but do I need to install all of the hotfix packages or just the sqltools hotfix? The article about the hotfix is pretty adamant about all hotfixes being installed on a server, even if particular components aren't installed, but they completely neglect the client where only SQL tools are installed.



Thanks

Steve

View 1 Replies View Related

Transact SQL :: DB Audit File That Gets Populated With Data As Activity On DB Goes On

Aug 25, 2015

writing a T_SQL query for the following scenario..I have a SQL DB Audit file that gets populated with data as the activity on DB goes on.I have multiple monthly tables setup that the import should go into these monthly tables based on the event_time value in the SQL DB Audit file.all the data Like event_time '2015-08-25 15:59:39.033' should go to SQL table Audit_tbl_Aug2015 Query for reading SQLDB Audit file

SELECT * FROM sys.fn_get_audit_file ('C:ackupAudit*',default,default)
order by event_time desc
GO
--DML for Audit table CREATE TABLE [dbo].[Audit_tbl_Aug2015]( [id] [bigint] IDENTITY(1,1) NOT NULL, [event_time] [datetime2](7) NOT NULL, [sequence_number] [int] NULL, [action_id] [varchar](4) NULL, [succeeded] [bit] NOT NULL, [permission_bitmask] [bigint] NOT NULL, [is_column_permission] [bit] NOT NULL, [session_id] [smallint] NOT NULL, [server_principal_id] [int] NULL, [database_principal_id] [int]

[code]...

View 2 Replies View Related

Any Experience With 2005 Sp2 Hotfixes

Jan 15, 2008

I am currently at build 9.00.3054.00 and I'm having some strange
performance problems.. inserts hanging etc.....

Has anyone applied build 3175 or 3215 with good results....

any input is appreciated!

View 1 Replies View Related

How Do I Tell What Hotfixes Have Been Applied To An Instance?

Aug 31, 2007



How do I tell what hotfixes have been applied to an instance?

Thanks

View 3 Replies View Related

Security Patches

Oct 10, 2002

Is there any stored procedure or MS utility that will show me what security patches are installed/needed on an install of SQL Server 2000?
Thanks.

View 2 Replies View Related

Replication And Applying Patches

Oct 25, 2003

Hi all

I just want to make sure I have the proper understanding of how to apply MS security patches in a replicated SQL2k environment.

1) Upgrade Distributor
2) Upgrade Publisher
3) Upgrade Subcriber(s)

Any comment or suggestion would be highly appreciated :-)

View 2 Replies View Related

Latest Patches For Sql 2005

Jan 4, 2008

Just installed sql 2005 version 9.00.30.42
and on this site
http://www.sqlservercentral.com/articles/Administration/2960/
There is
9.00.3215 943656 http://support.microsoft.com/kb/943656/
Cumulative Update 5 contains hotfixes for SQL Server 2005 issues that have been fixed since the release of Service Pack 2.

Do i just get this one and apply this on top

View 8 Replies View Related

Security Patches For SQL Server 2000

Feb 17, 2005

Hello all guru's,

How can I tell what security patches I have currently on sql server 2000 and if I am up to date on all the latest security patches?

Thanks in advance.

View 2 Replies View Related

Microsoft Security Patches And SQL Server

Apr 23, 2008

I've just taken over the role of SQL Server DBA for my organization. I've been asked to go over the list of Microsoft patches that will be installed on our SQL Server boxes to see if there are any issues.

As of now, I'm going to Microsoft's site and reading up on the patches. But, they don't have any info on where there are any negative effects on SQL Server or other Microsoft products.

The patches are being installed on test servers and I plan on running a few jobs to test for any issues.

Does anyone know of any other resources I could check?

Thanks,

-jeff

View 2 Replies View Related

Unable To Download Patches From MS Links?

May 31, 2015

what options do i have when i am unable to download resources from MS link:

I am trying to download Service packs for SQL server 2008 R2 from link [URL] But it says downloading and nothing shows up.

there is any alternative or what can be wrong with links?

View 2 Replies View Related

SQL Server Express Security Patches

Sep 14, 2007

Please how are security patches for SQL Server Express 2005 made available (e.g., as seperate distributions or bundled into other Microsoft patch distribution mechanisms)? Are there specific procedures that I need to put in place to ensure that SQL Server Express 2005 gets patched on end user machines?

View 1 Replies View Related

SS2005 SP1 + Cummlative Hotfixes - Snapshot Replication StartIndex Cannot Be Less Than Zero

Nov 29, 2006

Hi, has anyone got the following error message before? It seems like it occurred when the snapshot creation agent reached the UDF fn_getOwner():


StartIndex cannot be less than zero.
Parameter name: startIndex


Error messages:


Message: StartIndex cannot be less than zero.
Parameter name: startIndex
Command Text:
select 'number' = convert(int, 0), 'definition' = definition
from sys.sql_modules
where object_id = object_id(@qualified_object_name)
union all
select 'number' = convert(int, procedure_number), 'definition' = definition
from sys.numbered_procedures
where object_id = object_id(@qualified_object_name)
Parameters: @qualified_object_name = [dbo].[fn_getOwner]

Stack: at Microsoft.SqlServer.Replication.AgentCore.ExecuteWithOptionalResults(CommandSetupDelegate commandSetupDelegate, ProcessResultsDelegate processResultsDelegate, Int32 queryTimeout, CommandBehavior commandBehavior)
at Microsoft.SqlServer.Replication.AgentCore.ExecuteWithOptionalResults(CommandSetupDelegate commandSetupDelegate, ProcessResultsDelegate processResultsDelegate, CommandBehavior commandBehavior)
at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.TextModeOnObjectScripter.Script()
at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.GenerateNonTableArticleSchScript(Scripter scripter, BaseArticleWrapper articleWrapper, SqlSmoObject smoObject, Boolean quotedIdentifierOn, Boolean ansiNullsOn, Boolean textMode)
at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.GenerateFunctionArticleScripts(ArticleScriptingBundle articleScriptingBundle)
at Microsoft.SqlServer.Replication.Snapshot.TransSmoScriptingManager.GenerateArticleScripts(ArticleScriptingBundle articleScriptingBundle)
at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.GenerateObjectScripts(ArticleScriptingBundle articleScriptingBundle)
at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.DoScripting()
at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.DoScripting()
at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.GenerateSnapshot()
at Microsoft.SqlServer.Replication.SnapshotGenerationAgent.InternalRun()
at Microsoft.SqlServer.Replication.AgentCore.Run() (Source: MSSQLServer, Error number: 52006)
Get help: http://help/52006

Source: mscorlib
Target Site: System.Text.StringBuilder Remove(Int32, Int32)
Message: StartIndex cannot be less than zero.
Parameter name: startIndex
Stack: at System.Text.StringBuilder.Remove(Int32 startIndex, Int32 length)
at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.TextModeOnObjectScripter.ProcessGetObjectScriptResult(SqlDataReader dataReader)
at Microsoft.SqlServer.Replication.AgentCore.ExecuteWithOptionalResults(CommandSetupDelegate commandSetupDelegate, ProcessResultsDelegate processResultsDelegate, Int32 queryTimeout, CommandBehavior commandBehavior) (Source: mscorlib, Error number: 0)
Get help: http://help/0



Here's the function:


set ANSI_NULLS ON

set QUOTED_IDENTIFIER ON

go

/* various comments here. */

ALTER

FUNCTION [dbo].[fn_getOwner] (@moduleID integer, @FY char(4))

RETURNS varchar(5)

AS

BEGIN

declare @tin char(9),

@owner varchar(5),

@ownerCount integer

-- Get owner via ModuleID

select @owner = owner

from tblControlPage

where moduleid = @moduleID and AuditFY = @FY;

-- Get owner via ATIN (This is when the moduleId is not on control page or no owner.

-- Check to see if the ATIN is on control page and use ATIN's Owner)

if @owner is null

begin

-- get module's TIN.

select @tin = tin from tblModule where moduleid = @moduleID

-- count the number of owners by ATIN those owner is not null via entity association.

select @ownerCount = count(*) from

(

select owner from vwControlPage c inner join vwEntityAssociation e

on c.tin = e.atin and e.tin = @tin

and auditfystart <= @FY and @FY < auditfyend

where owner is not null

group by owner

) owners



if @ownerCount = 1

begin

-- good, there's only one owner, get the ATIN owner.

select top 1 @owner = owner from vwControlPage c inner join vwEntityAssociation e

on c.tin = e.atin and e.tin = @tin

and auditfystart <= @FY and @FY < auditfyend

where owner is not null

group by owner

end

-- else there are multiple owners, set owner value to 'Multi'

if @ownerCount > 1

begin

set @owner = 'Multi'

end

end



-- Get owner via TIN if @owner is still null

if @owner is null --or len(@owner) = 0

begin

-- get TIN of module (Commented out the following because it was retrieved on prior "if" condition)

-- select @tin = tin from tblModule where moduleid = @moduleID

-- count number of owners by that TIN those not null.

select @ownerCount = count(*) from

(

select owner from vwControlPage

where tin = @tin and auditFY = @FY and owner is not null

group by owner

) owners

if @ownerCount = 1

begin

-- good, there's only one owner.

select top 1 @owner = owner from vwControlPage

where tin = @tin and auditFY = @FY and owner is not null

group by owner

end

-- else there are multiple owners, set owner value to 'Multi'

if @ownerCount > 1

begin

set @owner = 'Multi'

end

end

return @owner

end





View 1 Replies View Related

Recovery :: AlwaysOn Availability Groups - Download Hotfixes

Oct 19, 2015

I'm doing a certification process using AlwaysOn, and was using the link below, and on the lower 90 hotfix, and instead of downloading one by one, and then upgrade one by one updates, is there any way to make it more faster or practical, or unfortunately have to do this one by one, so the download as the update? This rollup contains the latest version of the Windows system files that are updated after the release of SP1. URL...

View 2 Replies View Related

Possibly A BUG In 6.5

Dec 8, 1999

I have a situation where I may have found a bug in SQL 6.5. I have a process that creates a temp table, then calls a stored procedure that uses that temp table, and the temp table has an identity column on it. The second procedure declares a cursor using an ORDER BY clause on the identity column and spins through the records, updating each row. The below sample is a test case that I think proves the bug. If you remove the ORDER BY clause from the cursor declaration, it works fine. Because of the nature of our data, we have to have the ORDER BY clause.

If you put the following code in a window, run it, you'll see. Then remove the ORDER BY and rerun and you'll get good results. Has anyone seen this or know of a work around? The only solution I have for a workaround is to select the data from the temp table into another temp table and declare the cursor on the second temp table. That seems to work fine. Any suggestions will be appreciated.

SQL SERVER 6.5 - SP5a; NT 4.0 SP5

Thanks,
Mike Nolen
Dealer Solutions Sr. DBA
Houston, TX



-----------SNIP AND RUN------------
-- just needed for the below proc to compile...
create table #mn_temp (
col1 int identity NOT NULL,
col2 char(1)NOT NULL
)
go

drop proc mn2
go
create proc mn2
as
begin
declare @iint, @cchar(1)

-- insert a few records
insert into #mn_temp values ('A')
insert into #mn_temp values ('B')
insert into #mn_temp values ('C')
insert into #mn_temp values ('D')
insert into #mn_temp values ('E')

-- cursor should spin through 5 records
declare aaa cursor for
select col1, col2 from #mn_temp
order by col1

open aaa

fetch next from aaa into @i, @c
select @@fetch_status "fs", @i "ident", @c "char"

while (@@fetch_status <> -1)
begin
print 'In while loop'

fetch next from aaa into @i, @c

-- should print 1A, 2B, 3C, 4D, 5E...but it doesn't!!!
select @@fetch_status "fs", @i "ident", @c "char"
end
close aaa
deallocate aaa
end
go

-- temp table no longer needed...drop it before compiling mn0...
drop table #mn_temp
go

drop proc mn0
go
create proc mn0
as
begin
create table #mn_temp (
col1 int identity NOT NULL,
col2 char(1) NOT NULL )

exec mn2
end
go

View 4 Replies View Related

Possibly Merge Join Bug?

Mar 27, 2006

i'm merge joining 2 data sources, one is oracle and the other is excel...the problem is in the oracle source, it's a sql statement like:

select hdr.div_ord_no, hdr.mtr_no, hdr.prod_cd
from qctrl_div_ord_header hdr,
(select max(sub.eff_dt_from) min_eff_dt_from, div_ord_no
from qctrl_div_ord_header sub
group by div_ord_no
) tmp
where hdr.eff_dt_from = tmp.min_eff_dt_from
and hdr.div_ord_no = tmp.div_ord_no

having that sql statement, merging will come out with 0 rows

however, having a simple query like:

select hdr.div_ord_no, hdr.mtr_no, hdr.prod_cd
from qctrl_div_ord_header hdr

merging will come out with 2 rows

you may think that the data in the first sql statement is not there for the merge, which causing the 0 rows, however, the data is there, i'm only joining by one column and definitely the data is there, the merge result should be 2 rows for both query statements

i believe this is a problem with SSIS, anyway around this?

View 2 Replies View Related

Possibly Extremely Simple SQL Query

Jan 27, 2004

Right, I'm no SQL programmer. As I type this, I have roughly the third the hair I had at 5 o'clock last night. I even lost sleep over it.

I'm trying to return a list of records from a database holding organisation names. As I've built a table to hold record versions, the key fields (with sample data) from a View I created to display this is as follows:

record_id-----org_id-----live-----version
====== ===== === =====
1-------------1----------0----------1
2-------------2----------0----------1
3-------------1----------1----------2
4-------------2----------0----------2

as you can see the record id will always be unique. record 3 is a newer version of record 1, and 4 of 2. the issue is thus: i only want to return unique organisations. if a version of the organisation record is live on the system (in this case record id 3), i want to return the live version with its unique record id. i'm assuming for this i can perform a simple "SELECT WHERE live = 1" query.

however, some organisations will have no live versions (see org with id 2). i still wish to return a record for this organisation, but in this case the most recent version ie version 2 (and again - its unique record id)

in actual fact, it seems so much clearer when laid out like this. however, i feel it's not going to happen this end, and so any help would be greatly appreciated.

many thanks in advance,

phil

View 2 Replies View Related

Query Help - Select Distinct Possibly?

Oct 26, 2006

I need to return the current case cost for every UPC in my table. In my current query I return case costs that have an effective date of today or earlier. The problem is that in my results, one UPC may have two or more case costs that were are effective <= GETDATE(). I can sort it by effective date (DESC) so I know the first of every UPC in my results will be the current effective case cost, but how do I modify my query so that in my result set I only get the first of every UPC?

Here is my query:

SELECT factCaseCosts.nUpcKey, factCaseCosts.dCaseCost, factCaseCosts.dtEffectiveDate
FROM factCaseCosts
WHERE (factCaseCosts.dtEffectiveDate <= GETDATE())
ORDER BY dtEffectiveDate DESC

Here is my current result set:
52023.762006-08-01 00:00:00
52023.762006-02-18 00:00:00
52123.762006-08-01 00:00:00
52123.762006-02-18 00:00:00
52230.362006-08-01 00:00:00
52230.362006-02-18 00:00:00
52323.762006-08-01 00:00:00
52323.762006-02-18 00:00:00

I only want the first 520 returned, the first 521 returned, the first 522 returned, and the first 523 returned.
How can I do this?
Thanks!

View 3 Replies View Related

Autogrow Of Log File Possibly Cause Timeout?

Jan 30, 2007

i had a problem with a server instance where an app processing a file and putting the data into the database using a stored procedure was timing out. the app is a service and in the case of errors, will try to process the file until it has been succesfully added data to the database. in the event viewer i keep seeing this message during this timeout period:

"Autogrow of file 'mydatabase_log' in database 'mydatabase' was cancelled by user or timed out after 15687 milliseconds. Use ALTER DATABASE to set a smaller FILEGROWTH value for this file or to explicitly set a new file size."

is there a possibility that this process was causing my SP to timeout? are there any other log or debug files that SQL Express creates that might be helpful in discovering what caused the timeout? currently the log is at... ouch 10gigs restricted... maybe trying to autogrow from this while restricted is hogging resources?

View 9 Replies View Related

Question About Database Mirroring And Possibly NLB

Sep 12, 2006

OK since my company really would not prefer to spend the money for Windows 2003 Enterprise and MS SQL 2005 Enterprise I was thinking about this idea...

Server1 - W2K3 Std - SQL2005 Std - Primary
Server2 - W2K3 Std - SQL2005 Std - Mirror
Server3 - W2K3 Std - SQL2005 Std - Witness
Server4 - W2K3 Std - SQL2005 Std - Processing

OK So we have Server1 & Server2 doing the Database Mirroring. Then I have Server3 as the Witness to say who is the Primary and so forth. Now Server4 I thinking to us to create jobs that will run on a Schedule to pull data from our Ticketing system and import it into Server1 & Server2 (Yes this is a Datawarehouse).. So what I am wondering... We really wish to not have to change our connections to the DB with the Failover connection string and just use a common name. Since we are not usng Enterprise I can not do the Failover Clustering... So what I was wondering is if we could use the MS NLB. So for example with Server1 being primary and Server2 being Mirror... Server1 dies or goes down for maintance or whatever... Then Server3 will notice that and say OK Server2 you are now primary but also have Server3 go into the MS NLB and say Server3 Online and take all connections. Then when Server1 comes back on-line it is set as the Mirror system and is Offline in the NLB... Is this possible? If yes can someone either A... Give me directions on how to do that... or B shot me some URL's where I can read up on this stuff?

Thanks for all your help anyone is able to provide. It is greatly appricated.

Billy S.

View 14 Replies View Related

Possibly Incorrect Query Result

Jul 13, 2006

/* Test table */
create table test (c1 char(1), c2 varchar(1));
insert into test values ('','');

/* Query */
select
c1,
len(c1) len_c1,
c2,
len(c2) len_c2
from test


The result of the len(c1) expression is 0. I would expect the correct result to be 1, since "c1" is a fixed-length character string type and the values are right-padded with spaces to fit the defined length, in this case 1.

I'm using SQL Server 2005.

Regards,
Ole Willy Tuv

View 1 Replies View Related

Post SP2-Hotfixes Fails To Install Database Services On Clustered Servers With System Dbs On Non-default Location

Jan 9, 2008

Hi,

We've had this issue for awhile, but I have not been able to find a resolution for this. We have 2 identical servers (hardware & software) set-up: IBM x3850-(88633RU) running Windows Server 2003 Enterprise x64 (5.2.3790 SP1 Build 3790 R2). Server A was running SP1 (Build 9.0.2047) on a 3-node active-passive-passive failover cluster. Server B was running SP2 + Hotfix KB933097 (Build 9.0.3152) on a 2-node active-passive failover cluster. Both these servers are heavily utilized, and when originally installed with these versions of SQL Server Enterprise 2005 experienced no issues during or post-install. The original install of SQL 2005 Enterprise on both these servers had the Cluster Group Selection "Data files" setting changed to "M:MICROSOFT SQL SERVER" so that all system dbs and binaries would be installed to that location. On Server B where SP2 had already been applied, the update was downloaded on May 1, 2007, well after the GDR issues which had been plaguing SP2 releases was supposed to have been resolved.

Our problems began the night when we tried to apply hotfix KB933097 on Server A, and cumulative update packages 1,2,3 on Servers A & B, as well as catch-up the same SP2 and hotfix packages on other non-clustered servers where default system db locations remained the same. On all servers other than Servers A and B, the installs proceeded smoothly and without issue.

On Server B, which was already running SP2 + Hotfix KB933097, we tried installing Cumulative Update Package 1 (Build 9.0.3161) on the primary node. The install proceeded until the following errors were encountered:

"[Microsoft][SQL Native Client][SQL Server]Cannot find the object 'dm_exec_query_resource_semaphores', because it does not exist or you do not have permission."

"[Microsoft][SQL Native Client][SQL Server]Cannot find the object 'dm_exec_query_memory_grants', because it does not exist or you do not have permission."

After this, the setup finished with the message "Product: Microsoft SQL Server 2005 (64-bit) - Update 'Hotfix 3161 for SQL Server Database Services 2005 (64-bit) ENU (KB935356)' could not be installed. Error code 1603. Additional information is available in the log file C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGHotfixSQL9_Hotfix_KB935356_sqlrun_sql.msp.log."

We rebooted the server and tried several times to reinstall the hotfix as sa and as the database service account with full windows and sa credentials, each time with no success, and rebooting between retries. All other components were installed successfully. We were hesitant to try uninstalling the hotfix, since it was unable to be removed successfully in previous attempts. However, when I connected to Database Engine using Management Studio, I found that the version of SQL being reported was in fact Build 9.0.3161! Everything also appeared to be running properly.

I tried to to Google the answer, but could only find information as applied to SP1 when system dbs master and mssqlsystemresource were located on different locations (http://support.microsoft.com/default.aspx?scid=kb;EN-US;918695 ). I had already verified that all system dbs, including the ones mentioned, were originally and currently located together on M:Microsoft SQL ServerMSSQL.1MSSQLData.


Finally I contacted a fellow DBA who advised me to continue installing all the other hotfixes, and then compare all SQL files against other servers where the install succeeded to ensure all system files were updated correctly (matching file sizes and datetime stamps). Since we were depending on a fix in Cumulative Update Package 3 to fix a critical log-shipping security issue, I went ahead with the rest of the installs, getting the same error with each package, rebooting between each install.

We found after the final install that the mssqlsystemresource files in the M:Microsoft SQL ServerMSSQL.1MSSQLData

directory were in fact updated after each install with a new timestamp, and that all files in C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLBinn matched on both file size and timestamp. The log-shipping security issue we were looking to fix also appeared to be resolved by the last update.

On Server A, which was running SP1 (Build 9.0.2047), we installed the same SP2 package as we had on Server B with no issue. We rebooted and then tried to apply the same Hotfix KB933097 (Build 9.0.3152) that had been applied successfully on Server B and found to our surprise that the same errors were being generated here as well. We continued to apply the rest of the hotfixes so that both servers matched software updates. Comparing the above directories showed that files seemed to have been updated, even though database services appeared to be not installed.

It looks like we now need Cumulative Update 5 hotfix package in order to deal with WMI alerting issues, but I'm afraid to apply it until we have a known resolution for the past errors.


Since this issue was supposed to be resolved by SP2, I'm not sure why these post-SP2 hotfixes should fail. It seems to me to be an issue of the directory location of the system files which is in question.

I can post the hotfix log files as well, if anyone is interested in seeing them.

Any help would be greatly appreciated. As well, does anyone have any idea when SP3 is scheduled to come out? I really don't like applying hotfixes which are usually untested for general purposes, and it seems Microsoft is delaying this in favour of releasing SQL 2008.

View 6 Replies View Related

SUM And JOIN And Possibly GROUP BY - Incorrect Value Returned By SUM

Mar 23, 2006

It's me again :)

So; if you read my earlier thread here (http://www.dbforums.com/showthread.php?t=1214353), you'll know that I'm trying to build stored procedures to deal with ticketing queries, and that it's all getting a bit complicated. I have, however, made a bit of progress and now have the following working:


CREATE PROCEDURE [dbo].[getAvailableTickets]
@eventId INT,
@standId INT,
@admissionDateId INT,
@concessionId INT,
@userId INT

AS

DECLARE @startyear DATETIME
DECLARE @endyear DATETIME
SELECT @startyear=CONVERT(datetime, '2006/01/01')
SELECT @endyear=CONVERT(datetime, '2006/12/31')


SELECT
[tblTickets].[id] AS ticketId,
[tblEvents].[id] AS eventId,
[tblStands].[id] AS standId,
[tblAdmissionDates].[id] AS admitDateId,
[tblEvents].[event_name],
[tblStands].[stand_name],
[tblTicketConcessions].[concession_name],
[tblMemberships].[membership_name],
[tblAdmissionDates].[admission_start_date],
[tblAdmissionDates].[admission_end_date],
[tblBookingMinQuantities]. AS minBookingQuantity,
[tblBookingMaxQuantities].[booking_quantity] AS maxBookingQuantity,
MIN([tblQuotas].[quota]) AS Quota,
[B]SUM([tblBasket].[ticket_quantity]) AS History,
[tblTickets].[price],
[tblTickets].[availability]

FROM [tblTickets]
LEFT JOIN [tblEvents]ON [tblEvents].[id] = [tblTickets].[event_id]
LEFT JOIN [tblStands]ON [tblStands].[id] = [tblTickets].[stand_id]
LEFT JOIN [tblBookingDates]ON [tblBookingDates].[id] = [tblTickets].
LEFT JOIN [tblTicketConcessions]ON [tblTicketConcessions].[id] = [tblTickets].[ticket_concession_id]
LEFT JOIN [tblBookingQuantities] AS tblBookingMinQuantities ON [tblBookingMinQuantities].[id] = [tblTickets].[booking_min_quantity_id]
LEFT JOIN [tblBookingQuantities] AS tblBookingMaxQuantitiesON [tblBookingMaxQuantities].[id] = [tblTickets].[booking_max_quantity_id]
LEFT JOIN [tblAdmissionDates]ON [tblAdmissionDates].[id] = [tblTickets].[admission_date_id]
LEFT JOIN [tblMemberships]ON [tblMemberships].[id] = [tblTickets].[membership_id]
LEFT JOIN [tblQuotas]ON
([tblQuotas].[event_id] = [tblTickets].[event_id] OR [tblQuotas].[event_id] IS NULL) AND
([tblQuotas].[stand_id] = [tblTickets].[stand_id] OR [tblQuotas].[stand_id] IS NULL) AND
([tblQuotas].[admission_date_id] = [tblTickets].[admission_date_id] OR [tblQuotas].[admission_date_id] IS NULL) AND
([tblQuotas].[concession_id] = [tblTickets].[ticket_concession_id] OR [tblQuotas].[concession_id] IS NULL) AND
([tblQuotas].[membership_id] = [tblTickets].[membership_id] OR [tblQuotas].[membership_id] IS NULL) AND
([tblQuotas].[ticket_id] = [tblTickets].[id] OR [tblQuotas].[ticket_id] IS NULL)
[B]LEFT JOIN [tblBasket] ON [tblBasket].[ticket_id] = [tblTickets].[id]
LEFT JOIN [tblOrders] ON [tblOrders].[id] = [tblBasket].[order_id]

WHERE 1=1
AND ([tblTickets].[ticket_open] = 1)
AND (([tblEvents].[id] = @eventId OR @eventId = 0)AND ([tblEvents].[event_open] = 1))
AND (([tblStands].[id] = @standId OR @standId = 0)AND ([tblStands].[stand_open] = 1))
AND (([tblAdmissionDates].[id] = @admissionDateId OR @admissionDateId = 0)AND ([tblAdmissionDates].[date_open] = 1))
AND ([tblTicketConcessions].[id] = @concessionId OR @concessionId = 0)
AND ((getdate() BETWEEN [tblBookingDates]. AND [tblBookingDates].[booking_end_date]) OR ([tblBookingDates].[booking_start_date] IS NULL AND [tblBookingDates].[booking_end_date] IS NULL))
AND (([tblMemberships].[id] IN (SELECT [membership_id] FROM [tblUsers_Memberships] WHERE [user_id]=@userId)) OR [tblMemberships].[id] IS NULL)
[B]AND ([tblOrders].[user_id] = @userId OR @userId=0)

GROUP BY
[tblTickets].[id],
[tblEvents].[id],
[tblStands].[id],
[tblAdmissionDates].[id],
[tblEvents].[event_name],
[tblStands].[stand_name],
[tblTicketConcessions].[concession_name],
[tblMemberships].[membership_name],
[tblAdmissionDates].[admission_start_date],
[tblAdmissionDates].[admission_end_date],
[tblBookingMinQuantities].[booking_quantity],
[tblBookingMaxQuantities].[booking_quantity],
[tblTickets].[price],
[tblTickets].[availability]
GO



Except... there's two problems with it. One is that it only returns tickets that you've already bought, the other is that it doens't work out correctly how many of those tickets you've bought in past orders.

This is what's in tblBasket:


idticket_idquantityorder_iddate
152321/03/2006
262321/03/2006
3144421/03/2006
4154421/03/2006
551421/03/2006


Both the orders in there are for the same user id: "1". All the tickets in there are tied to event "2".

When I run Exec dbo.getAvailableTickets 2,0,0,0,1, it tells me it's found 6 of ticket 5, 4 of ticket 6 and 12 of ticket 14. And I can't for the life of me figure out how it's calculating it. Any ideas?

And how do i get it to return all tickets regardless of whether you've bought them previously or not?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved