Tuesday, August 27, 2013

[SQL Server 2008 issues] Assist me the merge statement performance in sql server..

[SQL Server 2008 issues] Assist me the merge statement performance in sql server..


Assist me the merge statement performance in sql server..

Posted: 26 Aug 2013 01:30 AM PDT

Hi Everybody,Im using following query, is there any other alternative way? MERGE DistinctData AS TARGETUSING DataTable AS SOURCE ON (TARGET.msisdn = SOURCE.Charged_party_number)WHEN NOT MATCHED BY TARGET THEN INSERT (msisdn) VALUES (SOURCE.Charged_party_number);Assist me the merge statement performance in sql server..

Display last label value on x axis always

Posted: 26 Aug 2013 08:55 AM PDT

I dont want to display each and every value on xaxis, i want to set interval to 'auto' but want to Display last label value on x axis always

Change SQL Data Root Directory

Posted: 26 Aug 2013 01:33 PM PDT

I am hoping there is a way to change the "data root directory" after a SQL 2008R2 install. I gave someone the wrong drive information during the install and they have already completed a bunch of servers and installed service packs.It will take them the entire day to re-install what they have setup so far, so I'm trying to offer some help.I would like to know how critical this mistake is.Will losing the drive that we have setup as the data root directory make SQL Server not function anymore?http://social.msdn.microsoft.com/Forums/sqlserver/en-US/98b97adb-80e9-42e2-8099-cc17dd985b9f/how-to-change-default-database-root-directory-I found the link above, has anyone tried this to see if it works? Is there a way to re install without re installing service packs? Hope someone can throw me some idea's as a scour the internet. Thanks....

Stress Test Tool - SQL Server 2008R2 - Possibly freeware ?

Posted: 26 Aug 2013 07:55 AM PDT

My goal is to run a script in multiple concurrent sessions on the same db, today i can do that in a not-so neat way using while loop. I was wondering if there a tool which will just take my script as a input and just throw the execution timings in a table or somewhere?

Track username and time of action on delete for rows

Posted: 26 Aug 2013 05:53 AM PDT

I've been trying on this one for a while. I implemented change data capture, but I found interpreting some of the columns difficult (even after reading through several articles online). Since I only need to track deletes on one or two tables, I decided to try an on delete sql trigger. Well, I'm having a hard time with this one too. Here is what I would like to capture:1. The row that was deleted2. When the row was deleted3. What user deleted the rowHere is some sample data for anyone that can lend a hand. Thanks for any help!CREATE TABLE #attend(attendID int,lname varchar(100),fname varchar(100));INSERT INTO #attend (attendID, lname, fname)VALUES (1, 'Smith', 'Joe'), (2, 'Black', 'Sam'), (3, 'Williams', 'Ralph');EDIT: I guess I should note that specifically I'm having a hard time with capturing which user did the deleting.

Google Analytics SQL Import

Posted: 08 May 2012 09:07 PM PDT

Hi AllI was just wondering if anyone has ever done a Google Analytics import to SQL via SSIS?A quick google brought up some C# scripts, a PHP web scraper and using the java client to export to CSV and then import it, but was wondering if anyone has managed to query the API and load it direct in SSIS to the DB?This was a task which was done a couple of years ago and I have been asked to re-ignite the flame to get it moving again and the previous way was to use xp_cmdshell to execute a file which loads it to CSV and imports it, which I have no trouble with, just wondering if anyone has a better solution.Thanks

Linked Server weirdness to Sybase

Posted: 26 Jul 2011 07:08 AM PDT

This is for a linked server on SQL 2008 R2.Here are the facts:SQL 2008 R2 on Microsoft Windows Server 2003 R2 (SP2)I created a Sybase Linked server and it works fine for me. When one of the developers try to use it, SELECT * FROM OPENQUERY(mylinkedserver, 'select * from table1'), he gets this message: Cannot create an instance of OLE DB provider "ASEOLEDB" for linked server "mylinkedserver".The developer AD login is also setup as a sysadmin on the sql server instance.The developer has no problems using an Oracle linked serverWhen I make the developer an administrator to the server itself, the linked server works for him.Any ideas why? We cannot make the developer an admin to the server itself so we took him out of the "Administrators" group and the linked server no longer works.Edit: Here's the script to create the linked server. Names, Dates, Ports, Places, and other stuff have been change to protect the innocent.[code="sql"]EXEC master.dbo.sp_addlinkedserver @server = N'mylinkedserver', @srvproduct=N'Sybase', @provider=N'ASEOLEDB', @datasrc=N'sybaseServer,8888'EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'mylinkedserver',@useself=N'False',@locallogin=NULL,@rmtuser=N'username',@rmtpassword='########'GOEXEC master.dbo.sp_serveroption @server=N'mylinkedserver', @optname=N'collation compatible', @optvalue=N'false'GOEXEC master.dbo.sp_serveroption @server=N'mylinkedserver', @optname=N'data access', @optvalue=N'true'GOEXEC master.dbo.sp_serveroption @server=N'mylinkedserver', @optname=N'dist', @optvalue=N'false'GOEXEC master.dbo.sp_serveroption @server=N'mylinkedserver', @optname=N'pub', @optvalue=N'false'GOEXEC master.dbo.sp_serveroption @server=N'mylinkedserver', @optname=N'rpc', @optvalue=N'false'GOEXEC master.dbo.sp_serveroption @server=N'mylinkedserver', @optname=N'rpc out', @optvalue=N'false'GOEXEC master.dbo.sp_serveroption @server=N'mylinkedserver', @optname=N'sub', @optvalue=N'false'GOEXEC master.dbo.sp_serveroption @server=N'mylinkedserver', @optname=N'connect timeout', @optvalue=N'0'GOEXEC master.dbo.sp_serveroption @server=N'mylinkedserver', @optname=N'collation name', @optvalue=nullGOEXEC master.dbo.sp_serveroption @server=N'mylinkedserver', @optname=N'lazy schema validation', @optvalue=N'false'GOEXEC master.dbo.sp_serveroption @server=N'mylinkedserver', @optname=N'query timeout', @optvalue=N'0'GOEXEC master.dbo.sp_serveroption @server=N'mylinkedserver', @optname=N'use remote collation', @optvalue=N'true'GOEXEC master.dbo.sp_serveroption @server=N'mylinkedserver', @optname=N'remote proc transaction promotion', @optvalue=N'true'GO[/code]

