Showing posts with label process. Show all posts
Showing posts with label process. Show all posts

Wednesday, March 21, 2012

Mixing parameter syntax in Execute SQL task

Hi all,

As part of the logging process for data input, I want to update two fields in a logging table. The first is a datetime, derived from looking up the maximum value in another table (the table I've just imported), and the second is an integer - the number of rows captured in a variable during the task.

I can do this in two separate Execute SQL tasks as follows:

Task 1 syntax

DECLARE @.maxDate datetime
SELECT @.maxDate = max(dtLastChangedDate)
FROM dbo.tblCancel_RAW

UPDATE dbo.tblLogging
SET PreviousFilterValue = CurrentFilterValue,
CurrentFilterValue = ISNULL(CAST ( @.maxdate as varchar(25)),CurrentFilterValue),
DateSourceTableLastRead = GetDate(),
RowsReturned= -1
WHERE SourceTableName = 'cancel'

Task 2 Syntax, with the variable user::rowsimported mapped to parameter 0

UPDATE dbo.tblLogging
SET
RowsReturned= ?
WHERE SourceTableName = 'cancel'

However I cannot make this work with a single SQL statement such as

DECLARE @.maxDate datetime
SELECT @.maxDate = max(dtLastChangedDate)
FROM dbo.tblCancel_RAW

UPDATE dbo.tblLogging
SET PreviousFilterValue = CurrentFilterValue,
CurrentFilterValue = ISNULL(CAST ( @.maxdate as varchar(25)),CurrentFilterValue),
DateSourceTableLastRead = GetDate(),
RowsReturned= ?
WHERE SourceTableName = 'cancel'

because no matter how I try to map the parameter (0,1,2,3,4 etc) the task fails.

Is this behaviour by design, is it a bug, or is there something I've missed?

Thanks as ever,

Richard

Richard,

What error message do you get?

-Jamie

Mixed mode in the NT Domain World

does anyone have a Microsoft Documented process map of how the security mode
l
works for a SQL Server 7 and/or 2000 in a NT Domain Security?I think this will answer your question.
http://www.microsoft.com/technet/pr...n/sp3sec01.mspx
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.|||Actually, it is not clear as to what I am looking for. We are performing an
IT Audit for SOX.
The sql box is part of a NT Domain. We ran a select statement from the sql
box from sys logins where password is null. It produced a list of Domain ID
s
with null passwords. So the questions is, could I use a domain id from a
non-trusted connection to attach to the database?
Does this make sense?
Thanks
Rob
"Kevin McDonnell [MSFT]" wrote:

> I think this will answer your question.
> [url]http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/sp3sec01.mspx[/ur
l]
> Thanks,
> Kevin McDonnell
> Microsoft Corporation
> This posting is provided AS IS with no warranties, and confers no rights.
>
>|||So the questions is, could I use a domain id from a
non-trusted connection to attach to the database?
Yes. If the same username and password is duplicated on the non-trusted
domain.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

Monday, March 19, 2012

Mistakenly removed dtproperties, now I can find my diagram

I am currently testing SQL Server 2000 Evaluation version.

I created a diagram with the diagraming tool, but in the process I mistakenly deleted the system table 'dtproperties'. I have a backup of the database, but the last time I restored it, I lost my diagram (and had to do it again)

What I've done to try to get it back:
I have another database with the old table schema, and I tried to enter all the values it that old database's dtproperties into the recent db's dtproperties, but that didnt' work especially since I didn't know how to copy the lvalue column.

How can I restore my diagram?I believe no chance to retrieve the diagram as you're using EEE.

Monday, February 20, 2012

Missing files after using File System Task

Hi All,

I don't know if anyone faced this issue. We are having a strange problem. Our process was working well when it was implemented on 32 bit processor.IT ran perfectly for 6 months with out a problem. But when we moved the packages to a 64 bit machine, this issue along with some other issues started to show up.

The issue is we are missing files in the source folder.

Our process is designed such that a source process, brings in a file and updates a status for the file in a audit table. The ETL process picks up the file, then assigns the status as ‘running’ when SRC process is complete and loads into Target DB, and updates ETL status to complete. But current problem is the ETL is losing files after it assigns the status as running. When we looked into the DB weather the data is loaded, we could not find any data related to these files.

we are have mapping level parameters for source path and target path.

We are using a For Each Loop task, and processing files(which are simple flat files) in the source path. The file name is stored in the mapping level parameter. Once the file is process we are moving them into a target path.

Our src and target file paths are on the same drive, just have src folder, inside src folder we have processed folder and failed folder. So files are picked from the source folder and moved into processed folder after processing. The files are not even moved to a failed folder.

There are lot other processing going on this box, and the trend observed is that when more processors are running at peak hour, the missing files’ count is more.

Right now we are refetching those files, as a work around, but does any one has any suggestion why this is happening or any better implementation suggestions?

Thanks

We solved our problem. This was due to the combination of problems.

1. Environment setup for our new 64 bit server

2. Use of event handler for 'On Error' instead of 'On task failure'.

3. Overwrite destination in move file task properties in Event handler.

4. Consistent connection (I don't exactly remember the word, but its in the properties of the connections in connection manager)

1st and 4th issue: The sympotom was the missing files were more when the system was too busy, also processing other packages. When we set up our initial 32 bit machine, we had our named pipes enabled on both client and server. so no issues. But in our new 64 bit environment, the server named pipes was disabled (Shared Memory, TCP/IP were enabled) and client's was enabled, so when client wants a connection, it looks in the same order, 1st Shared Memory, 2nd TCP/IP and last named pipes. But the server, only gives connection on first 2. So the connection were timing out in peak processing.

Added to that the connection properties in the package(4th issue), was not stable state, so every time, its encounters a task in the package which needs DB connection, its requests new connection. So this issue multiplied because the named pipes were disabled. So the solution to this both issues is, just enable named pipes on the server (or disable on client, enable is better since the process has extra options for connections). In the package conection properties, select connection as stable state. This option helps to have stable connection from the start of package execution to the end, instead of connection and disconnecting for each task.

2nd & 3rd issue: This issue was already present in our 32 bit also, but did not show up since we did not have connection failure error due to named pipes. Since connection was timing out on our new environment, each failure consitues to an error, so when the first error raised, the src file was moved to the destination folder(with overwrite destination option true). But due to connection failures, we had often multiple error events, so for subsequest error events, its tries to moved again the src file which is not present since it was moved the first time. So for subsequest errors, since we had overwrite destination option to true, the package first deletes the target files, and tries to move the file and fails, since the src file is not present. This leads to the missing file problem.

The solution to this problem is, just set overwrite destination option to false in file task. Based on your requirement, you can also have the event handler on the 'On Task Failure' event instead of 'on Error event'.

Hope this helps a lot of pains to lot of people, and saves lot of bucks to many companies.

Excuse my spelling mistakes if any.

Thanks,

Venkat

Missing files after using File System Task

Hi All,

I don't know if anyone faced this issue. We are having a strange problem. Our process was working well when it was implemented on 32 bit processor.IT ran perfectly for 6 months with out a problem. But when we moved the packages to a 64 bit machine, this issue along with some other issues started to show up.

The issue is we are missing files in the source folder.

Our process is designed such that a source process, brings in a file and updates a status for the file in a audit table. The ETL process picks up the file, then assigns the status as ‘running’ when SRC process is complete and loads into Target DB, and updates ETL status to complete. But current problem is the ETL is losing files after it assigns the status as running. When we looked into the DB weather the data is loaded, we could not find any data related to these files.

we are have mapping level parameters for source path and target path.

We are using a For Each Loop task, and processing files(which are simple flat files) in the source path. The file name is stored in the mapping level parameter. Once the file is process we are moving them into a target path.

Our src and target file paths are on the same drive, just have src folder, inside src folder we have processed folder and failed folder. So files are picked from the source folder and moved into processed folder after processing. The files are not even moved to a failed folder.

There are lot other processing going on this box, and the trend observed is that when more processors are running at peak hour, the missing files’ count is more.

Right now we are refetching those files, as a work around, but does any one has any suggestion why this is happening or any better implementation suggestions?

Thanks

We solved our problem. This was due to the combination of problems.

1. Environment setup for our new 64 bit server

2. Use of event handler for 'On Error' instead of 'On task failure'.

3. Overwrite destination in move file task properties in Event handler.

4. Consistent connection (I don't exactly remember the word, but its in the properties of the connections in connection manager)

1st and 4th issue: The sympotom was the missing files were more when the system was too busy, also processing other packages. When we set up our initial 32 bit machine, we had our named pipes enabled on both client and server. so no issues. But in our new 64 bit environment, the server named pipes was disabled (Shared Memory, TCP/IP were enabled) and client's was enabled, so when client wants a connection, it looks in the same order, 1st Shared Memory, 2nd TCP/IP and last named pipes. But the server, only gives connection on first 2. So the connection were timing out in peak processing.

Added to that the connection properties in the package(4th issue), was not stable state, so every time, its encounters a task in the package which needs DB connection, its requests new connection. So this issue multiplied because the named pipes were disabled. So the solution to this both issues is, just enable named pipes on the server (or disable on client, enable is better since the process has extra options for connections). In the package conection properties, select connection as stable state. This option helps to have stable connection from the start of package execution to the end, instead of connection and disconnecting for each task.

2nd & 3rd issue: This issue was already present in our 32 bit also, but did not show up since we did not have connection failure error due to named pipes. Since connection was timing out on our new environment, each failure consitues to an error, so when the first error raised, the src file was moved to the destination folder(with overwrite destination option true). But due to connection failures, we had often multiple error events, so for subsequest error events, its tries to moved again the src file which is not present since it was moved the first time. So for subsequest errors, since we had overwrite destination option to true, the package first deletes the target files, and tries to move the file and fails, since the src file is not present. This leads to the missing file problem.

The solution to this problem is, just set overwrite destination option to false in file task. Based on your requirement, you can also have the event handler on the 'On Task Failure' event instead of 'on Error event'.

Hope this helps a lot of pains to lot of people, and saves lot of bucks to many companies.

Excuse my spelling mistakes if any.

Thanks,

Venkat

missing file to uninstall SQL Server 2000...

Hi,
Because of an error in the uninstallation process of SQL Server 2000, I once
cancelled it. But now everytime I tried to uninstall SQL Server 2000 again,
there's this error message: " Can't find log file in %Systemroot%\Program
Files\Microsoft SQL Server\MSQL\Uninst.isu", thus the uninstallation is
cancel by it's own.
What to do? Is there a way to restore the Uinst.isu file log?
Thank you.Do a manual remove: http://support.microsoft.com/kb/290991/en-us
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Dhow" <Dhow@.discussions.microsoft.com> wrote in message
news:B8297EE8-9F3A-4319-AEE4-32761743BAB2@.microsoft.com...
> Hi,
> Because of an error in the uninstallation process of SQL Server 2000, I on
ce
> cancelled it. But now everytime I tried to uninstall SQL Server 2000 again
,
> there's this error message: " Can't find log file in %Systemroot%\Program
> Files\Microsoft SQL Server\MSQL\Uninst.isu", thus the uninstallation is
> cancel by it's own.
> What to do? Is there a way to restore the Uinst.isu file log?
> Thank you.|||Thanks Tibor, I'll try it at once.
"Tibor Karaszi" wrote:

> Do a manual remove: http://support.microsoft.com/kb/290991/en-us
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Dhow" <Dhow@.discussions.microsoft.com> wrote in message
> news:B8297EE8-9F3A-4319-AEE4-32761743BAB2@.microsoft.com...
>

missing file to uninstall SQL Server 2000...

Hi,
Because of an error in the uninstallation process of SQL Server 2000, I once
cancelled it. But now everytime I tried to uninstall SQL Server 2000 again,
there's this error message: " Can't find log file in %Systemroot%\Program
Files\Microsoft SQL Server\MSQL\Uninst.isu", thus the uninstallation is
cancel by it's own.
What to do? Is there a way to restore the Uinst.isu file log?
Thank you.
Do a manual remove: http://support.microsoft.com/kb/290991/en-us
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Dhow" <Dhow@.discussions.microsoft.com> wrote in message
news:B8297EE8-9F3A-4319-AEE4-32761743BAB2@.microsoft.com...
> Hi,
> Because of an error in the uninstallation process of SQL Server 2000, I once
> cancelled it. But now everytime I tried to uninstall SQL Server 2000 again,
> there's this error message: " Can't find log file in %Systemroot%\Program
> Files\Microsoft SQL Server\MSQL\Uninst.isu", thus the uninstallation is
> cancel by it's own.
> What to do? Is there a way to restore the Uinst.isu file log?
> Thank you.
|||Thanks Tibor, I'll try it at once.
"Tibor Karaszi" wrote:

> Do a manual remove: http://support.microsoft.com/kb/290991/en-us
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Dhow" <Dhow@.discussions.microsoft.com> wrote in message
> news:B8297EE8-9F3A-4319-AEE4-32761743BAB2@.microsoft.com...
>

missing file to uninstall SQL Server 2000...

Hi,
Because of an error in the uninstallation process of SQL Server 2000, I once
cancelled it. But now everytime I tried to uninstall SQL Server 2000 again,
there's this error message: " Can't find log file in %Systemroot%\Program
Files\Microsoft SQL Server\MSQL\Uninst.isu", thus the uninstallation is
cancel by it's own.
What to do? Is there a way to restore the Uinst.isu file log?
Thank you.Do a manual remove: http://support.microsoft.com/kb/290991/en-us
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Dhow" <Dhow@.discussions.microsoft.com> wrote in message
news:B8297EE8-9F3A-4319-AEE4-32761743BAB2@.microsoft.com...
> Hi,
> Because of an error in the uninstallation process of SQL Server 2000, I once
> cancelled it. But now everytime I tried to uninstall SQL Server 2000 again,
> there's this error message: " Can't find log file in %Systemroot%\Program
> Files\Microsoft SQL Server\MSQL\Uninst.isu", thus the uninstallation is
> cancel by it's own.
> What to do? Is there a way to restore the Uinst.isu file log?
> Thank you.|||Thanks Tibor, I'll try it at once.
"Tibor Karaszi" wrote:
> Do a manual remove: http://support.microsoft.com/kb/290991/en-us
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Dhow" <Dhow@.discussions.microsoft.com> wrote in message
> news:B8297EE8-9F3A-4319-AEE4-32761743BAB2@.microsoft.com...
> > Hi,
> > Because of an error in the uninstallation process of SQL Server 2000, I once
> > cancelled it. But now everytime I tried to uninstall SQL Server 2000 again,
> > there's this error message: " Can't find log file in %Systemroot%\Program
> > Files\Microsoft SQL Server\MSQL\Uninst.isu", thus the uninstallation is
> > cancel by it's own.
> > What to do? Is there a way to restore the Uinst.isu file log?
> > Thank you.
>