Saturday, October 5, 2013

[SQL Server 2008 issues] Methods and classes are not coming by default when I write code in script task(SSIS)

[SQL Server 2008 issues] Methods and classes are not coming by default when I write code in script task(SSIS)


Methods and classes are not coming by default when I write code in script task(SSIS)

Posted: 04 Oct 2013 05:54 PM PDT

Hi All,Methods and classes are not coming by default when I write code in script task,I am using 2008 SQL server BIDS.Could you please what its need to be done from my end?Thanks

MSDB.mdb file is 50GB

Posted: 04 Oct 2013 04:17 PM PDT

When I run the queryhttp://stackoverflow.com/questions/3927231/how-can-you-tell-what-tables-are-taking-up-the-most-space-in-a-sql-server-2005-dit only shows the total space of 100 MB.

To enable server proxy account

Posted: 04 Oct 2013 03:53 PM PDT

Hi in sql server properties there is a security tab.in that there is option of enabling server proxy account,is it safe to enable in production environment.Fist of all what its use.Second can it enabled for sql login (i mean local login and not domain/window).Or it compulsory needs windows/domain loginif suppose it its done is there any security hazard

doubt about remote connection in sql server

Posted: 04 Oct 2013 03:30 PM PDT

Hi i a have doubt about remote connection in sql serve.Presently its is enabled suppose i disabled it through sp_configure statement .what would happeni have 2 casesIn one case there is serverA where this option has been disabled throught sp_congigure now there is local workstation(assume it itself is server) from where i have to connect serverA,is it possible to connect to serverA.Secound i take remote through mstsc then is it possible to connect to serverA

to know more about sql server in bulid default trace

Posted: 04 Oct 2013 03:14 PM PDT

Hi after installation of sql server there is inbulid trace which is enabled automatically.Is it very helpfull.or should i disabled it get another trace that are avaliable on net.second this trace file are created in at default location in log folder where error log is stored.Is there any way to move this trace file to other location.i donot want to move error log file Thanks and regardsAnoop Pandey

Error Message: BACKUP failed to complete the command BACKUP LOG msdb

Posted: 30 Sep 2013 02:20 AM PDT

Hi,I am getting following error message daily into my error log.I am running FULL Backup, Diff Backup an T-Log Backup.This message is every morning early I see and looks like during same time my T-log backup job also running.I have also checked that MSDB is in SIMPLE recovery mode and it's not part of my T-Log back up, it's only part of FULL BAckup - weekly.ERROR:BACKUP failed to complete the command BACKUP LOG msdb. Check the backup application log for detailed messages.

t-sql to create simple bar graph image file to be inserted into email

Posted: 04 Oct 2013 05:33 AM PDT

We want to be able to use t-sql to create a simple bar graph image file, to be inserted into an email. I know how to use sp_send_dbmail, but don't really know where to start for the bar graph. So I guess there are maybe 3 different parts to this? - creating a graph, save the graph as image file, encode the image to insert inline into an email. Or let me know if you think I can skip from step 1 right to step 3.Any links to good articles on how to do this? I'm wondering now if it'd be simpler to find out how to use Excel or Access VBA to create and encode the graph to an email...

SQLIO Test file

Posted: 04 Oct 2013 10:00 AM PDT

I used 'fsutil.exe file createnew' to create big testing data file that is 128GB so that it will out number the SAN controller cache. My concern is that is the data file contains all zeros? If so, my array controller is smart enough to detect it and still cache the data. How you created your testing data file in a SQLIO test?ThanksClare

Clustered index behavior with computed columns

Posted: 04 Oct 2013 08:10 AM PDT

Hi all, I was working with an idea for searching through IP ranges efficiently and ran into a problem with building out the indexes required for the table. Here's the general structure:[img]http://i.imgur.com/t3r6lP1.png[/img]After INSERT INTO'ing the base table (red, blue columns)I've been using the following ALTER command to add into the table definition the spatial data I need.[code="sql"] ALTER TABLE Junk..foo ADD geo_range AS geometry::STGeomFromText('LINESTRING('+CONVERT(VARCHAR(20),IPStartNumber)+' 0,'+CONVERT(VARCHAR(20),IPEndNumber)+' 0)',0 ) [/code]As you can see, it's fairly straightforward-- I just want the column to store a 2-D geometric representation of the numbers in the blue column. After running that alter command (the entire table is un-indexed at this point) SELECT * works and returns the expected data.After creating a clustered index on the red columns however, the computed column breaks. It gives the error that 2 distinct points were not supplied for the LINESTRING function.Any thoughts as to why this might be occurring? I know the creation of a clustered index rearranges the data, but why would that affect a column that is built by looking at the values of 2 un-indexed columns? Moreover, why would it affect the syntax of a command already in place in the table definition?Thanks in advance!

