Here are the errors in event log. The installation packeage keeps trying
every 3 hours. How shouyld I fix it.
Microsoft SQL Server 2005 Tools Express Edition -- Install started.
Product: Microsoft SQL Server 2005 Tools Express Edition -- Error 2711. The
installer has encountered an unexpected error. The error code is 2711. The
specified Feature name ('SQL_Documentation') not found in Feature table.
Product: Microsoft SQL Server 2005 Tools Express Edition - Update 'GDR 1406
for SQL Server Tools and Workstation Components 2005 ENU (KB932557)' could
not be installed. Error code 1603. Additional information is available in the
log file C:\Program Files (x86)\Microsoft SQL Server\90\Setup
Bootstrap\LOG\Hotfix\SQLTools9_Hotfix_KB932557_sql run_tools.msp.log.
Hi
"fj" wrote:
> Here are the errors in event log. The installation packeage keeps trying
> every 3 hours. How shouyld I fix it.
>
> Microsoft SQL Server 2005 Tools Express Edition -- Install started.
> Product: Microsoft SQL Server 2005 Tools Express Edition -- Error 2711. The
> installer has encountered an unexpected error. The error code is 2711. The
> specified Feature name ('SQL_Documentation') not found in Feature table.
> Product: Microsoft SQL Server 2005 Tools Express Edition - Update 'GDR 1406
> for SQL Server Tools and Workstation Components 2005 ENU (KB932557)' could
> not be installed. Error code 1603. Additional information is available in the
> log file C:\Program Files (x86)\Microsoft SQL Server\90\Setup
> Bootstrap\LOG\Hotfix\SQLTools9_Hotfix_KB932557_sql run_tools.msp.log.
What does this log say?
It may be similar to http://support.microsoft.com/kb/916760/en-us
or http://support.microsoft.com/kb/834484/en-us i.e. the permissions or
folders expected may not exist or have the wrong permissions or the account
doing the install may not have enough permissions.
John
|||Here is the part I found that might cause the problem. The specified Feature
name ('SQL_Documentation') not found in Feature table.
....
MSI (s) (80:34) [09:51:03:575]: Dir (target): Key:
payload_ul.97F81AF1_0E47_DC99_FF1F_C8B3B9A1E18E, Object:
C:\WINDOWS\winsxs\x86_microsoft.vc80.atl_1fc8b3b9a 1e18e3b_8.0.50727.42_none_dc990e4797f81af1\
MSI (s) (80:34) [09:51:03:575]: Dir (target): Key: VSRetarget, Object:
C:\Program Files (x86)\Microsoft SQL Server\90\Tools\Binn\
MSI (s) (80:34) [09:51:03:575]: Note: 1: 2711 2: SQL_Documentation
MSI (s) (80:34) [09:51:03:887]: Product: Microsoft SQL Server 2005 Tools
Express Edition -- Error 2711. The installer has encountered an unexpected
error. The error code is 2711. The specified Feature name
('SQL_Documentation') not found in Feature table.
Error 2711. The installer has encountered an unexpected error. The error
code is 2711. The specified Feature name ('SQL_Documentation') not found in
Feature table.
Action ended 9:51:03: CostFinalize. Return value 3.
Action ended 9:51:03: INSTALL. Return value 3.
Property(S): ProductCode = {2750B389-A2D2-4953-99CA-27C1F2A8E6FD}
Property(S): ProductLanguage = 1033
Property(S): Manufacturer = Microsoft Corporation
Property(S): ProductVersion = 9.00.1399.06
Property(S): MEDIAPACKAGEPATH = \Setup\
....
|||Hi
"fj" wrote:
> Here is the part I found that might cause the problem. The specified Feature
> name ('SQL_Documentation') not found in Feature table.
>
> ...
> MSI (s) (80:34) [09:51:03:575]: Dir (target): Key:
> payload_ul.97F81AF1_0E47_DC99_FF1F_C8B3B9A1E18E, Object:
> C:\WINDOWS\winsxs\x86_microsoft.vc80.atl_1fc8b3b9a 1e18e3b_8.0.50727.42_none_dc990e4797f81af1\
> MSI (s) (80:34) [09:51:03:575]: Dir (target): Key: VSRetarget, Object:
> C:\Program Files (x86)\Microsoft SQL Server\90\Tools\Binn\
> MSI (s) (80:34) [09:51:03:575]: Note: 1: 2711 2: SQL_Documentation
> MSI (s) (80:34) [09:51:03:887]: Product: Microsoft SQL Server 2005 Tools
> Express Edition -- Error 2711. The installer has encountered an unexpected
> error. The error code is 2711. The specified Feature name
> ('SQL_Documentation') not found in Feature table.
> Error 2711. The installer has encountered an unexpected error. The error
> code is 2711. The specified Feature name ('SQL_Documentation') not found in
> Feature table.
> Action ended 9:51:03: CostFinalize. Return value 3.
> Action ended 9:51:03: INSTALL. Return value 3.
> Property(S): ProductCode = {2750B389-A2D2-4953-99CA-27C1F2A8E6FD}
> Property(S): ProductLanguage = 1033
> Property(S): Manufacturer = Microsoft Corporation
> Property(S): ProductVersion = 9.00.1399.06
> Property(S): MEDIAPACKAGEPATH = \Setup\
> ...
SQL Express is not one of the products that have been listed as affected by
the hotfix!
http://support.microsoft.com/kb/932557/en-us
John
|||"John Bell" wrote:
> Hi
> "fj" wrote:
>
> SQL Express is not one of the products that have been listed as affected by
> the hotfix!
> http://support.microsoft.com/kb/932557/en-us
> John
Yeh, the VS 2005 is installed on the box but SQL Express is not. This fix is
installed by auto-update.
Now it seems like there is a scheduled job at somewhere, how I can stop or
remove it?
Is the hotfix referred by your link a fix to the problem?
Thanks
-FJ
|||Hi
"fj" wrote:
>
> "John Bell" wrote:
>
> Yeh, the VS 2005 is installed on the box but SQL Express is not. This fix is
> installed by auto-update.
> Now it seems like there is a scheduled job at somewhere, how I can stop or
> remove it?
> Is the hotfix referred by your link a fix to the problem?
> Thanks
> -FJ
It looks like you may have something left over then, if you have removed it.
You may want to check out:
http://msdn2.microsoft.com/en-us/vstudio/aa718704.aspx
or http://support.microsoft.com/kb/909967
John
|||Thanks John,
Actually I found the problem is because I didn't install the client tool and
documents from the original 2005 SQL Server(64bit). BUT, the auto-update
downloaded the hotfix for the SQL server 2005 without checking if I need this
fix. This hotfix (MSDN article number 932557) has "hardwired" update for
those tools and docs whch I don't have so the update failed.
Since the update is scheduled to launch every 3 hours, I am keep getting
this annoying errors.
Now my question still remains, how I can terminate the remaining update
manually? Is there a way to intercept MicroSoft's auto-update?
I don't think I need to re-install or remove VS2005 or SQL 2005. There is a
bug in this hotfix and Microsoft needs to know that.
Thanks
-FJ
|||Hi
"fj" wrote:
> Thanks John,
> Actually I found the problem is because I didn't install the client tool and
> documents from the original 2005 SQL Server(64bit). BUT, the auto-update
> downloaded the hotfix for the SQL server 2005 without checking if I need this
> fix. This hotfix (MSDN article number 932557) has "hardwired" update for
> those tools and docs whch I don't have so the update failed.
> Since the update is scheduled to launch every 3 hours, I am keep getting
> this annoying errors.
> Now my question still remains, how I can terminate the remaining update
> manually? Is there a way to intercept MicroSoft's auto-update?
> I don't think I need to re-install or remove VS2005 or SQL 2005. There is a
> bug in this hotfix and Microsoft needs to know that.
> Thanks
> -FJ
Why not install the tools, allow the update or manually install the update
and then remove the tools?
Automatic updates are not something you would want on a production system so
you may want to turn them off, but the problem could still occur if you
turned them on at some point.
John
sql
Showing posts with label event. Show all posts
Showing posts with label event. Show all posts
Friday, March 30, 2012
recent SQL 2005 hotfix creates problem
Here are the errors in event log. The installation packeage keeps trying
every 3 hours. How shouyld I fix it.
Microsoft SQL Server 2005 Tools Express Edition -- Install started.
Product: Microsoft SQL Server 2005 Tools Express Edition -- Error 2711. The
installer has encountered an unexpected error. The error code is 2711. The
specified Feature name ('SQL_Documentation') not found in Feature table.
Product: Microsoft SQL Server 2005 Tools Express Edition - Update 'GDR 1406
for SQL Server Tools and Workstation Components 2005 ENU (KB932557)' could
not be installed. Error code 1603. Additional information is available in th
e
log file C:\Program Files (x86)\Microsoft SQL Server\90\Setup
Bootstrap\LOG\Hotfix\SQLTools9_Hotfix_KB
932557_sqlrun_tools.msp.log.Hi
"fj" wrote:
> Here are the errors in event log. The installation packeage keeps trying
> every 3 hours. How shouyld I fix it.
>
> Microsoft SQL Server 2005 Tools Express Edition -- Install started.
> Product: Microsoft SQL Server 2005 Tools Express Edition -- Error 2711. Th
e
> installer has encountered an unexpected error. The error code is 2711. The
> specified Feature name ('SQL_Documentation') not found in Feature table.
> Product: Microsoft SQL Server 2005 Tools Express Edition - Update 'GDR 140
6
> for SQL Server Tools and Workstation Components 2005 ENU (KB932557)' could
> not be installed. Error code 1603. Additional information is available in
the
> log file C:\Program Files (x86)\Microsoft SQL Server\90\Setup
> Bootstrap\LOG\Hotfix\SQLTools9_Hotfix_KB
932557_sqlrun_tools.msp.log.
What does this log say?
It may be similar to http://support.microsoft.com/kb/916760/en-us
or http://support.microsoft.com/kb/834484/en-us i.e. the permissions or
folders expected may not exist or have the wrong permissions or the account
doing the install may not have enough permissions.
John|||Here is the part I found that might cause the problem. The specified Feature
name ('SQL_Documentation') not found in Feature table.
...
MSI (s) (80:34) [09:51:03:575]: Dir (target): Key:
payload_ul.97F81AF1_0E47_DC99_FF1F_C8B3B9A1E18E , Object:
C:\WINDOWS\winsxs\x86_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.42_none_
dc990e4797f81af1\
MSI (s) (80:34) [09:51:03:575]: Dir (target): Key: VSRetarget , Object:
C:\Program Files (x86)\Microsoft SQL Server\90\Tools\Binn\
MSI (s) (80:34) [09:51:03:575]: Note: 1: 2711 2: SQL_Documentation
MSI (s) (80:34) [09:51:03:887]: Product: Microsoft SQL Server 2005 Tools
Express Edition -- Error 2711. The installer has encountered an unexpected
error. The error code is 2711. The specified Feature name
('SQL_Documentation') not found in Feature table.
Error 2711. The installer has encountered an unexpected error. The error
code is 2711. The specified Feature name ('SQL_Documentation') not found in
Feature table.
Action ended 9:51:03: CostFinalize. Return value 3.
Action ended 9:51:03: INSTALL. Return value 3.
Property(S): ProductCode = {2750B389-A2D2-4953-99CA-27C1F2A8E6FD}
Property(S): ProductLanguage = 1033
Property(S): Manufacturer = Microsoft Corporation
Property(S): ProductVersion = 9.00.1399.06
Property(S): MEDIAPACKAGEPATH = \Setup\
...|||Hi
"fj" wrote:
> Here is the part I found that might cause the problem. The specified Featu
re
> name ('SQL_Documentation') not found in Feature table.
>
> ...
> MSI (s) (80:34) [09:51:03:575]: Dir (target): Key:
> payload_ul.97F81AF1_0E47_DC99_FF1F_C8B3B9A1E18E , Object:
> C:\WINDOWS\winsxs\x86_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.42_non
e_dc990e4797f81af1\
> MSI (s) (80:34) [09:51:03:575]: Dir (target): Key: VSRetarget , Object
:
> C:\Program Files (x86)\Microsoft SQL Server\90\Tools\Binn\
> MSI (s) (80:34) [09:51:03:575]: Note: 1: 2711 2: SQL_Documentation
> MSI (s) (80:34) [09:51:03:887]: Product: Microsoft SQL Server 2005 Too
ls
> Express Edition -- Error 2711. The installer has encountered an unexpected
> error. The error code is 2711. The specified Feature name
> ('SQL_Documentation') not found in Feature table.
> Error 2711. The installer has encountered an unexpected error. The error
> code is 2711. The specified Feature name ('SQL_Documentation') not found i
n
> Feature table.
> Action ended 9:51:03: CostFinalize. Return value 3.
> Action ended 9:51:03: INSTALL. Return value 3.
> Property(S): ProductCode = {2750B389-A2D2-4953-99CA-27C1F2A8E6FD}
> Property(S): ProductLanguage = 1033
> Property(S): Manufacturer = Microsoft Corporation
> Property(S): ProductVersion = 9.00.1399.06
> Property(S): MEDIAPACKAGEPATH = \Setup\
> ...
SQL Express is not one of the products that have been listed as affected by
the hotfix!
http://support.microsoft.com/kb/932557/en-us
John|||"John Bell" wrote:
> Hi
> "fj" wrote:
>
> SQL Express is not one of the products that have been listed as affected b
y
> the hotfix!
> http://support.microsoft.com/kb/932557/en-us
> John
Yeh, the VS 2005 is installed on the box but SQL Express is not. This fix is
installed by auto-update.
Now it seems like there is a scheduled job at somewhere, how I can stop or
remove it?
Is the hotfix referred by your link a fix to the problem?
Thanks
-FJ|||Hi
"fj" wrote:
>
> "John Bell" wrote:
>
> Yeh, the VS 2005 is installed on the box but SQL Express is not. This fix
is
> installed by auto-update.
> Now it seems like there is a scheduled job at somewhere, how I can stop or
> remove it?
> Is the hotfix referred by your link a fix to the problem?
> Thanks
> -FJ
It looks like you may have something left over then, if you have removed it.
You may want to check out:
http://msdn2.microsoft.com/en-us/vstudio/aa718704.aspx
or http://support.microsoft.com/kb/909967
John|||Thanks John,
Actually I found the problem is because I didn't install the client tool and
documents from the original 2005 SQL Server(64bit). BUT, the auto-update
downloaded the hotfix for the SQL server 2005 without checking if I need thi
s
fix. This hotfix (MSDN article number 932557) has "hardwired" update for
those tools and docs whch I don't have so the update failed.
Since the update is scheduled to launch every 3 hours, I am keep getting
this annoying errors.
Now my question still remains, how I can terminate the remaining update
manually? Is there a way to intercept MicroSoft's auto-update?
I don't think I need to re-install or remove VS2005 or SQL 2005. There is a
bug in this hotfix and Microsoft needs to know that.
Thanks
-FJ|||Hi
"fj" wrote:
> Thanks John,
> Actually I found the problem is because I didn't install the client tool a
nd
> documents from the original 2005 SQL Server(64bit). BUT, the auto-update
> downloaded the hotfix for the SQL server 2005 without checking if I need t
his
> fix. This hotfix (MSDN article number 932557) has "hardwired" update for
> those tools and docs whch I don't have so the update failed.
> Since the update is scheduled to launch every 3 hours, I am keep getting
> this annoying errors.
> Now my question still remains, how I can terminate the remaining update
> manually? Is there a way to intercept MicroSoft's auto-update?
> I don't think I need to re-install or remove VS2005 or SQL 2005. There is
a
> bug in this hotfix and Microsoft needs to know that.
> Thanks
> -FJ
Why not install the tools, allow the update or manually install the update
and then remove the tools?
Automatic updates are not something you would want on a production system so
you may want to turn them off, but the problem could still occur if you
turned them on at some point.
John
every 3 hours. How shouyld I fix it.
Microsoft SQL Server 2005 Tools Express Edition -- Install started.
Product: Microsoft SQL Server 2005 Tools Express Edition -- Error 2711. The
installer has encountered an unexpected error. The error code is 2711. The
specified Feature name ('SQL_Documentation') not found in Feature table.
Product: Microsoft SQL Server 2005 Tools Express Edition - Update 'GDR 1406
for SQL Server Tools and Workstation Components 2005 ENU (KB932557)' could
not be installed. Error code 1603. Additional information is available in th
e
log file C:\Program Files (x86)\Microsoft SQL Server\90\Setup
Bootstrap\LOG\Hotfix\SQLTools9_Hotfix_KB
932557_sqlrun_tools.msp.log.Hi
"fj" wrote:
> Here are the errors in event log. The installation packeage keeps trying
> every 3 hours. How shouyld I fix it.
>
> Microsoft SQL Server 2005 Tools Express Edition -- Install started.
> Product: Microsoft SQL Server 2005 Tools Express Edition -- Error 2711. Th
e
> installer has encountered an unexpected error. The error code is 2711. The
> specified Feature name ('SQL_Documentation') not found in Feature table.
> Product: Microsoft SQL Server 2005 Tools Express Edition - Update 'GDR 140
6
> for SQL Server Tools and Workstation Components 2005 ENU (KB932557)' could
> not be installed. Error code 1603. Additional information is available in
the
> log file C:\Program Files (x86)\Microsoft SQL Server\90\Setup
> Bootstrap\LOG\Hotfix\SQLTools9_Hotfix_KB
932557_sqlrun_tools.msp.log.
What does this log say?
It may be similar to http://support.microsoft.com/kb/916760/en-us
or http://support.microsoft.com/kb/834484/en-us i.e. the permissions or
folders expected may not exist or have the wrong permissions or the account
doing the install may not have enough permissions.
John|||Here is the part I found that might cause the problem. The specified Feature
name ('SQL_Documentation') not found in Feature table.
...
MSI (s) (80:34) [09:51:03:575]: Dir (target): Key:
payload_ul.97F81AF1_0E47_DC99_FF1F_C8B3B9A1E18E , Object:
C:\WINDOWS\winsxs\x86_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.42_none_
dc990e4797f81af1\
MSI (s) (80:34) [09:51:03:575]: Dir (target): Key: VSRetarget , Object:
C:\Program Files (x86)\Microsoft SQL Server\90\Tools\Binn\
MSI (s) (80:34) [09:51:03:575]: Note: 1: 2711 2: SQL_Documentation
MSI (s) (80:34) [09:51:03:887]: Product: Microsoft SQL Server 2005 Tools
Express Edition -- Error 2711. The installer has encountered an unexpected
error. The error code is 2711. The specified Feature name
('SQL_Documentation') not found in Feature table.
Error 2711. The installer has encountered an unexpected error. The error
code is 2711. The specified Feature name ('SQL_Documentation') not found in
Feature table.
Action ended 9:51:03: CostFinalize. Return value 3.
Action ended 9:51:03: INSTALL. Return value 3.
Property(S): ProductCode = {2750B389-A2D2-4953-99CA-27C1F2A8E6FD}
Property(S): ProductLanguage = 1033
Property(S): Manufacturer = Microsoft Corporation
Property(S): ProductVersion = 9.00.1399.06
Property(S): MEDIAPACKAGEPATH = \Setup\
...|||Hi
"fj" wrote:
> Here is the part I found that might cause the problem. The specified Featu
re
> name ('SQL_Documentation') not found in Feature table.
>
> ...
> MSI (s) (80:34) [09:51:03:575]: Dir (target): Key:
> payload_ul.97F81AF1_0E47_DC99_FF1F_C8B3B9A1E18E , Object:
> C:\WINDOWS\winsxs\x86_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.42_non
e_dc990e4797f81af1\
> MSI (s) (80:34) [09:51:03:575]: Dir (target): Key: VSRetarget , Object
:
> C:\Program Files (x86)\Microsoft SQL Server\90\Tools\Binn\
> MSI (s) (80:34) [09:51:03:575]: Note: 1: 2711 2: SQL_Documentation
> MSI (s) (80:34) [09:51:03:887]: Product: Microsoft SQL Server 2005 Too
ls
> Express Edition -- Error 2711. The installer has encountered an unexpected
> error. The error code is 2711. The specified Feature name
> ('SQL_Documentation') not found in Feature table.
> Error 2711. The installer has encountered an unexpected error. The error
> code is 2711. The specified Feature name ('SQL_Documentation') not found i
n
> Feature table.
> Action ended 9:51:03: CostFinalize. Return value 3.
> Action ended 9:51:03: INSTALL. Return value 3.
> Property(S): ProductCode = {2750B389-A2D2-4953-99CA-27C1F2A8E6FD}
> Property(S): ProductLanguage = 1033
> Property(S): Manufacturer = Microsoft Corporation
> Property(S): ProductVersion = 9.00.1399.06
> Property(S): MEDIAPACKAGEPATH = \Setup\
> ...
SQL Express is not one of the products that have been listed as affected by
the hotfix!
http://support.microsoft.com/kb/932557/en-us
John|||"John Bell" wrote:
> Hi
> "fj" wrote:
>
> SQL Express is not one of the products that have been listed as affected b
y
> the hotfix!
> http://support.microsoft.com/kb/932557/en-us
> John
Yeh, the VS 2005 is installed on the box but SQL Express is not. This fix is
installed by auto-update.
Now it seems like there is a scheduled job at somewhere, how I can stop or
remove it?
Is the hotfix referred by your link a fix to the problem?
Thanks
-FJ|||Hi
"fj" wrote:
>
> "John Bell" wrote:
>
> Yeh, the VS 2005 is installed on the box but SQL Express is not. This fix
is
> installed by auto-update.
> Now it seems like there is a scheduled job at somewhere, how I can stop or
> remove it?
> Is the hotfix referred by your link a fix to the problem?
> Thanks
> -FJ
It looks like you may have something left over then, if you have removed it.
You may want to check out:
http://msdn2.microsoft.com/en-us/vstudio/aa718704.aspx
or http://support.microsoft.com/kb/909967
John|||Thanks John,
Actually I found the problem is because I didn't install the client tool and
documents from the original 2005 SQL Server(64bit). BUT, the auto-update
downloaded the hotfix for the SQL server 2005 without checking if I need thi
s
fix. This hotfix (MSDN article number 932557) has "hardwired" update for
those tools and docs whch I don't have so the update failed.
Since the update is scheduled to launch every 3 hours, I am keep getting
this annoying errors.
Now my question still remains, how I can terminate the remaining update
manually? Is there a way to intercept MicroSoft's auto-update?
I don't think I need to re-install or remove VS2005 or SQL 2005. There is a
bug in this hotfix and Microsoft needs to know that.
Thanks
-FJ|||Hi
"fj" wrote:
> Thanks John,
> Actually I found the problem is because I didn't install the client tool a
nd
> documents from the original 2005 SQL Server(64bit). BUT, the auto-update
> downloaded the hotfix for the SQL server 2005 without checking if I need t
his
> fix. This hotfix (MSDN article number 932557) has "hardwired" update for
> those tools and docs whch I don't have so the update failed.
> Since the update is scheduled to launch every 3 hours, I am keep getting
> this annoying errors.
> Now my question still remains, how I can terminate the remaining update
> manually? Is there a way to intercept MicroSoft's auto-update?
> I don't think I need to re-install or remove VS2005 or SQL 2005. There is
a
> bug in this hotfix and Microsoft needs to know that.
> Thanks
> -FJ
Why not install the tools, allow the update or manually install the update
and then remove the tools?
Automatic updates are not something you would want on a production system so
you may want to turn them off, but the problem could still occur if you
turned them on at some point.
John
recent SQL 2005 hotfix creates problem
Here are the errors in event log. The installation packeage keeps trying
every 3 hours. How shouyld I fix it.
Microsoft SQL Server 2005 Tools Express Edition -- Install started.
Product: Microsoft SQL Server 2005 Tools Express Edition -- Error 2711. The
installer has encountered an unexpected error. The error code is 2711. The
specified Feature name ('SQL_Documentation') not found in Feature table.
Product: Microsoft SQL Server 2005 Tools Express Edition - Update 'GDR 1406
for SQL Server Tools and Workstation Components 2005 ENU (KB932557)' could
not be installed. Error code 1603. Additional information is available in the
log file C:\Program Files (x86)\Microsoft SQL Server\90\Setup
Bootstrap\LOG\Hotfix\SQLTools9_Hotfix_KB932557_sqlrun_tools.msp.log.Hi
"fj" wrote:
> Here are the errors in event log. The installation packeage keeps trying
> every 3 hours. How shouyld I fix it.
>
> Microsoft SQL Server 2005 Tools Express Edition -- Install started.
> Product: Microsoft SQL Server 2005 Tools Express Edition -- Error 2711. The
> installer has encountered an unexpected error. The error code is 2711. The
> specified Feature name ('SQL_Documentation') not found in Feature table.
> Product: Microsoft SQL Server 2005 Tools Express Edition - Update 'GDR 1406
> for SQL Server Tools and Workstation Components 2005 ENU (KB932557)' could
> not be installed. Error code 1603. Additional information is available in the
> log file C:\Program Files (x86)\Microsoft SQL Server\90\Setup
> Bootstrap\LOG\Hotfix\SQLTools9_Hotfix_KB932557_sqlrun_tools.msp.log.
What does this log say?
It may be similar to http://support.microsoft.com/kb/916760/en-us
or http://support.microsoft.com/kb/834484/en-us i.e. the permissions or
folders expected may not exist or have the wrong permissions or the account
doing the install may not have enough permissions.
John|||Here is the part I found that might cause the problem. The specified Feature
name ('SQL_Documentation') not found in Feature table.
...
MSI (s) (80:34) [09:51:03:575]: Dir (target): Key:
payload_ul.97F81AF1_0E47_DC99_FF1F_C8B3B9A1E18E , Object:
C:\WINDOWS\winsxs\x86_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.42_none_dc990e4797f81af1\
MSI (s) (80:34) [09:51:03:575]: Dir (target): Key: VSRetarget , Object:
C:\Program Files (x86)\Microsoft SQL Server\90\Tools\Binn\
MSI (s) (80:34) [09:51:03:575]: Note: 1: 2711 2: SQL_Documentation
MSI (s) (80:34) [09:51:03:887]: Product: Microsoft SQL Server 2005 Tools
Express Edition -- Error 2711. The installer has encountered an unexpected
error. The error code is 2711. The specified Feature name
('SQL_Documentation') not found in Feature table.
Error 2711. The installer has encountered an unexpected error. The error
code is 2711. The specified Feature name ('SQL_Documentation') not found in
Feature table.
Action ended 9:51:03: CostFinalize. Return value 3.
Action ended 9:51:03: INSTALL. Return value 3.
Property(S): ProductCode = {2750B389-A2D2-4953-99CA-27C1F2A8E6FD}
Property(S): ProductLanguage = 1033
Property(S): Manufacturer = Microsoft Corporation
Property(S): ProductVersion = 9.00.1399.06
Property(S): MEDIAPACKAGEPATH = \Setup\
...|||Hi
"fj" wrote:
> Here is the part I found that might cause the problem. The specified Feature
> name ('SQL_Documentation') not found in Feature table.
>
> ...
> MSI (s) (80:34) [09:51:03:575]: Dir (target): Key:
> payload_ul.97F81AF1_0E47_DC99_FF1F_C8B3B9A1E18E , Object:
> C:\WINDOWS\winsxs\x86_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.42_none_dc990e4797f81af1\
> MSI (s) (80:34) [09:51:03:575]: Dir (target): Key: VSRetarget , Object:
> C:\Program Files (x86)\Microsoft SQL Server\90\Tools\Binn\
> MSI (s) (80:34) [09:51:03:575]: Note: 1: 2711 2: SQL_Documentation
> MSI (s) (80:34) [09:51:03:887]: Product: Microsoft SQL Server 2005 Tools
> Express Edition -- Error 2711. The installer has encountered an unexpected
> error. The error code is 2711. The specified Feature name
> ('SQL_Documentation') not found in Feature table.
> Error 2711. The installer has encountered an unexpected error. The error
> code is 2711. The specified Feature name ('SQL_Documentation') not found in
> Feature table.
> Action ended 9:51:03: CostFinalize. Return value 3.
> Action ended 9:51:03: INSTALL. Return value 3.
> Property(S): ProductCode = {2750B389-A2D2-4953-99CA-27C1F2A8E6FD}
> Property(S): ProductLanguage = 1033
> Property(S): Manufacturer = Microsoft Corporation
> Property(S): ProductVersion = 9.00.1399.06
> Property(S): MEDIAPACKAGEPATH = \Setup\
> ...
SQL Express is not one of the products that have been listed as affected by
the hotfix!
http://support.microsoft.com/kb/932557/en-us
John|||"John Bell" wrote:
> Hi
> "fj" wrote:
> > Here is the part I found that might cause the problem. The specified Feature
> > name ('SQL_Documentation') not found in Feature table.
> >
> >
> >
> > ...
> > MSI (s) (80:34) [09:51:03:575]: Dir (target): Key:
> > payload_ul.97F81AF1_0E47_DC99_FF1F_C8B3B9A1E18E , Object:
> > C:\WINDOWS\winsxs\x86_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.42_none_dc990e4797f81af1\
> > MSI (s) (80:34) [09:51:03:575]: Dir (target): Key: VSRetarget , Object:
> > C:\Program Files (x86)\Microsoft SQL Server\90\Tools\Binn\
> > MSI (s) (80:34) [09:51:03:575]: Note: 1: 2711 2: SQL_Documentation
> > MSI (s) (80:34) [09:51:03:887]: Product: Microsoft SQL Server 2005 Tools
> > Express Edition -- Error 2711. The installer has encountered an unexpected
> > error. The error code is 2711. The specified Feature name
> > ('SQL_Documentation') not found in Feature table.
> >
> > Error 2711. The installer has encountered an unexpected error. The error
> > code is 2711. The specified Feature name ('SQL_Documentation') not found in
> > Feature table.
> > Action ended 9:51:03: CostFinalize. Return value 3.
> > Action ended 9:51:03: INSTALL. Return value 3.
> > Property(S): ProductCode = {2750B389-A2D2-4953-99CA-27C1F2A8E6FD}
> > Property(S): ProductLanguage = 1033
> > Property(S): Manufacturer = Microsoft Corporation
> > Property(S): ProductVersion = 9.00.1399.06
> > Property(S): MEDIAPACKAGEPATH = \Setup\
> > ...
> SQL Express is not one of the products that have been listed as affected by
> the hotfix!
> http://support.microsoft.com/kb/932557/en-us
> John
Yeh, the VS 2005 is installed on the box but SQL Express is not. This fix is
installed by auto-update.
Now it seems like there is a scheduled job at somewhere, how I can stop or
remove it?
Is the hotfix referred by your link a fix to the problem?
Thanks
-FJ|||Hi
"fj" wrote:
>
> "John Bell" wrote:
> > Hi
> >
> > "fj" wrote:
> >
> > > Here is the part I found that might cause the problem. The specified Feature
> > > name ('SQL_Documentation') not found in Feature table.
> > >
> > >
> > >
> > > ...
> > > MSI (s) (80:34) [09:51:03:575]: Dir (target): Key:
> > > payload_ul.97F81AF1_0E47_DC99_FF1F_C8B3B9A1E18E , Object:
> > > C:\WINDOWS\winsxs\x86_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.42_none_dc990e4797f81af1\
> > > MSI (s) (80:34) [09:51:03:575]: Dir (target): Key: VSRetarget , Object:
> > > C:\Program Files (x86)\Microsoft SQL Server\90\Tools\Binn\
> > > MSI (s) (80:34) [09:51:03:575]: Note: 1: 2711 2: SQL_Documentation
> > > MSI (s) (80:34) [09:51:03:887]: Product: Microsoft SQL Server 2005 Tools
> > > Express Edition -- Error 2711. The installer has encountered an unexpected
> > > error. The error code is 2711. The specified Feature name
> > > ('SQL_Documentation') not found in Feature table.
> > >
> > > Error 2711. The installer has encountered an unexpected error. The error
> > > code is 2711. The specified Feature name ('SQL_Documentation') not found in
> > > Feature table.
> > > Action ended 9:51:03: CostFinalize. Return value 3.
> > > Action ended 9:51:03: INSTALL. Return value 3.
> > > Property(S): ProductCode = {2750B389-A2D2-4953-99CA-27C1F2A8E6FD}
> > > Property(S): ProductLanguage = 1033
> > > Property(S): Manufacturer = Microsoft Corporation
> > > Property(S): ProductVersion = 9.00.1399.06
> > > Property(S): MEDIAPACKAGEPATH = \Setup\
> > > ...
> >
> > SQL Express is not one of the products that have been listed as affected by
> > the hotfix!
> > http://support.microsoft.com/kb/932557/en-us
> >
> > John
> Yeh, the VS 2005 is installed on the box but SQL Express is not. This fix is
> installed by auto-update.
> Now it seems like there is a scheduled job at somewhere, how I can stop or
> remove it?
> Is the hotfix referred by your link a fix to the problem?
> Thanks
> -FJ
It looks like you may have something left over then, if you have removed it.
You may want to check out:
http://msdn2.microsoft.com/en-us/vstudio/aa718704.aspx
or http://support.microsoft.com/kb/909967
John|||Thanks John,
Actually I found the problem is because I didn't install the client tool and
documents from the original 2005 SQL Server(64bit). BUT, the auto-update
downloaded the hotfix for the SQL server 2005 without checking if I need this
fix. This hotfix (MSDN article number 932557) has "hardwired" update for
those tools and docs whch I don't have so the update failed.
Since the update is scheduled to launch every 3 hours, I am keep getting
this annoying errors.
Now my question still remains, how I can terminate the remaining update
manually? Is there a way to intercept MicroSoft's auto-update?
I don't think I need to re-install or remove VS2005 or SQL 2005. There is a
bug in this hotfix and Microsoft needs to know that.
Thanks
-FJ|||Hi
"fj" wrote:
> Thanks John,
> Actually I found the problem is because I didn't install the client tool and
> documents from the original 2005 SQL Server(64bit). BUT, the auto-update
> downloaded the hotfix for the SQL server 2005 without checking if I need this
> fix. This hotfix (MSDN article number 932557) has "hardwired" update for
> those tools and docs whch I don't have so the update failed.
> Since the update is scheduled to launch every 3 hours, I am keep getting
> this annoying errors.
> Now my question still remains, how I can terminate the remaining update
> manually? Is there a way to intercept MicroSoft's auto-update?
> I don't think I need to re-install or remove VS2005 or SQL 2005. There is a
> bug in this hotfix and Microsoft needs to know that.
> Thanks
> -FJ
Why not install the tools, allow the update or manually install the update
and then remove the tools?
Automatic updates are not something you would want on a production system so
you may want to turn them off, but the problem could still occur if you
turned them on at some point.
John
every 3 hours. How shouyld I fix it.
Microsoft SQL Server 2005 Tools Express Edition -- Install started.
Product: Microsoft SQL Server 2005 Tools Express Edition -- Error 2711. The
installer has encountered an unexpected error. The error code is 2711. The
specified Feature name ('SQL_Documentation') not found in Feature table.
Product: Microsoft SQL Server 2005 Tools Express Edition - Update 'GDR 1406
for SQL Server Tools and Workstation Components 2005 ENU (KB932557)' could
not be installed. Error code 1603. Additional information is available in the
log file C:\Program Files (x86)\Microsoft SQL Server\90\Setup
Bootstrap\LOG\Hotfix\SQLTools9_Hotfix_KB932557_sqlrun_tools.msp.log.Hi
"fj" wrote:
> Here are the errors in event log. The installation packeage keeps trying
> every 3 hours. How shouyld I fix it.
>
> Microsoft SQL Server 2005 Tools Express Edition -- Install started.
> Product: Microsoft SQL Server 2005 Tools Express Edition -- Error 2711. The
> installer has encountered an unexpected error. The error code is 2711. The
> specified Feature name ('SQL_Documentation') not found in Feature table.
> Product: Microsoft SQL Server 2005 Tools Express Edition - Update 'GDR 1406
> for SQL Server Tools and Workstation Components 2005 ENU (KB932557)' could
> not be installed. Error code 1603. Additional information is available in the
> log file C:\Program Files (x86)\Microsoft SQL Server\90\Setup
> Bootstrap\LOG\Hotfix\SQLTools9_Hotfix_KB932557_sqlrun_tools.msp.log.
What does this log say?
It may be similar to http://support.microsoft.com/kb/916760/en-us
or http://support.microsoft.com/kb/834484/en-us i.e. the permissions or
folders expected may not exist or have the wrong permissions or the account
doing the install may not have enough permissions.
John|||Here is the part I found that might cause the problem. The specified Feature
name ('SQL_Documentation') not found in Feature table.
...
MSI (s) (80:34) [09:51:03:575]: Dir (target): Key:
payload_ul.97F81AF1_0E47_DC99_FF1F_C8B3B9A1E18E , Object:
C:\WINDOWS\winsxs\x86_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.42_none_dc990e4797f81af1\
MSI (s) (80:34) [09:51:03:575]: Dir (target): Key: VSRetarget , Object:
C:\Program Files (x86)\Microsoft SQL Server\90\Tools\Binn\
MSI (s) (80:34) [09:51:03:575]: Note: 1: 2711 2: SQL_Documentation
MSI (s) (80:34) [09:51:03:887]: Product: Microsoft SQL Server 2005 Tools
Express Edition -- Error 2711. The installer has encountered an unexpected
error. The error code is 2711. The specified Feature name
('SQL_Documentation') not found in Feature table.
Error 2711. The installer has encountered an unexpected error. The error
code is 2711. The specified Feature name ('SQL_Documentation') not found in
Feature table.
Action ended 9:51:03: CostFinalize. Return value 3.
Action ended 9:51:03: INSTALL. Return value 3.
Property(S): ProductCode = {2750B389-A2D2-4953-99CA-27C1F2A8E6FD}
Property(S): ProductLanguage = 1033
Property(S): Manufacturer = Microsoft Corporation
Property(S): ProductVersion = 9.00.1399.06
Property(S): MEDIAPACKAGEPATH = \Setup\
...|||Hi
"fj" wrote:
> Here is the part I found that might cause the problem. The specified Feature
> name ('SQL_Documentation') not found in Feature table.
>
> ...
> MSI (s) (80:34) [09:51:03:575]: Dir (target): Key:
> payload_ul.97F81AF1_0E47_DC99_FF1F_C8B3B9A1E18E , Object:
> C:\WINDOWS\winsxs\x86_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.42_none_dc990e4797f81af1\
> MSI (s) (80:34) [09:51:03:575]: Dir (target): Key: VSRetarget , Object:
> C:\Program Files (x86)\Microsoft SQL Server\90\Tools\Binn\
> MSI (s) (80:34) [09:51:03:575]: Note: 1: 2711 2: SQL_Documentation
> MSI (s) (80:34) [09:51:03:887]: Product: Microsoft SQL Server 2005 Tools
> Express Edition -- Error 2711. The installer has encountered an unexpected
> error. The error code is 2711. The specified Feature name
> ('SQL_Documentation') not found in Feature table.
> Error 2711. The installer has encountered an unexpected error. The error
> code is 2711. The specified Feature name ('SQL_Documentation') not found in
> Feature table.
> Action ended 9:51:03: CostFinalize. Return value 3.
> Action ended 9:51:03: INSTALL. Return value 3.
> Property(S): ProductCode = {2750B389-A2D2-4953-99CA-27C1F2A8E6FD}
> Property(S): ProductLanguage = 1033
> Property(S): Manufacturer = Microsoft Corporation
> Property(S): ProductVersion = 9.00.1399.06
> Property(S): MEDIAPACKAGEPATH = \Setup\
> ...
SQL Express is not one of the products that have been listed as affected by
the hotfix!
http://support.microsoft.com/kb/932557/en-us
John|||"John Bell" wrote:
> Hi
> "fj" wrote:
> > Here is the part I found that might cause the problem. The specified Feature
> > name ('SQL_Documentation') not found in Feature table.
> >
> >
> >
> > ...
> > MSI (s) (80:34) [09:51:03:575]: Dir (target): Key:
> > payload_ul.97F81AF1_0E47_DC99_FF1F_C8B3B9A1E18E , Object:
> > C:\WINDOWS\winsxs\x86_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.42_none_dc990e4797f81af1\
> > MSI (s) (80:34) [09:51:03:575]: Dir (target): Key: VSRetarget , Object:
> > C:\Program Files (x86)\Microsoft SQL Server\90\Tools\Binn\
> > MSI (s) (80:34) [09:51:03:575]: Note: 1: 2711 2: SQL_Documentation
> > MSI (s) (80:34) [09:51:03:887]: Product: Microsoft SQL Server 2005 Tools
> > Express Edition -- Error 2711. The installer has encountered an unexpected
> > error. The error code is 2711. The specified Feature name
> > ('SQL_Documentation') not found in Feature table.
> >
> > Error 2711. The installer has encountered an unexpected error. The error
> > code is 2711. The specified Feature name ('SQL_Documentation') not found in
> > Feature table.
> > Action ended 9:51:03: CostFinalize. Return value 3.
> > Action ended 9:51:03: INSTALL. Return value 3.
> > Property(S): ProductCode = {2750B389-A2D2-4953-99CA-27C1F2A8E6FD}
> > Property(S): ProductLanguage = 1033
> > Property(S): Manufacturer = Microsoft Corporation
> > Property(S): ProductVersion = 9.00.1399.06
> > Property(S): MEDIAPACKAGEPATH = \Setup\
> > ...
> SQL Express is not one of the products that have been listed as affected by
> the hotfix!
> http://support.microsoft.com/kb/932557/en-us
> John
Yeh, the VS 2005 is installed on the box but SQL Express is not. This fix is
installed by auto-update.
Now it seems like there is a scheduled job at somewhere, how I can stop or
remove it?
Is the hotfix referred by your link a fix to the problem?
Thanks
-FJ|||Hi
"fj" wrote:
>
> "John Bell" wrote:
> > Hi
> >
> > "fj" wrote:
> >
> > > Here is the part I found that might cause the problem. The specified Feature
> > > name ('SQL_Documentation') not found in Feature table.
> > >
> > >
> > >
> > > ...
> > > MSI (s) (80:34) [09:51:03:575]: Dir (target): Key:
> > > payload_ul.97F81AF1_0E47_DC99_FF1F_C8B3B9A1E18E , Object:
> > > C:\WINDOWS\winsxs\x86_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.42_none_dc990e4797f81af1\
> > > MSI (s) (80:34) [09:51:03:575]: Dir (target): Key: VSRetarget , Object:
> > > C:\Program Files (x86)\Microsoft SQL Server\90\Tools\Binn\
> > > MSI (s) (80:34) [09:51:03:575]: Note: 1: 2711 2: SQL_Documentation
> > > MSI (s) (80:34) [09:51:03:887]: Product: Microsoft SQL Server 2005 Tools
> > > Express Edition -- Error 2711. The installer has encountered an unexpected
> > > error. The error code is 2711. The specified Feature name
> > > ('SQL_Documentation') not found in Feature table.
> > >
> > > Error 2711. The installer has encountered an unexpected error. The error
> > > code is 2711. The specified Feature name ('SQL_Documentation') not found in
> > > Feature table.
> > > Action ended 9:51:03: CostFinalize. Return value 3.
> > > Action ended 9:51:03: INSTALL. Return value 3.
> > > Property(S): ProductCode = {2750B389-A2D2-4953-99CA-27C1F2A8E6FD}
> > > Property(S): ProductLanguage = 1033
> > > Property(S): Manufacturer = Microsoft Corporation
> > > Property(S): ProductVersion = 9.00.1399.06
> > > Property(S): MEDIAPACKAGEPATH = \Setup\
> > > ...
> >
> > SQL Express is not one of the products that have been listed as affected by
> > the hotfix!
> > http://support.microsoft.com/kb/932557/en-us
> >
> > John
> Yeh, the VS 2005 is installed on the box but SQL Express is not. This fix is
> installed by auto-update.
> Now it seems like there is a scheduled job at somewhere, how I can stop or
> remove it?
> Is the hotfix referred by your link a fix to the problem?
> Thanks
> -FJ
It looks like you may have something left over then, if you have removed it.
You may want to check out:
http://msdn2.microsoft.com/en-us/vstudio/aa718704.aspx
or http://support.microsoft.com/kb/909967
John|||Thanks John,
Actually I found the problem is because I didn't install the client tool and
documents from the original 2005 SQL Server(64bit). BUT, the auto-update
downloaded the hotfix for the SQL server 2005 without checking if I need this
fix. This hotfix (MSDN article number 932557) has "hardwired" update for
those tools and docs whch I don't have so the update failed.
Since the update is scheduled to launch every 3 hours, I am keep getting
this annoying errors.
Now my question still remains, how I can terminate the remaining update
manually? Is there a way to intercept MicroSoft's auto-update?
I don't think I need to re-install or remove VS2005 or SQL 2005. There is a
bug in this hotfix and Microsoft needs to know that.
Thanks
-FJ|||Hi
"fj" wrote:
> Thanks John,
> Actually I found the problem is because I didn't install the client tool and
> documents from the original 2005 SQL Server(64bit). BUT, the auto-update
> downloaded the hotfix for the SQL server 2005 without checking if I need this
> fix. This hotfix (MSDN article number 932557) has "hardwired" update for
> those tools and docs whch I don't have so the update failed.
> Since the update is scheduled to launch every 3 hours, I am keep getting
> this annoying errors.
> Now my question still remains, how I can terminate the remaining update
> manually? Is there a way to intercept MicroSoft's auto-update?
> I don't think I need to re-install or remove VS2005 or SQL 2005. There is a
> bug in this hotfix and Microsoft needs to know that.
> Thanks
> -FJ
Why not install the tools, allow the update or manually install the update
and then remove the tools?
Automatic updates are not something you would want on a production system so
you may want to turn them off, but the problem could still occur if you
turned them on at some point.
John
Wednesday, March 28, 2012
RECEIVE in transactions
Hello!
I have an an event notifications audit solution that I'm working on. I am
using this activation procedure.
CREATE PROCEDURE dbo.AuditReceive
AS
DECLARE @.AuditMessage TABLE (EventData xml);
RECEIVECAST(message_body AS XML)
FROM AuditQueue
INTO @.AuditMessage
INSERT INTO dbo.Audit (PostTime, EventType, LoginName, UserName, ServerName,
DatabaseName, ObjectType, SchemaName, ObjectName, EventData)
SELECTCAST(EventData.query('data(//PostTime)') AS varchar(23)),
CAST(EventData.query('data(//EventType)') AS sysname),
CAST(EventData.query('data(//LoginName)') AS sysname),
CAST(EventData.query('data(//UserName)') AS sysname),
CAST(EventData.query('data(//ServerName)') AS sysname),
CAST(EventData.query('data(//DatabaseName)') AS sysname),
CAST(EventData.query('data(//ObjectType)') AS sysname),
CAST(EventData.query('data(//SchemaName)') AS sysname),
CAST(EventData.query('data(//ObjectName)') AS sysname),
EventData
FROM @.AuditMessage
It's working nicely, but there is one weakness. I would like to have the
RECEIVE and the INSERT as a transaction, but I can't get it working. Is it
not possible to use RECEIVE in transactions?
Best regards
Ola Hallengren
the books on line tell:
"The RECEIVE statement removes received messages from the queue unless the
queue specifies message retention. When the RETENTION setting for the queue
is ON, the RECEIVE statement updates the status column to 1 and leaves the
messages in the queue. When a transaction that contains a RECEIVE statement
rolls back, all changes to the queue within the transaction are also rolled
back, returning messages to the queue."
Could you expose the source code of the transaction you tried? there's
something wrong but i cannot imagine what without seeing an example.
Gilberto Zampatti
"Ola Hallengren" wrote:
> Hello!
> I have an an event notifications audit solution that I'm working on. I am
> using this activation procedure.
> CREATE PROCEDURE dbo.AuditReceive
> AS
> DECLARE @.AuditMessage TABLE (EventData xml);
> RECEIVECAST(message_body AS XML)
> FROM AuditQueue
> INTO @.AuditMessage
> INSERT INTO dbo.Audit (PostTime, EventType, LoginName, UserName, ServerName,
> DatabaseName, ObjectType, SchemaName, ObjectName, EventData)
> SELECTCAST(EventData.query('data(//PostTime)') AS varchar(23)),
> CAST(EventData.query('data(//EventType)') AS sysname),
> CAST(EventData.query('data(//LoginName)') AS sysname),
> CAST(EventData.query('data(//UserName)') AS sysname),
> CAST(EventData.query('data(//ServerName)') AS sysname),
> CAST(EventData.query('data(//DatabaseName)') AS sysname),
> CAST(EventData.query('data(//ObjectType)') AS sysname),
> CAST(EventData.query('data(//SchemaName)') AS sysname),
> CAST(EventData.query('data(//ObjectName)') AS sysname),
> EventData
> FROM @.AuditMessage
> It's working nicely, but there is one weakness. I would like to have the
> RECEIVE and the INSERT as a transaction, but I can't get it working. Is it
> not possible to use RECEIVE in transactions?
> Best regards
> Ola Hallengren
|||> I would like to have the
> RECEIVE and the INSERT as a transaction, but I can't get it working.
In what way doesn't it work? Error messages? Something else?
> Is it
> not possible to use RECEIVE in transactions?
Yes, but you want to be careful. Say you determine that you can't process this message so you
rollback. Since messages are received in order, you will just read the same message next time.
Essentially, you end up in an endless loop. This is called a "poison message" and after 5 rollbacks
in a row, SB will disable the queue. I strongly suggest you get Roger Wolter's book on SB, this
topic is handled in chapter 8.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Ola Hallengren" <OlaHallengren@.discussions.microsoft.com> wrote in message
news:38D8CD3E-9452-4EAE-A300-DB0F9B3A6F53@.microsoft.com...
> Hello!
> I have an an event notifications audit solution that I'm working on. I am
> using this activation procedure.
> CREATE PROCEDURE dbo.AuditReceive
> AS
> DECLARE @.AuditMessage TABLE (EventData xml);
> RECEIVE CAST(message_body AS XML)
> FROM AuditQueue
> INTO @.AuditMessage
> INSERT INTO dbo.Audit (PostTime, EventType, LoginName, UserName, ServerName,
> DatabaseName, ObjectType, SchemaName, ObjectName, EventData)
> SELECT CAST(EventData.query('data(//PostTime)') AS varchar(23)),
> CAST(EventData.query('data(//EventType)') AS sysname),
> CAST(EventData.query('data(//LoginName)') AS sysname),
> CAST(EventData.query('data(//UserName)') AS sysname),
> CAST(EventData.query('data(//ServerName)') AS sysname),
> CAST(EventData.query('data(//DatabaseName)') AS sysname),
> CAST(EventData.query('data(//ObjectType)') AS sysname),
> CAST(EventData.query('data(//SchemaName)') AS sysname),
> CAST(EventData.query('data(//ObjectName)') AS sysname),
> EventData
> FROM @.AuditMessage
> It's working nicely, but there is one weakness. I would like to have the
> RECEIVE and the INSERT as a transaction, but I can't get it working. Is it
> not possible to use RECEIVE in transactions?
> Best regards
> Ola Hallengren
|||I overlooked one comment in Books Online"
"If the RECEIVE statement is not the first statement in a batch or stored
procedure, the preceding statement must be terminated with a semicolon (;),
the Transact-SQL statement terminator."
Now it's working.
About poisonous messages I have been doing some testing on that by changing
the datatypes in my auditing table, so that the insert fails. The queue then
gets deactivated as you write.
Now it's not so likely that the insert fails, since I have matching
datatypes. I mostly would like to have a transaction in case of a server
crash.
I have ordered the Roger Walters book today.
Thanks for you help.
/Ola
"Tibor Karaszi" wrote:
> In what way doesn't it work? Error messages? Something else?
>
> Yes, but you want to be careful. Say you determine that you can't process this message so you
> rollback. Since messages are received in order, you will just read the same message next time.
> Essentially, you end up in an endless loop. This is called a "poison message" and after 5 rollbacks
> in a row, SB will disable the queue. I strongly suggest you get Roger Wolter's book on SB, this
> topic is handled in chapter 8.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Ola Hallengren" <OlaHallengren@.discussions.microsoft.com> wrote in message
> news:38D8CD3E-9452-4EAE-A300-DB0F9B3A6F53@.microsoft.com...
>
I have an an event notifications audit solution that I'm working on. I am
using this activation procedure.
CREATE PROCEDURE dbo.AuditReceive
AS
DECLARE @.AuditMessage TABLE (EventData xml);
RECEIVECAST(message_body AS XML)
FROM AuditQueue
INTO @.AuditMessage
INSERT INTO dbo.Audit (PostTime, EventType, LoginName, UserName, ServerName,
DatabaseName, ObjectType, SchemaName, ObjectName, EventData)
SELECTCAST(EventData.query('data(//PostTime)') AS varchar(23)),
CAST(EventData.query('data(//EventType)') AS sysname),
CAST(EventData.query('data(//LoginName)') AS sysname),
CAST(EventData.query('data(//UserName)') AS sysname),
CAST(EventData.query('data(//ServerName)') AS sysname),
CAST(EventData.query('data(//DatabaseName)') AS sysname),
CAST(EventData.query('data(//ObjectType)') AS sysname),
CAST(EventData.query('data(//SchemaName)') AS sysname),
CAST(EventData.query('data(//ObjectName)') AS sysname),
EventData
FROM @.AuditMessage
It's working nicely, but there is one weakness. I would like to have the
RECEIVE and the INSERT as a transaction, but I can't get it working. Is it
not possible to use RECEIVE in transactions?
Best regards
Ola Hallengren
the books on line tell:
"The RECEIVE statement removes received messages from the queue unless the
queue specifies message retention. When the RETENTION setting for the queue
is ON, the RECEIVE statement updates the status column to 1 and leaves the
messages in the queue. When a transaction that contains a RECEIVE statement
rolls back, all changes to the queue within the transaction are also rolled
back, returning messages to the queue."
Could you expose the source code of the transaction you tried? there's
something wrong but i cannot imagine what without seeing an example.
Gilberto Zampatti
"Ola Hallengren" wrote:
> Hello!
> I have an an event notifications audit solution that I'm working on. I am
> using this activation procedure.
> CREATE PROCEDURE dbo.AuditReceive
> AS
> DECLARE @.AuditMessage TABLE (EventData xml);
> RECEIVECAST(message_body AS XML)
> FROM AuditQueue
> INTO @.AuditMessage
> INSERT INTO dbo.Audit (PostTime, EventType, LoginName, UserName, ServerName,
> DatabaseName, ObjectType, SchemaName, ObjectName, EventData)
> SELECTCAST(EventData.query('data(//PostTime)') AS varchar(23)),
> CAST(EventData.query('data(//EventType)') AS sysname),
> CAST(EventData.query('data(//LoginName)') AS sysname),
> CAST(EventData.query('data(//UserName)') AS sysname),
> CAST(EventData.query('data(//ServerName)') AS sysname),
> CAST(EventData.query('data(//DatabaseName)') AS sysname),
> CAST(EventData.query('data(//ObjectType)') AS sysname),
> CAST(EventData.query('data(//SchemaName)') AS sysname),
> CAST(EventData.query('data(//ObjectName)') AS sysname),
> EventData
> FROM @.AuditMessage
> It's working nicely, but there is one weakness. I would like to have the
> RECEIVE and the INSERT as a transaction, but I can't get it working. Is it
> not possible to use RECEIVE in transactions?
> Best regards
> Ola Hallengren
|||> I would like to have the
> RECEIVE and the INSERT as a transaction, but I can't get it working.
In what way doesn't it work? Error messages? Something else?
> Is it
> not possible to use RECEIVE in transactions?
Yes, but you want to be careful. Say you determine that you can't process this message so you
rollback. Since messages are received in order, you will just read the same message next time.
Essentially, you end up in an endless loop. This is called a "poison message" and after 5 rollbacks
in a row, SB will disable the queue. I strongly suggest you get Roger Wolter's book on SB, this
topic is handled in chapter 8.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Ola Hallengren" <OlaHallengren@.discussions.microsoft.com> wrote in message
news:38D8CD3E-9452-4EAE-A300-DB0F9B3A6F53@.microsoft.com...
> Hello!
> I have an an event notifications audit solution that I'm working on. I am
> using this activation procedure.
> CREATE PROCEDURE dbo.AuditReceive
> AS
> DECLARE @.AuditMessage TABLE (EventData xml);
> RECEIVE CAST(message_body AS XML)
> FROM AuditQueue
> INTO @.AuditMessage
> INSERT INTO dbo.Audit (PostTime, EventType, LoginName, UserName, ServerName,
> DatabaseName, ObjectType, SchemaName, ObjectName, EventData)
> SELECT CAST(EventData.query('data(//PostTime)') AS varchar(23)),
> CAST(EventData.query('data(//EventType)') AS sysname),
> CAST(EventData.query('data(//LoginName)') AS sysname),
> CAST(EventData.query('data(//UserName)') AS sysname),
> CAST(EventData.query('data(//ServerName)') AS sysname),
> CAST(EventData.query('data(//DatabaseName)') AS sysname),
> CAST(EventData.query('data(//ObjectType)') AS sysname),
> CAST(EventData.query('data(//SchemaName)') AS sysname),
> CAST(EventData.query('data(//ObjectName)') AS sysname),
> EventData
> FROM @.AuditMessage
> It's working nicely, but there is one weakness. I would like to have the
> RECEIVE and the INSERT as a transaction, but I can't get it working. Is it
> not possible to use RECEIVE in transactions?
> Best regards
> Ola Hallengren
|||I overlooked one comment in Books Online"
"If the RECEIVE statement is not the first statement in a batch or stored
procedure, the preceding statement must be terminated with a semicolon (;),
the Transact-SQL statement terminator."
Now it's working.
About poisonous messages I have been doing some testing on that by changing
the datatypes in my auditing table, so that the insert fails. The queue then
gets deactivated as you write.
Now it's not so likely that the insert fails, since I have matching
datatypes. I mostly would like to have a transaction in case of a server
crash.
I have ordered the Roger Walters book today.
Thanks for you help.
/Ola
"Tibor Karaszi" wrote:
> In what way doesn't it work? Error messages? Something else?
>
> Yes, but you want to be careful. Say you determine that you can't process this message so you
> rollback. Since messages are received in order, you will just read the same message next time.
> Essentially, you end up in an endless loop. This is called a "poison message" and after 5 rollbacks
> in a row, SB will disable the queue. I strongly suggest you get Roger Wolter's book on SB, this
> topic is handled in chapter 8.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Ola Hallengren" <OlaHallengren@.discussions.microsoft.com> wrote in message
> news:38D8CD3E-9452-4EAE-A300-DB0F9B3A6F53@.microsoft.com...
>
RECEIVE in transactions
Hello!
I have an an event notifications audit solution that I'm working on. I am
using this activation procedure.
CREATE PROCEDURE dbo.AuditReceive
AS
DECLARE @.AuditMessage TABLE (EventData xml);
RECEIVE CAST(message_body AS XML)
FROM AuditQueue
INTO @.AuditMessage
INSERT INTO dbo.Audit (PostTime, EventType, LoginName, UserName, ServerName,
DatabaseName, ObjectType, SchemaName, ObjectName, EventData)
SELECT CAST(EventData.query('data(//PostTime)') AS varchar(23)),
CAST(EventData.query('data(//EventType)') AS sysname),
CAST(EventData.query('data(//LoginName)') AS sysname),
CAST(EventData.query('data(//UserName)') AS sysname),
CAST(EventData.query('data(//ServerName)') AS sysname),
CAST(EventData.query('data(//DatabaseName)') AS sysname),
CAST(EventData.query('data(//ObjectType)') AS sysname),
CAST(EventData.query('data(//SchemaName)') AS sysname),
CAST(EventData.query('data(//ObjectName)') AS sysname),
EventData
FROM @.AuditMessage
It's working nicely, but there is one weakness. I would like to have the
RECEIVE and the INSERT as a transaction, but I can't get it working. Is it
not possible to use RECEIVE in transactions?
Best regards
Ola Hallengrenthe books on line tell:
"The RECEIVE statement removes received messages from the queue unless the
queue specifies message retention. When the RETENTION setting for the queue
is ON, the RECEIVE statement updates the status column to 1 and leaves the
messages in the queue. When a transaction that contains a RECEIVE statement
rolls back, all changes to the queue within the transaction are also rolled
back, returning messages to the queue."
Could you expose the source code of the transaction you tried? there's
something wrong but i cannot imagine what without seeing an example.
Gilberto Zampatti
"Ola Hallengren" wrote:
> Hello!
> I have an an event notifications audit solution that I'm working on. I am
> using this activation procedure.
> CREATE PROCEDURE dbo.AuditReceive
> AS
> DECLARE @.AuditMessage TABLE (EventData xml);
> RECEIVE CAST(message_body AS XML)
> FROM AuditQueue
> INTO @.AuditMessage
> INSERT INTO dbo.Audit (PostTime, EventType, LoginName, UserName, ServerName,
> DatabaseName, ObjectType, SchemaName, ObjectName, EventData)
> SELECT CAST(EventData.query('data(//PostTime)') AS varchar(23)),
> CAST(EventData.query('data(//EventType)') AS sysname),
> CAST(EventData.query('data(//LoginName)') AS sysname),
> CAST(EventData.query('data(//UserName)') AS sysname),
> CAST(EventData.query('data(//ServerName)') AS sysname),
> CAST(EventData.query('data(//DatabaseName)') AS sysname),
> CAST(EventData.query('data(//ObjectType)') AS sysname),
> CAST(EventData.query('data(//SchemaName)') AS sysname),
> CAST(EventData.query('data(//ObjectName)') AS sysname),
> EventData
> FROM @.AuditMessage
> It's working nicely, but there is one weakness. I would like to have the
> RECEIVE and the INSERT as a transaction, but I can't get it working. Is it
> not possible to use RECEIVE in transactions?
> Best regards
> Ola Hallengren|||> I would like to have the
> RECEIVE and the INSERT as a transaction, but I can't get it working.
In what way doesn't it work? Error messages? Something else?
> Is it
> not possible to use RECEIVE in transactions?
Yes, but you want to be careful. Say you determine that you can't process this message so you
rollback. Since messages are received in order, you will just read the same message next time.
Essentially, you end up in an endless loop. This is called a "poison message" and after 5 rollbacks
in a row, SB will disable the queue. I strongly suggest you get Roger Wolter's book on SB, this
topic is handled in chapter 8.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Ola Hallengren" <OlaHallengren@.discussions.microsoft.com> wrote in message
news:38D8CD3E-9452-4EAE-A300-DB0F9B3A6F53@.microsoft.com...
> Hello!
> I have an an event notifications audit solution that I'm working on. I am
> using this activation procedure.
> CREATE PROCEDURE dbo.AuditReceive
> AS
> DECLARE @.AuditMessage TABLE (EventData xml);
> RECEIVE CAST(message_body AS XML)
> FROM AuditQueue
> INTO @.AuditMessage
> INSERT INTO dbo.Audit (PostTime, EventType, LoginName, UserName, ServerName,
> DatabaseName, ObjectType, SchemaName, ObjectName, EventData)
> SELECT CAST(EventData.query('data(//PostTime)') AS varchar(23)),
> CAST(EventData.query('data(//EventType)') AS sysname),
> CAST(EventData.query('data(//LoginName)') AS sysname),
> CAST(EventData.query('data(//UserName)') AS sysname),
> CAST(EventData.query('data(//ServerName)') AS sysname),
> CAST(EventData.query('data(//DatabaseName)') AS sysname),
> CAST(EventData.query('data(//ObjectType)') AS sysname),
> CAST(EventData.query('data(//SchemaName)') AS sysname),
> CAST(EventData.query('data(//ObjectName)') AS sysname),
> EventData
> FROM @.AuditMessage
> It's working nicely, but there is one weakness. I would like to have the
> RECEIVE and the INSERT as a transaction, but I can't get it working. Is it
> not possible to use RECEIVE in transactions?
> Best regards
> Ola Hallengren|||I overlooked one comment in Books Online"
"If the RECEIVE statement is not the first statement in a batch or stored
procedure, the preceding statement must be terminated with a semicolon (;),
the Transact-SQL statement terminator."
Now it's working.
About poisonous messages I have been doing some testing on that by changing
the datatypes in my auditing table, so that the insert fails. The queue then
gets deactivated as you write.
Now it's not so likely that the insert fails, since I have matching
datatypes. I mostly would like to have a transaction in case of a server
crash.
I have ordered the Roger Walters book today.
Thanks for you help.
/Ola
"Tibor Karaszi" wrote:
> > I would like to have the
> > RECEIVE and the INSERT as a transaction, but I can't get it working.
> In what way doesn't it work? Error messages? Something else?
>
> > Is it
> > not possible to use RECEIVE in transactions?
> Yes, but you want to be careful. Say you determine that you can't process this message so you
> rollback. Since messages are received in order, you will just read the same message next time.
> Essentially, you end up in an endless loop. This is called a "poison message" and after 5 rollbacks
> in a row, SB will disable the queue. I strongly suggest you get Roger Wolter's book on SB, this
> topic is handled in chapter 8.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Ola Hallengren" <OlaHallengren@.discussions.microsoft.com> wrote in message
> news:38D8CD3E-9452-4EAE-A300-DB0F9B3A6F53@.microsoft.com...
> > Hello!
> >
> > I have an an event notifications audit solution that I'm working on. I am
> > using this activation procedure.
> >
> > CREATE PROCEDURE dbo.AuditReceive
> > AS
> > DECLARE @.AuditMessage TABLE (EventData xml);
> >
> > RECEIVE CAST(message_body AS XML)
> > FROM AuditQueue
> > INTO @.AuditMessage
> >
> > INSERT INTO dbo.Audit (PostTime, EventType, LoginName, UserName, ServerName,
> > DatabaseName, ObjectType, SchemaName, ObjectName, EventData)
> > SELECT CAST(EventData.query('data(//PostTime)') AS varchar(23)),
> > CAST(EventData.query('data(//EventType)') AS sysname),
> > CAST(EventData.query('data(//LoginName)') AS sysname),
> > CAST(EventData.query('data(//UserName)') AS sysname),
> > CAST(EventData.query('data(//ServerName)') AS sysname),
> > CAST(EventData.query('data(//DatabaseName)') AS sysname),
> > CAST(EventData.query('data(//ObjectType)') AS sysname),
> > CAST(EventData.query('data(//SchemaName)') AS sysname),
> > CAST(EventData.query('data(//ObjectName)') AS sysname),
> > EventData
> > FROM @.AuditMessage
> >
> > It's working nicely, but there is one weakness. I would like to have the
> > RECEIVE and the INSERT as a transaction, but I can't get it working. Is it
> > not possible to use RECEIVE in transactions?
> >
> > Best regards
> >
> > Ola Hallengren
>sql
I have an an event notifications audit solution that I'm working on. I am
using this activation procedure.
CREATE PROCEDURE dbo.AuditReceive
AS
DECLARE @.AuditMessage TABLE (EventData xml);
RECEIVE CAST(message_body AS XML)
FROM AuditQueue
INTO @.AuditMessage
INSERT INTO dbo.Audit (PostTime, EventType, LoginName, UserName, ServerName,
DatabaseName, ObjectType, SchemaName, ObjectName, EventData)
SELECT CAST(EventData.query('data(//PostTime)') AS varchar(23)),
CAST(EventData.query('data(//EventType)') AS sysname),
CAST(EventData.query('data(//LoginName)') AS sysname),
CAST(EventData.query('data(//UserName)') AS sysname),
CAST(EventData.query('data(//ServerName)') AS sysname),
CAST(EventData.query('data(//DatabaseName)') AS sysname),
CAST(EventData.query('data(//ObjectType)') AS sysname),
CAST(EventData.query('data(//SchemaName)') AS sysname),
CAST(EventData.query('data(//ObjectName)') AS sysname),
EventData
FROM @.AuditMessage
It's working nicely, but there is one weakness. I would like to have the
RECEIVE and the INSERT as a transaction, but I can't get it working. Is it
not possible to use RECEIVE in transactions?
Best regards
Ola Hallengrenthe books on line tell:
"The RECEIVE statement removes received messages from the queue unless the
queue specifies message retention. When the RETENTION setting for the queue
is ON, the RECEIVE statement updates the status column to 1 and leaves the
messages in the queue. When a transaction that contains a RECEIVE statement
rolls back, all changes to the queue within the transaction are also rolled
back, returning messages to the queue."
Could you expose the source code of the transaction you tried? there's
something wrong but i cannot imagine what without seeing an example.
Gilberto Zampatti
"Ola Hallengren" wrote:
> Hello!
> I have an an event notifications audit solution that I'm working on. I am
> using this activation procedure.
> CREATE PROCEDURE dbo.AuditReceive
> AS
> DECLARE @.AuditMessage TABLE (EventData xml);
> RECEIVE CAST(message_body AS XML)
> FROM AuditQueue
> INTO @.AuditMessage
> INSERT INTO dbo.Audit (PostTime, EventType, LoginName, UserName, ServerName,
> DatabaseName, ObjectType, SchemaName, ObjectName, EventData)
> SELECT CAST(EventData.query('data(//PostTime)') AS varchar(23)),
> CAST(EventData.query('data(//EventType)') AS sysname),
> CAST(EventData.query('data(//LoginName)') AS sysname),
> CAST(EventData.query('data(//UserName)') AS sysname),
> CAST(EventData.query('data(//ServerName)') AS sysname),
> CAST(EventData.query('data(//DatabaseName)') AS sysname),
> CAST(EventData.query('data(//ObjectType)') AS sysname),
> CAST(EventData.query('data(//SchemaName)') AS sysname),
> CAST(EventData.query('data(//ObjectName)') AS sysname),
> EventData
> FROM @.AuditMessage
> It's working nicely, but there is one weakness. I would like to have the
> RECEIVE and the INSERT as a transaction, but I can't get it working. Is it
> not possible to use RECEIVE in transactions?
> Best regards
> Ola Hallengren|||> I would like to have the
> RECEIVE and the INSERT as a transaction, but I can't get it working.
In what way doesn't it work? Error messages? Something else?
> Is it
> not possible to use RECEIVE in transactions?
Yes, but you want to be careful. Say you determine that you can't process this message so you
rollback. Since messages are received in order, you will just read the same message next time.
Essentially, you end up in an endless loop. This is called a "poison message" and after 5 rollbacks
in a row, SB will disable the queue. I strongly suggest you get Roger Wolter's book on SB, this
topic is handled in chapter 8.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Ola Hallengren" <OlaHallengren@.discussions.microsoft.com> wrote in message
news:38D8CD3E-9452-4EAE-A300-DB0F9B3A6F53@.microsoft.com...
> Hello!
> I have an an event notifications audit solution that I'm working on. I am
> using this activation procedure.
> CREATE PROCEDURE dbo.AuditReceive
> AS
> DECLARE @.AuditMessage TABLE (EventData xml);
> RECEIVE CAST(message_body AS XML)
> FROM AuditQueue
> INTO @.AuditMessage
> INSERT INTO dbo.Audit (PostTime, EventType, LoginName, UserName, ServerName,
> DatabaseName, ObjectType, SchemaName, ObjectName, EventData)
> SELECT CAST(EventData.query('data(//PostTime)') AS varchar(23)),
> CAST(EventData.query('data(//EventType)') AS sysname),
> CAST(EventData.query('data(//LoginName)') AS sysname),
> CAST(EventData.query('data(//UserName)') AS sysname),
> CAST(EventData.query('data(//ServerName)') AS sysname),
> CAST(EventData.query('data(//DatabaseName)') AS sysname),
> CAST(EventData.query('data(//ObjectType)') AS sysname),
> CAST(EventData.query('data(//SchemaName)') AS sysname),
> CAST(EventData.query('data(//ObjectName)') AS sysname),
> EventData
> FROM @.AuditMessage
> It's working nicely, but there is one weakness. I would like to have the
> RECEIVE and the INSERT as a transaction, but I can't get it working. Is it
> not possible to use RECEIVE in transactions?
> Best regards
> Ola Hallengren|||I overlooked one comment in Books Online"
"If the RECEIVE statement is not the first statement in a batch or stored
procedure, the preceding statement must be terminated with a semicolon (;),
the Transact-SQL statement terminator."
Now it's working.
About poisonous messages I have been doing some testing on that by changing
the datatypes in my auditing table, so that the insert fails. The queue then
gets deactivated as you write.
Now it's not so likely that the insert fails, since I have matching
datatypes. I mostly would like to have a transaction in case of a server
crash.
I have ordered the Roger Walters book today.
Thanks for you help.
/Ola
"Tibor Karaszi" wrote:
> > I would like to have the
> > RECEIVE and the INSERT as a transaction, but I can't get it working.
> In what way doesn't it work? Error messages? Something else?
>
> > Is it
> > not possible to use RECEIVE in transactions?
> Yes, but you want to be careful. Say you determine that you can't process this message so you
> rollback. Since messages are received in order, you will just read the same message next time.
> Essentially, you end up in an endless loop. This is called a "poison message" and after 5 rollbacks
> in a row, SB will disable the queue. I strongly suggest you get Roger Wolter's book on SB, this
> topic is handled in chapter 8.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Ola Hallengren" <OlaHallengren@.discussions.microsoft.com> wrote in message
> news:38D8CD3E-9452-4EAE-A300-DB0F9B3A6F53@.microsoft.com...
> > Hello!
> >
> > I have an an event notifications audit solution that I'm working on. I am
> > using this activation procedure.
> >
> > CREATE PROCEDURE dbo.AuditReceive
> > AS
> > DECLARE @.AuditMessage TABLE (EventData xml);
> >
> > RECEIVE CAST(message_body AS XML)
> > FROM AuditQueue
> > INTO @.AuditMessage
> >
> > INSERT INTO dbo.Audit (PostTime, EventType, LoginName, UserName, ServerName,
> > DatabaseName, ObjectType, SchemaName, ObjectName, EventData)
> > SELECT CAST(EventData.query('data(//PostTime)') AS varchar(23)),
> > CAST(EventData.query('data(//EventType)') AS sysname),
> > CAST(EventData.query('data(//LoginName)') AS sysname),
> > CAST(EventData.query('data(//UserName)') AS sysname),
> > CAST(EventData.query('data(//ServerName)') AS sysname),
> > CAST(EventData.query('data(//DatabaseName)') AS sysname),
> > CAST(EventData.query('data(//ObjectType)') AS sysname),
> > CAST(EventData.query('data(//SchemaName)') AS sysname),
> > CAST(EventData.query('data(//ObjectName)') AS sysname),
> > EventData
> > FROM @.AuditMessage
> >
> > It's working nicely, but there is one weakness. I would like to have the
> > RECEIVE and the INSERT as a transaction, but I can't get it working. Is it
> > not possible to use RECEIVE in transactions?
> >
> > Best regards
> >
> > Ola Hallengren
>sql
RECEIVE in transactions
Hello!
I have an an event notifications audit solution that I'm working on. I am
using this activation procedure.
CREATE PROCEDURE dbo.AuditReceive
AS
DECLARE @.AuditMessage TABLE (EventData xml);
RECEIVE CAST(message_body AS XML)
FROM AuditQueue
INTO @.AuditMessage
INSERT INTO dbo.Audit (PostTime, EventType, LoginName, UserName, ServerName,
DatabaseName, ObjectType, SchemaName, ObjectName, EventData)
SELECT CAST(EventData.query('data(//PostTime)') AS varchar(23)),
CAST(EventData.query('data(//EventType)') AS sysname),
CAST(EventData.query('data(//LoginName)') AS sysname),
CAST(EventData.query('data(//UserName)') AS sysname),
CAST(EventData.query('data(//ServerName)') AS sysname),
CAST(EventData.query('data(//DatabaseName)') AS sysname),
CAST(EventData.query('data(//ObjectType)') AS sysname),
CAST(EventData.query('data(//SchemaName)') AS sysname),
CAST(EventData.query('data(//ObjectName)') AS sysname),
EventData
FROM @.AuditMessage
It's working nicely, but there is one weakness. I would like to have the
RECEIVE and the INSERT as a transaction, but I can't get it working. Is it
not possible to use RECEIVE in transactions?
Best regards
Ola Hallengrenthe books on line tell:
"The RECEIVE statement removes received messages from the queue unless the
queue specifies message retention. When the RETENTION setting for the queue
is ON, the RECEIVE statement updates the status column to 1 and leaves the
messages in the queue. When a transaction that contains a RECEIVE statement
rolls back, all changes to the queue within the transaction are also rolled
back, returning messages to the queue."
Could you expose the source code of the transaction you tried? there's
something wrong but i cannot imagine what without seeing an example.
Gilberto Zampatti
"Ola Hallengren" wrote:
> Hello!
> I have an an event notifications audit solution that I'm working on. I am
> using this activation procedure.
> CREATE PROCEDURE dbo.AuditReceive
> AS
> DECLARE @.AuditMessage TABLE (EventData xml);
> RECEIVE CAST(message_body AS XML)
> FROM AuditQueue
> INTO @.AuditMessage
> INSERT INTO dbo.Audit (PostTime, EventType, LoginName, UserName, ServerNam
e,
> DatabaseName, ObjectType, SchemaName, ObjectName, EventData)
> SELECT CAST(EventData.query('data(//PostTime)') AS varchar(23)),
> CAST(EventData.query('data(//EventType)') AS sysname),
> CAST(EventData.query('data(//LoginName)') AS sysname),
> CAST(EventData.query('data(//UserName)') AS sysname),
> CAST(EventData.query('data(//ServerName)') AS sysname),
> CAST(EventData.query('data(//DatabaseName)') AS sysname),
> CAST(EventData.query('data(//ObjectType)') AS sysname),
> CAST(EventData.query('data(//SchemaName)') AS sysname),
> CAST(EventData.query('data(//ObjectName)') AS sysname),
> EventData
> FROM @.AuditMessage
> It's working nicely, but there is one weakness. I would like to have the
> RECEIVE and the INSERT as a transaction, but I can't get it working. Is it
> not possible to use RECEIVE in transactions?
> Best regards
> Ola Hallengren|||> I would like to have the
> RECEIVE and the INSERT as a transaction, but I can't get it working.
In what way doesn't it work? Error messages? Something else?
> Is it
> not possible to use RECEIVE in transactions?
Yes, but you want to be careful. Say you determine that you can't process th
is message so you
rollback. Since messages are received in order, you will just read the same
message next time.
Essentially, you end up in an endless loop. This is called a "poison message
" and after 5 rollbacks
in a row, SB will disable the queue. I strongly suggest you get Roger Wolter
's book on SB, this
topic is handled in chapter 8.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Ola Hallengren" <OlaHallengren@.discussions.microsoft.com> wrote in message
news:38D8CD3E-9452-4EAE-A300-DB0F9B3A6F53@.microsoft.com...
> Hello!
> I have an an event notifications audit solution that I'm working on. I am
> using this activation procedure.
> CREATE PROCEDURE dbo.AuditReceive
> AS
> DECLARE @.AuditMessage TABLE (EventData xml);
> RECEIVE CAST(message_body AS XML)
> FROM AuditQueue
> INTO @.AuditMessage
> INSERT INTO dbo.Audit (PostTime, EventType, LoginName, UserName, ServerNam
e,
> DatabaseName, ObjectType, SchemaName, ObjectName, EventData)
> SELECT CAST(EventData.query('data(//PostTime)') AS varchar(23)),
> CAST(EventData.query('data(//EventType)') AS sysname),
> CAST(EventData.query('data(//LoginName)') AS sysname),
> CAST(EventData.query('data(//UserName)') AS sysname),
> CAST(EventData.query('data(//ServerName)') AS sysname),
> CAST(EventData.query('data(//DatabaseName)') AS sysname),
> CAST(EventData.query('data(//ObjectType)') AS sysname),
> CAST(EventData.query('data(//SchemaName)') AS sysname),
> CAST(EventData.query('data(//ObjectName)') AS sysname),
> EventData
> FROM @.AuditMessage
> It's working nicely, but there is one weakness. I would like to have the
> RECEIVE and the INSERT as a transaction, but I can't get it working. Is it
> not possible to use RECEIVE in transactions?
> Best regards
> Ola Hallengren|||I overlooked one comment in Books Online"
"If the RECEIVE statement is not the first statement in a batch or stored
procedure, the preceding statement must be terminated with a semicolon (;),
the Transact-SQL statement terminator."
Now it's working.
About poisonous messages I have been doing some testing on that by changing
the datatypes in my auditing table, so that the insert fails. The queue then
gets deactivated as you write.
Now it's not so likely that the insert fails, since I have matching
datatypes. I mostly would like to have a transaction in case of a server
crash.
I have ordered the Roger Walters book today.
Thanks for you help.
/Ola
"Tibor Karaszi" wrote:
> In what way doesn't it work? Error messages? Something else?
>
> Yes, but you want to be careful. Say you determine that you can't process
this message so you
> rollback. Since messages are received in order, you will just read the sam
e message next time.
> Essentially, you end up in an endless loop. This is called a "poison messa
ge" and after 5 rollbacks
> in a row, SB will disable the queue. I strongly suggest you get Roger Wolt
er's book on SB, this
> topic is handled in chapter 8.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Ola Hallengren" <OlaHallengren@.discussions.microsoft.com> wrote in messag
e
> news:38D8CD3E-9452-4EAE-A300-DB0F9B3A6F53@.microsoft.com...
>
I have an an event notifications audit solution that I'm working on. I am
using this activation procedure.
CREATE PROCEDURE dbo.AuditReceive
AS
DECLARE @.AuditMessage TABLE (EventData xml);
RECEIVE CAST(message_body AS XML)
FROM AuditQueue
INTO @.AuditMessage
INSERT INTO dbo.Audit (PostTime, EventType, LoginName, UserName, ServerName,
DatabaseName, ObjectType, SchemaName, ObjectName, EventData)
SELECT CAST(EventData.query('data(//PostTime)') AS varchar(23)),
CAST(EventData.query('data(//EventType)') AS sysname),
CAST(EventData.query('data(//LoginName)') AS sysname),
CAST(EventData.query('data(//UserName)') AS sysname),
CAST(EventData.query('data(//ServerName)') AS sysname),
CAST(EventData.query('data(//DatabaseName)') AS sysname),
CAST(EventData.query('data(//ObjectType)') AS sysname),
CAST(EventData.query('data(//SchemaName)') AS sysname),
CAST(EventData.query('data(//ObjectName)') AS sysname),
EventData
FROM @.AuditMessage
It's working nicely, but there is one weakness. I would like to have the
RECEIVE and the INSERT as a transaction, but I can't get it working. Is it
not possible to use RECEIVE in transactions?
Best regards
Ola Hallengrenthe books on line tell:
"The RECEIVE statement removes received messages from the queue unless the
queue specifies message retention. When the RETENTION setting for the queue
is ON, the RECEIVE statement updates the status column to 1 and leaves the
messages in the queue. When a transaction that contains a RECEIVE statement
rolls back, all changes to the queue within the transaction are also rolled
back, returning messages to the queue."
Could you expose the source code of the transaction you tried? there's
something wrong but i cannot imagine what without seeing an example.
Gilberto Zampatti
"Ola Hallengren" wrote:
> Hello!
> I have an an event notifications audit solution that I'm working on. I am
> using this activation procedure.
> CREATE PROCEDURE dbo.AuditReceive
> AS
> DECLARE @.AuditMessage TABLE (EventData xml);
> RECEIVE CAST(message_body AS XML)
> FROM AuditQueue
> INTO @.AuditMessage
> INSERT INTO dbo.Audit (PostTime, EventType, LoginName, UserName, ServerNam
e,
> DatabaseName, ObjectType, SchemaName, ObjectName, EventData)
> SELECT CAST(EventData.query('data(//PostTime)') AS varchar(23)),
> CAST(EventData.query('data(//EventType)') AS sysname),
> CAST(EventData.query('data(//LoginName)') AS sysname),
> CAST(EventData.query('data(//UserName)') AS sysname),
> CAST(EventData.query('data(//ServerName)') AS sysname),
> CAST(EventData.query('data(//DatabaseName)') AS sysname),
> CAST(EventData.query('data(//ObjectType)') AS sysname),
> CAST(EventData.query('data(//SchemaName)') AS sysname),
> CAST(EventData.query('data(//ObjectName)') AS sysname),
> EventData
> FROM @.AuditMessage
> It's working nicely, but there is one weakness. I would like to have the
> RECEIVE and the INSERT as a transaction, but I can't get it working. Is it
> not possible to use RECEIVE in transactions?
> Best regards
> Ola Hallengren|||> I would like to have the
> RECEIVE and the INSERT as a transaction, but I can't get it working.
In what way doesn't it work? Error messages? Something else?
> Is it
> not possible to use RECEIVE in transactions?
Yes, but you want to be careful. Say you determine that you can't process th
is message so you
rollback. Since messages are received in order, you will just read the same
message next time.
Essentially, you end up in an endless loop. This is called a "poison message
" and after 5 rollbacks
in a row, SB will disable the queue. I strongly suggest you get Roger Wolter
's book on SB, this
topic is handled in chapter 8.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Ola Hallengren" <OlaHallengren@.discussions.microsoft.com> wrote in message
news:38D8CD3E-9452-4EAE-A300-DB0F9B3A6F53@.microsoft.com...
> Hello!
> I have an an event notifications audit solution that I'm working on. I am
> using this activation procedure.
> CREATE PROCEDURE dbo.AuditReceive
> AS
> DECLARE @.AuditMessage TABLE (EventData xml);
> RECEIVE CAST(message_body AS XML)
> FROM AuditQueue
> INTO @.AuditMessage
> INSERT INTO dbo.Audit (PostTime, EventType, LoginName, UserName, ServerNam
e,
> DatabaseName, ObjectType, SchemaName, ObjectName, EventData)
> SELECT CAST(EventData.query('data(//PostTime)') AS varchar(23)),
> CAST(EventData.query('data(//EventType)') AS sysname),
> CAST(EventData.query('data(//LoginName)') AS sysname),
> CAST(EventData.query('data(//UserName)') AS sysname),
> CAST(EventData.query('data(//ServerName)') AS sysname),
> CAST(EventData.query('data(//DatabaseName)') AS sysname),
> CAST(EventData.query('data(//ObjectType)') AS sysname),
> CAST(EventData.query('data(//SchemaName)') AS sysname),
> CAST(EventData.query('data(//ObjectName)') AS sysname),
> EventData
> FROM @.AuditMessage
> It's working nicely, but there is one weakness. I would like to have the
> RECEIVE and the INSERT as a transaction, but I can't get it working. Is it
> not possible to use RECEIVE in transactions?
> Best regards
> Ola Hallengren|||I overlooked one comment in Books Online"
"If the RECEIVE statement is not the first statement in a batch or stored
procedure, the preceding statement must be terminated with a semicolon (;),
the Transact-SQL statement terminator."
Now it's working.
About poisonous messages I have been doing some testing on that by changing
the datatypes in my auditing table, so that the insert fails. The queue then
gets deactivated as you write.
Now it's not so likely that the insert fails, since I have matching
datatypes. I mostly would like to have a transaction in case of a server
crash.
I have ordered the Roger Walters book today.
Thanks for you help.
/Ola
"Tibor Karaszi" wrote:
> In what way doesn't it work? Error messages? Something else?
>
> Yes, but you want to be careful. Say you determine that you can't process
this message so you
> rollback. Since messages are received in order, you will just read the sam
e message next time.
> Essentially, you end up in an endless loop. This is called a "poison messa
ge" and after 5 rollbacks
> in a row, SB will disable the queue. I strongly suggest you get Roger Wolt
er's book on SB, this
> topic is handled in chapter 8.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Ola Hallengren" <OlaHallengren@.discussions.microsoft.com> wrote in messag
e
> news:38D8CD3E-9452-4EAE-A300-DB0F9B3A6F53@.microsoft.com...
>
Wednesday, March 7, 2012
really quick question
Hi all!
Can someone tell a newbie where to turn down the event log levels?
I'm getting 15 information alerts every 30 minutes and want to tone it down
a touch so my app logs are easier to read!! I've had a quick look in the sql
server management but can't find where you can set these levels.
Thanks very muchUnfortunately, you cannot change whether or not 2005 should write a particular system message to the
eventlog. You could do that in earlier versions using sp_altermessage. Having said that, there might
be some special handling for some particular message (logins is the only that comes in mind). What
are these messages?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Paul" <paul@.wertyuiko.dfg> wrote in message news:%23f$GtKO1HHA.5160@.TK2MSFTNGP05.phx.gbl...
> Hi all!
> Can someone tell a newbie where to turn down the event log levels?
> I'm getting 15 information alerts every 30 minutes and want to tone it down a touch so my app logs
> are easier to read!! I've had a quick look in the sql server management but can't find where you
> can set these levels.
> Thanks very much
>
Can someone tell a newbie where to turn down the event log levels?
I'm getting 15 information alerts every 30 minutes and want to tone it down
a touch so my app logs are easier to read!! I've had a quick look in the sql
server management but can't find where you can set these levels.
Thanks very muchUnfortunately, you cannot change whether or not 2005 should write a particular system message to the
eventlog. You could do that in earlier versions using sp_altermessage. Having said that, there might
be some special handling for some particular message (logins is the only that comes in mind). What
are these messages?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Paul" <paul@.wertyuiko.dfg> wrote in message news:%23f$GtKO1HHA.5160@.TK2MSFTNGP05.phx.gbl...
> Hi all!
> Can someone tell a newbie where to turn down the event log levels?
> I'm getting 15 information alerts every 30 minutes and want to tone it down a touch so my app logs
> are easier to read!! I've had a quick look in the sql server management but can't find where you
> can set these levels.
> Thanks very much
>
really quick question
Hi all!
Can someone tell a newbie where to turn down the event log levels?
I'm getting 15 information alerts every 30 minutes and want to tone it down
a touch so my app logs are easier to read!! I've had a quick look in the sql
server management but can't find where you can set these levels.
Thanks very muchUnfortunately, you cannot change whether or not 2005 should write a particul
ar system message to the
eventlog. You could do that in earlier versions using sp_altermessage. Havin
g said that, there might
be some special handling for some particular message (logins is the only tha
t comes in mind). What
are these messages?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Paul" <paul@.wertyuiko.dfg> wrote in message news:%23f$GtKO1HHA.5160@.TK2MSFTNGP05.phx.gbl...
> Hi all!
> Can someone tell a newbie where to turn down the event log levels?
> I'm getting 15 information alerts every 30 minutes and want to tone it dow
n a touch so my app logs
> are easier to read!! I've had a quick look in the sql server management bu
t can't find where you
> can set these levels.
> Thanks very much
>
Can someone tell a newbie where to turn down the event log levels?
I'm getting 15 information alerts every 30 minutes and want to tone it down
a touch so my app logs are easier to read!! I've had a quick look in the sql
server management but can't find where you can set these levels.
Thanks very muchUnfortunately, you cannot change whether or not 2005 should write a particul
ar system message to the
eventlog. You could do that in earlier versions using sp_altermessage. Havin
g said that, there might
be some special handling for some particular message (logins is the only tha
t comes in mind). What
are these messages?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Paul" <paul@.wertyuiko.dfg> wrote in message news:%23f$GtKO1HHA.5160@.TK2MSFTNGP05.phx.gbl...
> Hi all!
> Can someone tell a newbie where to turn down the event log levels?
> I'm getting 15 information alerts every 30 minutes and want to tone it dow
n a touch so my app logs
> are easier to read!! I've had a quick look in the sql server management bu
t can't find where you
> can set these levels.
> Thanks very much
>
Really need urgent help in Insert statement
Hi,
I am creating a event registration system. Right now my program is able to insert user's registered event into the database. This is the code i wrote:
INSERT INTO EventRegistration(eventId,userId,status) VALUES('" + eid + "','" + id + "','" + status + "')
However I notice that same user are able to register the same event when i use this code. How should i improve my code in order to prevent same user from registering the same event. Which means my sql statement will not insert registered event into the database if same user register the same event. I will really appreciate the help all of you offer.
Thank you.
Regards,
ferDepending on your database tool, you probably just need a UNIQUE CONSTRAINT or a UNIQUE INDEX and things should be lovely.
-PatP|||As Pat.P infers good table design should preclude you users entering duplicate data.
What makes an event / entry unique in the real world and how do you represent that in your database?|||if you are providing the user a list of options to register, I assume you are pulling the list of things to register from the database too ?
only show them options to register for, that they have not registered for already.
for instance, if you have 10 time slots available for something and someone picks time slot #3, then the next user will only see 9 time slots to pick from. (#3 is no longer displayed)|||Hi Kropes2001,
Ya you actually get wat i mean. I am providing a list of options for user to register, and options(events) are retrieve from the database. I get wat u mean but i dun realli noe how to implement it as i am new to sql. Can you provide me a sample coding of wat u mean?
Thank you.
ferlina|||If you define the primary key, or alternatively a unique key correctly there can't be any duplicates.
If you handle any eror thrown by the db engine then you can gracefully handle the situation where a single user has tried to make more than one booking for the same event.
HTH|||Sorry... but
why "handle an error" when you can prevent it from happening to begin with ?
i see too many programmers that do that. let the user enter whatever they want and then try to deal with all the errors it generates.
the more logical design is to simply provide the necessary information in a way that prevents the user form making any errors like that to begin with. and its usually a lot easier too.
an ounce of prevention vs. a pound of cure.
ferlina,
i would really need to see your table designs to give you an absolute answer.
i am assuming that you have 1 table with all of the events that are available. plossible fields :
EventID
Description
StartDate
StartTime
Active
etc....
etc....
i assume that you then use a SELECT statement to build a recordset of all of the availalbe events. something like :
SELECT EventID, Description, StartDate, StartTime from EventList WHERE Active=true
i also assume that by the time you hit this page, you already know who your user is, or at least what their ID is ? (they already are defined in the database somelace, yes ?)
if so, then combine the SELECT of available events with an outer join. you want to retrieve a list of all events that are active in teh database, except for the ones that are already scheduled by this UserID.
take a look at this article
http://www.dev-archive.com/dbzone/Article/17403/0/page/4
instead of selecting all of the registered events that match the user's ID, you are selecting all of the ones that they did not register for.|||In a multi user environment you have to trap for errors and handle them gracefully. After a user has booked an event then you can exclude them from appearing in future combo select boxes, but untll they have booked you are running the risk of an error. Granted you could set a flag on the user to say they are in process of making a booking - but that doesn;t stp clients that have already loaded available users from attempting to make a duplicate booking.
It is always theoretically possible for a user to be booking an event from more than one session at the same time (either through user error or deliberate attempt to subvert the system.
I am creating a event registration system. Right now my program is able to insert user's registered event into the database. This is the code i wrote:
INSERT INTO EventRegistration(eventId,userId,status) VALUES('" + eid + "','" + id + "','" + status + "')
However I notice that same user are able to register the same event when i use this code. How should i improve my code in order to prevent same user from registering the same event. Which means my sql statement will not insert registered event into the database if same user register the same event. I will really appreciate the help all of you offer.
Thank you.
Regards,
ferDepending on your database tool, you probably just need a UNIQUE CONSTRAINT or a UNIQUE INDEX and things should be lovely.
-PatP|||As Pat.P infers good table design should preclude you users entering duplicate data.
What makes an event / entry unique in the real world and how do you represent that in your database?|||if you are providing the user a list of options to register, I assume you are pulling the list of things to register from the database too ?
only show them options to register for, that they have not registered for already.
for instance, if you have 10 time slots available for something and someone picks time slot #3, then the next user will only see 9 time slots to pick from. (#3 is no longer displayed)|||Hi Kropes2001,
Ya you actually get wat i mean. I am providing a list of options for user to register, and options(events) are retrieve from the database. I get wat u mean but i dun realli noe how to implement it as i am new to sql. Can you provide me a sample coding of wat u mean?
Thank you.
ferlina|||If you define the primary key, or alternatively a unique key correctly there can't be any duplicates.
If you handle any eror thrown by the db engine then you can gracefully handle the situation where a single user has tried to make more than one booking for the same event.
HTH|||Sorry... but
why "handle an error" when you can prevent it from happening to begin with ?
i see too many programmers that do that. let the user enter whatever they want and then try to deal with all the errors it generates.
the more logical design is to simply provide the necessary information in a way that prevents the user form making any errors like that to begin with. and its usually a lot easier too.
an ounce of prevention vs. a pound of cure.
ferlina,
i would really need to see your table designs to give you an absolute answer.
i am assuming that you have 1 table with all of the events that are available. plossible fields :
EventID
Description
StartDate
StartTime
Active
etc....
etc....
i assume that you then use a SELECT statement to build a recordset of all of the availalbe events. something like :
SELECT EventID, Description, StartDate, StartTime from EventList WHERE Active=true
i also assume that by the time you hit this page, you already know who your user is, or at least what their ID is ? (they already are defined in the database somelace, yes ?)
if so, then combine the SELECT of available events with an outer join. you want to retrieve a list of all events that are active in teh database, except for the ones that are already scheduled by this UserID.
take a look at this article
http://www.dev-archive.com/dbzone/Article/17403/0/page/4
instead of selecting all of the registered events that match the user's ID, you are selecting all of the ones that they did not register for.|||In a multi user environment you have to trap for errors and handle them gracefully. After a user has booked an event then you can exclude them from appearing in future combo select boxes, but untll they have booked you are running the risk of an error. Granted you could set a flag on the user to say they are in process of making a booking - but that doesn;t stp clients that have already loaded available users from attempting to make a duplicate booking.
It is always theoretically possible for a user to be booking an event from more than one session at the same time (either through user error or deliberate attempt to subvert the system.
Subscribe to:
Posts (Atom)