Showing posts with label setting. Show all posts
Showing posts with label setting. Show all posts

Sunday, March 25, 2012

Can not connect to SQL Server from DMZ

We just moved to a new office. After setting up the servers, we found
that the apllication (including SQL Query Analyzer) in DMZ can not
access SQL server that is behind the firewall. We can ping the SQL
server from the server in DMZ and we also checked and confirmed port
1433 is open from the firewall. Could anyone help me out?
Thanks,Run the following test:
ISQL -Stcp:sqlnamehere -Uuserid -Ppassword -Q"select @.@.version"
Post the Error message.
Winsock Error messages should be returned if it fails.
Example:
11001 == Host Not Found
10060 == Connection Timeout
10061 == Connection Refused
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

Friday, February 24, 2012

can I stop a scheduled job by setting @@error manually

I either need to have a job not start if the table is empty or
stop if it is empty.
I Think the the latter would be something like the following
job steps
step 1) count records - success = next step - failure = end job with failure
step 2 ) dts file.
step logic:
step 1) select count(*) from tablea
if count = 0 then set @.@.error = 999 /*or what ever causes job
to fail
else
continue to create file for dts step.
step 2) dts job to export data.
TIAYes, I think you're on the right track. The job's first step could be a
stored proc that does something like this:
select @.RecCount = count(*) from tablea
IF @.RecCount = 0
Begin
Raiserror('Tablea is empty.', 16, 1)
Return 16
End
hth
Tom
tdr wrote:
>I either need to have a job not start if the table is empty or
> stop if it is empty.
>I Think the the latter would be something like the following
>job steps
>step 1) count records - success = next step - failure = end job with failure
>step 2 ) dts file.
>step logic:
>step 1) select count(*) from tablea
> if count = 0 then set @.@.error = 999 /*or what ever causes job
>to fail
> else
> continue to create file for dts step.
>step 2) dts job to export data.
>TIA
>
--
E-mail correspondence to and from this address may be subject to the
North Carolina Public Records Law and may be disclosed to third parties.