Optimizing Update Task in SSIS

Posted: 04 Oct 2013 06:20 AM PDT

I have query but it takes 10 min to update all the routes any one how to optimized itupdate cwlocal.adhoc_route a set route_id = (select trim(route_no) from cwlocal.routes b where b.trip_no = a.trip_number) where EXISTS (select 1 from cwlocal.routes b where b.trip_no = a.trip_number) and to_char(a.filename_date,'yyyyMMdd') = ?RegardsShaun

Require Template !!!

Posted: 03 Oct 2013 11:03 PM PDT

We are starting a New campaign for which we need DBA checklist & Templates for SQL SERVER 2008.. all required checklist DBA uses...which should include Maintenance tasks etc.. etc.. everything which is required.. Please suggest

deadlock graph I cant see teh whole query

Posted: 04 Oct 2013 02:27 AM PDT

HI,I am running SQL profile trace capturing the dead lock graph , when I hover over either SQL statements I can not see the whole query..Please help

Help with Pivot (or Unpivot)

Posted: 03 Oct 2013 07:53 PM PDT

I originally posted this a couple of weeks ago, and (very unusually) got no replies. It has 'Excel' in the title which may have put some people off. , however it is not specifically an Excel issue, as the data is imported to SQL Server. Its just a rather complex pivot/unpivot.See [url]http://www.sqlservercentral.com/Forums/Topic1495433-391-1.aspx?Update=1[/url]Any help appreciated before I go and write some possibly unnecessary CLR thing

IN statement in a stored procedure

Posted: 04 Oct 2013 01:47 AM PDT

Hi All,I have the following stored procedure:CREATE PROCEDURE dbo.ScoreHistory @StartDate int, @EndDate int, @membercode nvarchar(1), @Source nvarchar(2)AS SELECT DISTINCT(S.Score) AS Score, COUNT(U.ScoreID) AS Count FROM UPSELL U INNER JOIN ScoreMap S ON S.ScoreID = U.ScoreID WHERE SEARCHDATE BETWEEN @StartDate AND @EndDate AND membercode = @membercode AND PubCode = @Source GROUP BY S.ScoreWhat I need to be able to do is change the above to use the IN() statement on the variables @membercode and @Source. Any help will be appreciated.EO

SQL Server 2005 - 2008 upgrade question

Posted: 04 Oct 2013 12:00 AM PDT

Hello,This is kind of a basic question, but I'll ask anyway lest I look bad in front of my boss....I have to upgrade a 2005 SQL box to 2008. I have the SQL CD, but I have to install it from my local PC. Is there a way to run the install process from a local PC but actually install SQL on a remote box using the CD?Thanks in advance,Dave

Is there a short cut (Like 'SELECT *') for selecting all but a few fields in a table??

Posted: 03 Oct 2013 07:58 PM PDT

Hello,I have a table of like more than 50 columns, and my problem here is that I want ALL but 2 or 3 column names in my SELECT clause! Is there any way to do this without having to write all the field names in the SELECT clause?What I mean is just as we use '*' to display all the columns, is there any such way like 'SELECT * EXCEPT (Column1,Column2) ' (Just an example!) to do this??

More than 300 SPID sleeping status?

Posted: 03 Oct 2013 11:50 PM PDT

Hi..I have verified thru SP_WHO2 system stored procedure for checking server session process.. It shows 300 SPID sleping status and AWITING COMMAND..Generally sleeing spid is ideal connection also not using any transaction..and wasting CPU and memory resource, also application connection pooling not get it clear by automatically.how can we clear the sleeping SIPD?Is it problem in SQL Instance?how can we identified these connections are reusing or not?Thanksananda

server hostname / alias

Posted: 03 Oct 2013 10:41 PM PDT

