SQL Server Q&A

As a software engineer, I focus on .NET, especially asp.net, C#, WCF and so on, and I am also very interested in Search Engine Optimization.

Entries Tagged ‘system’

Best Video Conferencing Options for Small Businesses

Options for small businesses

The best video conferencing system to find out if your company has a limited budget, can be difficult. How to find a high-quality service, without spending too much? The best video conferencing systems are not necessarily the most expensive. There are reasonable services for companies of all sizes available.?

Don‘t Go Too Big

One of the problems with video-conferencing is that many of the systems on large companies are aligned. These systems are based on enterprise class, organizations that have many branch offices, locations and staff worldwide. Seller may try to sell you on one of these systems, you promise your business it will need as they expand.The truth, however, is that multisite, fully integrated systems may be overkill for a small business just starting out. The best video conferencing solutions should change scalable from a single user up to hundreds with very little.

Exactly what does a digital aerial contractor perform?

Feel like you really, if you have a moment to the latest tv series on cable TV monitor and take the most important signal literally out of focus and is blurry. A serious case may the fact there is absolutely no coverage at all! At this stage, can help professionals an antenna installation Wellington, save a satisfaction per day and then surfing t. V once again.

A digital entrepreneur has a wide range of knowledge which can also look after a number of digital and uhf work a local air unit installation even more difficult satellite ventures. They should also re-wire than his own home your flash present absolutely new system of leisure that you have recently been keep your own pennies for some time. Or if you may be building a completely new family house, they can put in a reliable home for this particular construction entertainment system.

The one thing that will be sure to help ensure that your review do if you decide to for an antenna installation Wellington person the job available for you manage. Not all of the antenna are contractor usually professional in what they do. Like all trade, discover cowboys who will take your hard earned money and run, leaving to get the pieces and begin again. What a big problem would this especially if you place cabling system in a all new house building. It is wall surfaces take out no easy work, as soon as a wiring work to solve them, what went wrong have been set in position. Similar wrong plumbing, can it cost to solve too much money!

Error message when you start SQL Server 2005 Management Studio: “Input string was not in a correct format”

Symptoms
When you start Microsoft SQL Server 2005 Management Studio, you may receive the following error message:

Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.
Input string was not in a correct format.If you click Detail in the dialog box, the following error message text appears at the top of the details:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at Microsoft.SqlServer.Management.UI.ConnectionDlg.LoginControl.InitFromLastUsedServerType()
at Microsoft.SqlServer.Management.UI.ConnectionDlg.ConnectionDialog.DoOneTimeInitialization()
at Microsoft.SqlServer.Management.UI.ConnectionDlg.ConnectionDialog.OnVisibleChanged(EventArgs e)
at Microsoft.SqlServer.Management.UI.VSIntegration.ShellConnectionDialog.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Resolution
This problem occurs if the value of the following registry key is not empty or is set to an invalid value:
HKEY_CURRENT_USER\Control Panel\International\sPositiveSign

FIX: Distribution Agent May Experience an Access Violation in a Republisher Topology

Symptoms
When you use transactional replication in a republishing topology, the Distribution Agent may experience an Access Violation (AV), which leads to an abnormal termination of the Distribution Agent.
When the Access Violation occurs on a server that is running Microsoft SQL Server 2000 Service Pack 2, the following stack dump is generated:

*******************************************************An exception was caughtin DISTRIB.EXE* Exception Address = 7800209a* Exception Code = c0000005********************************************************Module Name Return Address LocationMSVCRT 00403a45 wcsncpy + 14distrib 0040104c 00403a45distrib 77e8d326 0040104cKERNEL32 00000000 CreateProcessW + 900*******************************************************
Resolution
With transactional replication, the Logreader Agent invokes the sp_MSadd_replcommands27hp stored procedure to insert the log records from the publisher to the distribution database. The Distribution Agent then takes these log records and distributes them to the subscriber.
In a republishing topology, the sp_MSadd_replcommands27hp stored procedure may incorrectly insert an empty command (0x) in the MSRepl_commands system table in the distribution database. As a result, the Distributor Agent may experience the Access Violation mentioned in the “Symptoms” section when it tries to handle the empty command.
Logreader Agent
The Logreader might send a transaction with no command to distribution, with the intent being to update the MSrepl_transactions system table properly so that the next scan does not repeat the same section of the log.
The Distribution Agent does not expect an empty command; therefore, the Logreader checks the length of “command” in the sp_MSadd_repl_commands27hp stored procedure to make sure that the xact_seqno column is inserted in the MSRepl_transactions system table, but not in the MSRepl_commands system table.
The problem is that the “length checking” logic does not take into account a republishing or bi-directional scenario, where the originator srv and the db fields are not empty. It only checks to see if datalength(@data) > 39 to determine if the command is empty. However, it does not test the actual command data length(@cmd_data_len) before it inserts data in the MSRepl_commands system table.
Distribution Agent
The following data was gathered from the command that was causing the Access Violation:

