Showing posts with label pretty. Show all posts
Showing posts with label pretty. Show all posts

Friday, March 30, 2012

Having problems with variables

I have a Execute Process Task that pretty much executes a batch file that downloads a file that has a dynamic file name (with datetime stamp). Now I would like to load this file to a Flat File Source task in the Data Flow Task section automatically. So, creating a file manager or something on the fly. Is something like this possible with SSIS? Or am I simply hitting the wall here?

Thank you.

Why can you not just drop a data-flow into your package and make sure it executes after the Execute process task?

-Jamie

Having problems using Breakpoint in Script Task.

I am still pretty new to SSIS, SQL, and DOT NET. I came from the UNIX world. I have a SSIS package. On the Control Flow one of the Items I have is a Script Task. I was able to successfully set breakpoints in the Script Task and they worked fine.I could step through the script and check values in variables.Life was good.

Now something happened.I set the breakpoint, from the menu I select “start with debugging” and I get the following window:

-- -

Visual Studio Just-In-Time Debugger

An unhandled exception (‘System.Runtime.InteropServices.COMException’) occurred in DTAttach.exe [3380].

Possible Debuggers:

New instance of Microsoft CLR Debugger 2003

New instance of Visual Studio .NET 2003

New instance of Visual Studio 2005

[_] set the currently selected debugger as the default

[_] Manually choose the debugging engines

Do you want to debug using the selected debugger?

--

I have tried selecting Yes, but that doesn’t work.If I delete all breakpoints the package runs fine.I greatly appreciate your help.

You are not alone.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1846879&SiteID=1|||Thanks Phil. I found a work around for my problems and posted it on the thread you provided the link to above.

Friday, March 9, 2012

hardening sql server 2000

Hello,
I've just looked over
http://www.windowsecurity.com/artic...
00.html
which seems to be a pretty good document. The problem is it references SP3.
Should I follow this guide, and then install SP4?
Will SP4 blow away any sound modifications made in the previous steps?
Can someone point me at other documents that they found useful when
trying to install SQL 2000 in the most secure way possible.?
Thanks in advance,
CHCraig
> Will SP4 blow away any sound modifications made in the previous steps?
Service Packs is cumulative. However , there are some hotfix MS reased to be
fixed some problems after installing SP4 .

> Can someone point me at other documents that they found useful when trying
> to install SQL 2000 in the most secure way possible.?
<http://www.sqlsecurity.com/DesktopD...index=1&tabid=2> --
Security
SQL SERVER
http://vyaskn.tripod.com/sql_server...t_practices.htm --sec
urity
best practices
"Craig" <spam@.thehurley.com> wrote in message
news:Oi2AZcmsGHA.1888@.TK2MSFTNGP03.phx.gbl...
> Hello,
> I've just looked over
> http://www.windowsecurity.com/artic...r />
2000.html
> which seems to be a pretty good document. The problem is it references
> SP3.
>
> Should I follow this guide, and then install SP4?
> Will SP4 blow away any sound modifications made in the previous steps?
> Can someone point me at other documents that they found useful when trying
> to install SQL 2000 in the most secure way possible.?
> Thanks in advance,
> CH

Sunday, February 19, 2012

Handeling NULL variable

Good afternoon,

I'd like to like how you guys handle a situation like the one I'm going to describe in just a moment. I'm pretty sure I'm not handeling it in the best way, so I'll just try to explain the situation and learn something from the gurus.

Let's imagin I have the following tables:

[Companies]Id [Uniqueidentifier] [PK]Alias [NVarChar]Status [Bit][Campanies_JobTitles]Id [PK]CompanyId [Uniqueidentifier]Alias [NVarChar]Status [Bit]
If I want to know the job titles of company 1 I could easely set the following stored procedure:
SELECT JT.IdAS Id ,JT.AliasAS AliasFROM Companies_JobTitles JTWHERE JT.Status = 1AND JT.CompanyId = @.CompanyIdORDER BY JT.AliasASC;

Now, if the user wants to list the job titles across all the companies I could pass a special value and identify that, as follows:

IF (@.CompanyIdISNOT NULL)BEGIN SELECT JT.IdAS Id ,JT.AliasAS AliasFROM Companies_JobTitles JTWHERE JT.Status = 1AND JT.CompanyId = @.CompanyIdORDER BY JT.AliasASC;ENDELSE BEGIN SELECT JT.IdAS Id ,JT.AliasAS AliasFROM Companies_JobTitles JTWHERE JT.Status = 1ORDER BY JT.AliasASC;END

This works fine. I just find it a bit counter productive to copy paste the query and wrap it into an if statement. So, the bottom line is: how can I do this in a more "professional" way?

Best regards.

Hi,

What I believe, the query is good enough because at certain point you have to check if the company Id exist or not so that if exist you can search it by the id, if not then show all.

Thanks and best regards,

|||

farazsk11:

Hi,

What I believe, the query is good enough because at certain point you have to check if the company Id exist or not so that if exist you can search it by the id, if not then show all.

Thanks and best regards,

I understand what you are saying, although that check was not on the posted code for the sake of simplicity. But, that wouldn't answer the underlying question that is: how can I "reuse" the query so I don't have to repeat it thoughout the procedure? Is there a function that can solve this like ISNULL allows you to handle the values that return as null.

|||

What about this:

SELECTJT.IdAS Id,JT.AliasAS AliasFROM Companies_JobTitles JT
WHERE JT.Status = 1
AND JT.CompanyId =ISNULL(@.CompanyId,JT.CompanyId)ORDER BY JT.Alias

|||

limno:

What about this:

SELECTJT.IdAS Id,JT.AliasAS AliasFROM Companies_JobTitles JT
WHERE JT.Status = 1
AND JT.CompanyId =ISNULL(@.CompanyId,JT.CompanyId)ORDER BY JT.Alias

That was exactly what I was looking for. I didn't know ISNULL could be used in that context.

Thanks a lot limno :)