We have a new SQL 2008 server. We'd like to refer to it as SERVERNAME. However, the server group insists on naming it NAMINGCONVENTION.We can make an alias in DNS, so that SERVERNAME resolves to the server's IP address.Can we then connect to SQL Server as SERVERNAME\MSSQLSERVER, or will we need to use NAMINGCONVENTION\MSSQLSERVER ?Does SQL Server need to know what the alias is?Thanks....

Create Pivot , Exporting the result into flat file with Column Header

Posted: 03 Oct 2013 09:56 PM PDT

Dear All,I am trying to create pivot of some table.some how i managed to create pivot. Now i am exporting the resultant data into flat file. while doing so i am unable to retrieve column headers since while creating pivot column headers are dynamic.I am using BCP command to export the data into txt.1. Select * from Table : giving me only data not column2. SELECT [Column 1], [Column 2].... ---> I cant use this query since my column are dynamic and that depends on the data i have in my table.How to get dynamic column headers into flat file???? Please help me with this.ThanksRegards,Deepika

t-sql question

Posted: 03 Oct 2013 08:30 PM PDT

Hi,I'm developing a stored procedure (the proc below).When I try to print the @str2 it always returns '' but I pass a value to the @ano variable.Can someone help?ThanksALTER PROCEDURE sp_RetornaCTBDesc (@ANO VARCHAR(5) = NULL, @MES VARCHAR (2) = NULL, @DIA VARCHAR (10) = NULL, @STATUS VARCHAR(2) = NULL, @PROVINCIA VARCHAR(3) = NULL, @SERVICOFISCAL VARCHAR(5) = NULL, @METODOT VARCHAR(6) = NULL, @OPERACAO VARCHAR (5) = NULL)ASBEGIN DECLARE @DB AS VARCHAR(50) DECLARE @STR1 AS VARCHAR(1000) DECLARE @STR2 AS VARCHAR(1000) DECLARE @STR3 AS VARCHAR(1000) DECLARE @STR4 AS VARCHAR(1000) DECLARE @STR5 AS VARCHAR(1000) DECLARE @OPT AS VARCHAR (20) SET @DB = (SELECT CONFIG_VALUE from TBL_BASE_CONFIG WHERE CONFIG_PARAM ='SGCT_BD') IF @OPERACAO = 'INSERIDOS' SET @OPT ='DT_INICIO' ELSE BEGIN IF @OPERACAO = 'INSERIDOS' SET @OPT ='DT_ALTERACAO' ELSE SET @OPT ='CESSADOS' END SET @STR1 = ('SELECT COD_PROVINCIA, COD_MET_TRIBUTARIO, NIF+ISNULL(FILIAL_NUMBER,'''') NIF, NOME, STATUS FROM '+@DB+'.DBO.CONTRIBUINTES ') --PRINT @STR1 SET @STR2 =('SELECT CASE WHEN ('+@ANO+'=NULL AND '+@MES+'=NULL AND '+@DIA+'=NULL) THEN ''UI'' WHEN '+@DIA+' <> NULL THEN ''WHERE '''+@OPERACAO+ '''= ''' + @DIA +''''' WHEN '+@MES+' <> NULL THEN ''WHERE MONTH('+@OPERACAO+ ')' + '=' + @MES + ' AND '+' YEAR('+@OPERACAO+')'+' = ' +@ANO+''' ELSE ''WHERE YEAR('+@OPERACAO+ ')'+' = ' + @ANO +''' END') PRINT @STR2

2008 SQL replication

Posted: 25 Sep 2013 02:48 AM PDT

I have a 2008 SQL server i need to replicate for a reporting server on a Nightly basis. I had the replication working originally but had to break it for a software upgrade. The DB has grown in size from 40 GB to 150 GB ( a lot of imports .When i tried to re-enable snapshot replication the Publisher takes around 40 Minutes the subscriber I let run for over 12 hrs and it never completed. Currently i am doing a manual backup From the publisher and then a manual restoration to the subscriber. When the DB is compressed the backup is 28 GB and transfers to the subscriber in less then 5 minutes backup. Would it be better to do a transnational replication ? Is there ways to have SQL only update the tables that changed ? When all of our imports are done i expect the Db to be approximately 250 GB

No comments:

Post a Comment

Search This Blog