xact_seqnotypearticle_id originator_id command_id commandcmd_data_len———————————- ———– ———- ————- ———- ————————-0×000770C1000000F6000100×00000000 NULL0×00000001 0×0 The Distribution Agent uses the sp_MSget_repl_commands stored procedure to select the commands that it needs to process. The sp_MSget_repl_commands stored procedure only picks up a command with article_id=0 when all of the following conditions are true: There are no inactive subscriptions.Loopback detection is not turned on for any articles.The number of articles in the MSsubscriptions system table is the same as the number of articles in the MSarticles system table for this particular publication. When the record with article_id=0 is picked up, the command (0x) is passed to the Distribution Agent; however, it is not handled gracefully and the Access Violation occurs.
To summarize, the cause of the problem is that:
The Logreader inserts a command of 0x in the MSRepl_commands system table in the distribution database. -and-
The Distribution Agent picks up commands with article_id=0 from the MSRepl_commands system table in the Distribution database.

Error message when you use a common language runtime object in SQL Server 2005: “Cannot load dynamically generated serialization assembly”

Symptoms
When you use a common language runtime (CLR) object in Microsoft SQL Server 2005, you may receive an error message that is similar to the following:

Msg 6522, Level 16, State 2, Line 1
A .NET Framework error occurred during execution of user defined routine or aggregate ‘ObjectName’:
System.InvalidOperationException: Cannot load dynamically generated serialization assembly. In some hosting environments assembly load functionality is restricted, consider using pre-generated serializer. Please see inner exception for more information. —> System.IO.FileLoadException: LoadFrom(), LoadFile(), Load(byte[]) and LoadModule() have been disabled by the host.
System.IO.FileLoadException:
at System.Reflection.Assembly.nLoadImage(Byte[] rawAssembly, Byte[] rawSymbolStore, Evidence evidence, StackCrawlMark& stackMark, Boolean fIntrospection)
at System.Reflection.Assembly.Load(Byte[] rawAssembly, Byte[] rawSymbolStore, Evidence securityEvidence)
at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames)
at Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources)
at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources)
at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromSource(CompilerParameters options, String[] s
System.InvalidOperationException:
at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, CompilerParameters parameters, Evidence evidence)
at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, CompilerParameters parameters, Assembly assembly, Hashtable assemblies)
at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)
at System.Xml.Serialization.XmlSerializer.GenerateTempAssembly(XmlMapping xmlMapping, Type type, String defaultNamespace)
at System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace)
at System.Xml.Serialization.XmlSe…For example, you may receive the error message when you use a CLR object that calls a Web service or performs conversion from user-defined types to XML inside SQL Server.
Resolution
This issue occurs when a CLR object is converted to the XML data type. When this conversion occurs, the Windows Communication Foundation (formerly code-named “Indigo”) tries to do the following: Generate a new XML serialization assembly.Save the assembly to disk.Load the assembly into the current application domain. However, SQL Server does not allow for this kind of disk access in the SQL CLR for security reasons. Therefore, you receive the error message that is mentioned in the “Symptoms” section. Several scenarios may cause the CLR object to be converted to the XML data type.
For more information about the Windows Communication Foundation, visit the following Microsoft Developer Network (MSDN) Web site:
http://msdn2.microsoft.com/en-us/library/ms735119.aspx(http://msdn2.microsoft.com/en-us/library/ms735119.aspx)You may receive the error message that is mentioned in the “Symptoms” section in the following scenarios: The CLR code that implements CLR objects explicitly uses the XmlSerializer class. These CLR objects may include stored procedures, functions, user-defined types, aggregates, and triggers.You use a Web service in the CLR code.You send or receive CLR objects to or from SQL Server by using direct HTTP/SOAP access to SQL Server. The CLR object converts a user-defined type to the XML data type.

Error message occurs in SQL Server 7.0 when you call the Command.Prepare method before you add parameters by using Visual C# .NET: “An unhandled exception of type”

Symptoms
When you create a parameterized command against Microsoft SQL Server 7.0, if you call the Prepare method before you add parameters to the command, you receive the following error message:

An unhandled exception of type ‘System.Data.SqlClient.SqlException’ occurred in system.data.dll.
Additional information: System error. This problem does not occur in SQL Server 2000.
Resolution
This problem occurs in SQL Server 7.0 because, by design, you cannot run the Prepare method before you add parameters. This applies to most database systems.
SQL Server 2000 does not generate the above-mentioned exception because it does not run Prepare until the first command is executed. This optimization prevents the overhead of Prepare if no commands are subsequently executed.