Client Error "[DBNETLIB][ConnetionWrite (WrapperWrite()).]General network error. Check your network documentation."

Posted: 26 Aug 2013 06:07 AM PDT

Small Network, 1 DC which runs Server 2008 Std and SWL Express 2008 with 10 Workstations all running XP Pro SP3. We run a Dispatch Application that is SQL based on the DC and 4 of the Workstations runn a Dispatch Client app that communicates with teh Server App. 1 Workstation with the Client (mine by chance) has no problems at all. The other 3 periodically get this error: "[DBNETLIB][ConnetionWrite (WrapperWrite()).]General network error. Check your network documentation." I have further tracked this down to being some sort of inactivity or loss of connection error. If you have the Client App open for quite a while during the day, but don't use it (sitting minimized on the Taskbar, then when you pull it up and do any action, it gives this error and shits the Client down forcing you to relaunch it. I have researched this for days and can not come up with a fix. I have found a way to duplicate the error immediately and that is to have the Client up, unplug the Network Connection from the PC and wait until the Icon shows no connection then pkug it back in and wait until the connection shows good again. The very first action done in the App after this causes the error and the Client shuts down. This wull duplicate it on the 3 machines getting the error, but NOT on mine. Nothing I have tried will cause mine to fail....yet. Any one know hot to fix this???

Drive mapping Between VM and Local Desktop -Tricky Issue to work around.

Posted: 26 Aug 2013 03:10 AM PDT

Our company has VM's that users access by remote access (RDP). This solution, even though the number of connections is limited, has been fine for many years. Now that the company has grown this presents a problem. I want developers to Test a Developer SSIS packages on their local desktops; however, if they create a connection to a flat file, they'll have to change the connection once they move it back to the VM since the paths to the flat files will change.Example: I have a package I'll call "MoveData" that pulls flat files from a drive mapped as F: with the folder of "LOAD" this "F:\Load" is where the package gets it's flat files. We have literally hundreds of packages with multiple connections like this. Since there are limited connections to this VM (3 I think), I want developers to put the packages together on their local desktops; however, the path to the Flat will will be different.Any way I can either set up a standardized drive mapping on the developer's computer that matches the UNC path on the VM, Or bulk Change all the Flat File mappings once the package is migrated back to the VM?I can't change the VM. WAY too much effort involved.ThanksCrusty.

Failure to calculate super-latch promotion threshold

Posted: 18 Sep 2012 12:26 AM PDT

I saw this error message in the error log of one of my SQL Server 2008 R2 servers today (with SP2 installed, v10.50.4000).[b]"Warning: Failure to calculate super-latch promotion threshold."[/b]I've never seen that message, can't find anything online about it, and don't know what the impact is.The only other relevant information I can give is that there was a series of DBCC CHECKDB commands occurring at the time (our nightly database checks).Any additional information would be appreciated.Thanks,John

How do you know how much RAM you need?

Posted: 26 Aug 2013 04:21 AM PDT

Running the System Diagnostics Report (a Performance Monitor built in report) on a Windows Server 2008 R2 running SQL Server 2008 shows "The system is experiencing excessive paging" each monring for a few hours. This time frame is when we are doing a database 'load' from a different database (not MSSQL).The server has 16 GB RAM and is capable of 64 GB. There are other servers that may be available that can have a lot more RAM (like 384 GB).How do you know how much RAM is needed to avoid performance issues?

Procedure Cache and Data Cache

Posted: 25 Aug 2013 11:37 PM PDT

What is Plan Cache and Procedure Cache and Data Cache?Why these are used for ?

No comments:

Post a Comment

Search This Blog