Showing posts with label ive. Show all posts
Showing posts with label ive. Show all posts

Friday, March 30, 2012

Problems with transactional replication

Hello All!
Today I've found one strange problem ... I have tables like
something_another_2004_9 (so name_YEAR_MONTH) ... funny thing happened when
I got to the month 10,
I see that the insert/update/delete stored procedures are missing the last
digit in their name.
So, for the 2004_9 month I get sp_MSins_something_another_2004_9,
sp_MSupd_something_another_2004_9, etc .
But for the 2004_10 month I get sp_MSins_something_another_2004_1,
sp_MSupd_something_another_2004_1 ... where is the last 0!? Same happened
for 2004_11 table.
What could be the problem? Are the table names too long or what ?!
Thanks four your input!
Kind regards,
Dejan
can you post the exact names of the tables which are causing the problems
with stored procedure generation?
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Dejan Markic" <dejan@.akton.is> wrote in message
news:hy2fd.4744$F6.1274490@.news.siol.net...
> Hello All!
> Today I've found one strange problem ... I have tables like
> something_another_2004_9 (so name_YEAR_MONTH) ... funny thing happened
when
> I got to the month 10,
> I see that the insert/update/delete stored procedures are missing the last
> digit in their name.
> So, for the 2004_9 month I get sp_MSins_something_another_2004_9,
> sp_MSupd_something_another_2004_9, etc .
> But for the 2004_10 month I get sp_MSins_something_another_2004_1,
> sp_MSupd_something_another_2004_1 ... where is the last 0!? Same happened
> for 2004_11 table.
> What could be the problem? Are the table names too long or what ?!
> Thanks four your input!
> Kind regards,
> Dejan
>
>
|||Hello!
Sorry for the late response ...
Full table names are:
billing_record_2004_9, billing_record_2004_10 ...
Paul,
I see normal procs name (without missin last number) ... I don't know if
this makes any difference, but before I ran that I already 'repaired' this
by hand (renaming and creating new procs for this new tables). I'm just
afraid that this will happen again next month (12 = two letters ) Can I
check that somehow ? What could be the case here?
Kind regards,
Dejan
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:ebe9KdouEHA.1404@.TK2MSFTNGP11.phx.gbl...
| can you post the exact names of the tables which are causing the problems
| with stored procedure generation?
|
| --
| Hilary Cotter
| Looking for a SQL Server replication book?
| http://www.nwsu.com/0974973602.html
|
|
| "Dejan Markic" <dejan@.akton.is> wrote in message
| news:hy2fd.4744$F6.1274490@.news.siol.net...
| > Hello All!
| >
| > Today I've found one strange problem ... I have tables like
| > something_another_2004_9 (so name_YEAR_MONTH) ... funny thing happened
| when
| > I got to the month 10,
| > I see that the insert/update/delete stored procedures are missing the
last
| > digit in their name.
| > So, for the 2004_9 month I get sp_MSins_something_another_2004_9,
| > sp_MSupd_something_another_2004_9, etc .
| > But for the 2004_10 month I get sp_MSins_something_another_2004_1,
| > sp_MSupd_something_another_2004_1 ... where is the last 0!? Same
happened
| > for 2004_11 table.
| > What could be the problem? Are the table names too long or what ?!
| >
| > Thanks four your input!
| >
| > Kind regards,
| > Dejan
| >
| >
| >
| >
|
|

Tuesday, March 20, 2012

Problems with Management Studio Express

Hi,

I have two problems with Sql Management Studio Express. I've installed it to be able to upload/attach my Sql Server Express (that came with the Visual Web Developer Express download) to the real Sql Server 2005 at my web host.

1. When I start the application, that is Sql Management Studio Express, I get the following message:

***********************************************''

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.IOException: Det går inte att skapa en stabil underordnad nyckel till en temporär överordnad nyckel. ("It's not possible to create a lower key to a temporary upper key")

at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
at Microsoft.Win32.RegistryKey.CreateSubKey(String subkey, RegistryKeyPermissionCheck permissionCheck, RegistrySecurity registrySecurity)
at Microsoft.Win32.RegistryKey.CreateSubKey(String subkey)
at Microsoft.SqlServer.Management.UI.ConnectionDlg.RegisteredServersUtils.CreateKeyValueIfNotExist(String regPath, String keyName)
at Microsoft.SqlServer.Management.UI.ConnectionDlg.RegisteredServersUtils.RegisterLocalInstancesIfFirstTimeUser()
at Microsoft.SqlServer.Management.UI.ConnectionDlg.ConnectionDialog.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
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)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
------------
Microsoft.SqlServer.Express.AppIDPackage
Assembly Version: 9.0.242.0
Win32 Version: 9.00.2047.00
CodeBase:file:///C:/Program/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.SqlServer.Express.AppIDPackage.DLL
------------
Microsoft.SqlServer.Express.VSIntegration
Assembly Version: 9.0.242.0
Win32 Version: 9.00.2047.00
CodeBase:file:///C:/Program/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.SqlServer.Express.VSIntegration.DLL
------------
Microsoft.VisualStudio.Shell.Interop
Assembly Version: 7.1.40304.0
Win32 Version: 7.0.4054
CodeBase:file:///C:/WINDOWS/assembly/GAC/Microsoft.VisualStudio.Shell.Interop/7.1.40304.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Shell.Interop.dll
------------
Microsoft.VisualStudio.OLE.Interop
Assembly Version: 7.1.40304.0
Win32 Version: 7.0.4054
CodeBase:file:///C:/WINDOWS/assembly/GAC/Microsoft.VisualStudio.OLE.Interop/7.1.40304.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.OLE.Interop.dll
------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
------------
Microsoft.SqlServer.Express.SqlTDiagM
Assembly Version: 9.0.242.0
Win32 Version: 9.00.2047.00
CodeBase:file:///C:/Program/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.SqlServer.Express.SqlTDiagM.DLL
------------
Microsoft.DataWarehouse.SQM
Assembly Version: 9.0.242.0
Win32 Version: 9.00.2047.00
CodeBase:file:///C:/Program/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.DataWarehouse.SQM.DLL
------------
Microsoft.SqlServer.Instapi
Assembly Version: 9.0.242.0
Win32 Version: 9.00.1399.00
CodeBase:file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.SqlServer.Instapi/9.0.242.0__89845dcd8080cc91/Microsoft.SqlServer.Instapi.dll
------------
Microsoft.SqlServer.Express.ObjectExplorer
Assembly Version: 9.0.242.0
Win32 Version: 9.00.2047.00
CodeBase:file:///C:/Program/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.SqlServer.Express.ObjectExplorer.DLL
------------
Microsoft.SqlServer.Express.ConnectionDlg
Assembly Version: 9.0.242.0
Win32 Version: 9.00.2047.00
CodeBase:file:///C:/Program/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.SqlServer.Express.ConnectionDlg.DLL
------------
Microsoft.SqlServer.Express.RegSvrEnum
Assembly Version: 9.0.242.0
Win32 Version: 9.00.2047.00
CodeBase:file:///C:/Program/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.SqlServer.Express.RegSvrEnum.DLL
------------
Microsoft.SqlServer.Express.SqlWorkbench.Interfaces
Assembly Version: 9.0.242.0
Win32 Version: 9.00.2047.00
CodeBase:file:///C:/Program/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.SqlServer.Express.SqlWorkbench.Interfaces.DLL
------------
Microsoft.VisualStudio.TextManager.Interop
Assembly Version: 7.1.40304.0
Win32 Version: 7.0.4054
CodeBase:file:///C:/WINDOWS/assembly/GAC/Microsoft.VisualStudio.TextManager.Interop/7.1.40304.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.TextManager.Interop.dll
------------
Microsoft.SqlServer.Express.SqlMgmt
Assembly Version: 9.0.242.0
Win32 Version: 9.00.2047.00
CodeBase:file:///C:/Program/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.SqlServer.Express.SqlMgmt.DLL
------------
Microsoft.SqlServer.Express.SQLEditors
Assembly Version: 9.0.242.0
Win32 Version: 9.00.2047.00
CodeBase:file:///C:/Program/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.SqlServer.Express.SQLEditors.DLL
------------
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
------------
Microsoft.SqlServer.Express.ConnectionInfo
Assembly Version: 9.0.242.0
Win32 Version: 9.00.2047.00
CodeBase:file:///C:/Program/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.SqlServer.Express.ConnectionInfo.DLL
------------
EnvDTE
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.42 (RTM.050727-4200)
CodeBase:file:///C:/WINDOWS/assembly/GAC/EnvDTE/8.0.0.0__b03f5f7f11d50a3a/EnvDTE.dll
------------
Microsoft.SqlServer.Express.CustomControls
Assembly Version: 9.0.242.0
Win32 Version: 9.00.2047.00
CodeBase:file:///C:/Program/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.SqlServer.Express.CustomControls.DLL
------------
Microsoft.SqlServer.Express.SqlEnum
Assembly Version: 9.0.242.0
Win32 Version: 9.00.2047.00
CodeBase:file:///C:/Program/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.SqlServer.Express.SqlEnum.DLL
------------
Microsoft.NetEnterpriseServers.Express.ExceptionMessageBox
Assembly Version: 9.0.242.0
Win32 Version: 9.00.2047.00
CodeBase:file:///C:/Program/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.NetEnterpriseServers.Express.ExceptionMessageBox.DLL
------------
Accessibility
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

******************************************************************

Why do I get this and what should I do to avoid it? I've installed Atlas and tried out some AJAX components from Telerik, but I haven't done anything else sppoky to the machine (Windows XP Home, SP2). If I click Continue, I cn still open Sql Management Studio Express, but get this error code occasionally.

2. I have my db in the folder VWD suggested, that is My Documents>My websites>the website's name, but I can't seem to navigate to there. Instead the Object Explorer is stuck in my computer's topnode somewhere. What should I do? It seems strange to me that these things don't fit together if that's the case. Or has this to do with the problem stated above? I admit I know little about this, having previously worked with Access and MySql only.

Please help me out! An additional note: I don't particularily want this app anyway, just a convenient and reliable way to attach my db to the web host's Sql Server. Is there an easier way (or maybe this is easy but just not working ;-) )?

Thanks for any replies,

Pettrer

Your error is saying Windows Forms so I don't know but you could ask your hosting company backup and restore permissions so you can just backup and restore. The other option modify the code in the thread below to the info you get from the hosting compaby so attach your database. And if you are having probelm with all of the above with Express test drive the full version just right click at the top of Management studio to register the Express. Hope this helps.

http://www.microsoft.com/sql/downloads/trial-software.mspx

http://forums.asp.net/thread/977493.aspx

|||

Hi,

Thanks for all of your suggestions, but actually I'm only trying out the Management Studio locally for now (the error appeared the first time I opened it). I think I'll try to re-install it and see if it works better...

Pettrer

|||

It did! ;-)

P

Problems with log file size in SQL Server 2005

I've dealing with a newly created database in SQL Server 2005 Developer
Edition.
I'm having many trouble with the size of the log file. This database is
being used in a Merge Replication scenario and I'm currently creating,
deleting publications quite often. Initially I had autogrowth enabled
for the log file (initial size of 20 Mb), with 100 MBytes of maximum
size.
With this configuration, two hours ago, I deleted a publication and I
received this error:
The transaction log for database 'X is full. To find out why space in
the log cannot be reused, see the log_reuse_wait_desc column in
sys.databases
Changed database context to 'X'. (Microsoft SQL Server, Error: 9002)
I have now disabled autogrowth and have been able to delete the
publication, but I understand Merge Replication needs very much space
in the log file for all operations it performs.
Any advice or correct approach on this?
Thanks in advance.
Hi
Do BACKUP LOG file as it described in the BOL
Read 'recovery [SQL Server replication]' topic in the BOL
"Lonifasiko" <mloichate@.gmail.com> wrote in message
news:1141651209.039661.101840@.j33g2000cwa.googlegr oups.com...
> I've dealing with a newly created database in SQL Server 2005 Developer
> Edition.
> I'm having many trouble with the size of the log file. This database is
> being used in a Merge Replication scenario and I'm currently creating,
> deleting publications quite often. Initially I had autogrowth enabled
> for the log file (initial size of 20 Mb), with 100 MBytes of maximum
> size.
> With this configuration, two hours ago, I deleted a publication and I
> received this error:
> The transaction log for database 'X is full. To find out why space in
> the log cannot be reused, see the log_reuse_wait_desc column in
> sys.databases
> Changed database context to 'X'. (Microsoft SQL Server, Error: 9002)
> I have now disabled autogrowth and have been able to delete the
> publication, but I understand Merge Replication needs very much space
> in the log file for all operations it performs.
> Any advice or correct approach on this?
> Thanks in advance.
>
|||I'll read it, but at a first glance, what is exactly what I should do?
A backup of the log file every 'X' minutes or something like this?
Thanks very much.
|||I tried doing a backup of the log before attempting to change the
publication's properties. This is what I read from BOL section you
suggested me. And I still have the log file with autogrowth disabled.
I tried to delete the current publication and.......same error
appears, that log file cannot be reused. So finally, in order to start
the Merge Agent again, I have to enable autogrowth for the log file,
which I don't like at all.
I need a concrete solution for this urgently!
|||Lonifasiko wrote:
> I tried doing a backup of the log before attempting to change the
> publication's properties. This is what I read from BOL section you
> suggested me. And I still have the log file with autogrowth disabled.
> I tried to delete the current publication and.......same error
> appears, that log file cannot be reused. So finally, in order to start
> the Merge Agent again, I have to enable autogrowth for the log file,
> which I don't like at all.
> I need a concrete solution for this urgently!
>
What's the problem in having autogrow enabled? If the logfile really
needs the space, it don't help you anywhere to disable the autogrow.
The only thing that can help you, is to backup the logfile (regularly)
like Uri suggested. When you backup the log, it will be truncated which
means you can re-use the space that's occupied by the data that has been
backed up.
If you have some long running transactions though, these can "prevent"
the backup command from freeing up the space and then the space will not
be freed up and the logfile will have to grow.
Regards
Steen
|||Hi,
I now see the unique way is backing up the log file and enabling again
autogrowth.
I've done a manteinance plan that backs up my log file once a day. This
way the log file will be reused? In the wizard, there is no any options
that lets me say "truncate transaction log". And I suppose log file
will continue growing........
When I select the database and then "Back up..." in Management Studio,
the unique log backup I can do is manual. I cannot program it as a DTS
or similar.
Therefore, it's correct the idea of executing a manteinance plan
regularly to prevent log files from being full?
Can you point me in the right direction (exactly what I must do) please
when performing log backups?
Thanks in advance.
|||Lonifasiko wrote:
> Hi,
> I now see the unique way is backing up the log file and enabling again
> autogrowth.
> I've done a manteinance plan that backs up my log file once a day. This
> way the log file will be reused? In the wizard, there is no any options
> that lets me say "truncate transaction log". And I suppose log file
> will continue growing........
> When I select the database and then "Back up..." in Management Studio,
> the unique log backup I can do is manual. I cannot program it as a DTS
> or similar.
> Therefore, it's correct the idea of executing a manteinance plan
> regularly to prevent log files from being full?
> Can you point me in the right direction (exactly what I must do) please
> when performing log backups?
> Thanks in advance.
>
I'm not using Maintenance Plans to backup my database and log files, so
I might not be the right to guide you on that. Instead of using a
maintenance plan though, you can write your on SQL statement that back
up the log (and database if you like) and then schedule this script to
run at a certain interval.
You can look up the syntax for backing up you database and log with SQL
in Books On Line.
The short version of the syntax is :
BACKUP LOG YourDatabaseName TO DISK ='The path to your backup
directory\YourBackupFileName.bak'
and
BACKUP DATABASE YourDatabaseName TO DISK ='The path to your backup
directory\YourBackupFileName.trn'
If you choose to backup using SQL, it might be a good idea to expand the
script to use a variable for the backupfilename so you can give it new
name every time you back it up -e.g. based on the date.
Regards
Steen
|||OK, I think I'll try next days with the manteinance plan I've written.
If it does not work this way, I'll try with doing it by script.
Sorry to be so repetitive, but back to my worrying log file size:
having log file maximum size limited to 200 MBytes and backing up the
log file regularly, can you surely tell me log file size will never go
over 200 MBytes?
That's exactly what I need. Thanks very much.
|||> having log file maximum size limited to 200 MBytes and backing up the
> log file regularly, can you surely tell me log file size will never go
> over 200 MBytes?
If you set max size to 200MB, then SQL Server will not autogrow to more than that. But max size
doesn't influence how the file can be recycled. If you have a large transaction or don't do log
backup often enough and have the size limited, then you will end up in error 9002 any time you do a
modification and the log file is full.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Lonifasiko" <mloichate@.gmail.com> wrote in message
news:1141806712.812195.315820@.j52g2000cwj.googlegr oups.com...
> OK, I think I'll try next days with the manteinance plan I've written.
> If it does not work this way, I'll try with doing it by script.
> Sorry to be so repetitive, but back to my worrying log file size:
> having log file maximum size limited to 200 MBytes and backing up the
> log file regularly, can you surely tell me log file size will never go
> over 200 MBytes?
> That's exactly what I need. Thanks very much.
>

Monday, March 12, 2012

Problems with Full Text Index Population

I've currently got a problem with a large full text index on table
that has around 130 million rows. The table has a total of 6 columns
enabled for full-text indexing, and the total size of the index is
around 40GB.
The problem is that the index will, on occasion, show 'paused'. It
does this after the index has been working and updating normally for a
number of weeks, and from this point onwards we have been unable to
re-start population of the index. The only we have found of bringing
the index up again is to do a full population - which takes around 3
weeks.
I found a document that described some of the performance counters
that can be used to monitor what the FTI is doing. In particular, a
counter named Microsoft Gatherer : Reason for Backoff is showing 'High
Notification Rate' (see attached gif) when the index population
pauses.
At present we have both 'change tracking enabled' and 'update index in
background' enabled on the database, and the performance counter is
therefore indicating to me that, given the size of the database, it
simply can't keep up with the number of changes that are happening in
the background.
One option is to stop updating the index in the background, and
schedule an incremental index update at low periods (overnight),
whilst still using the 'change tracking option'.
Has anyone come across this situation before?
I have had a couple of thoughts about things to try
1. the db server has 8 CPUs - I understand that one (or more) CPUs can
be decidated to the MSSearch service.
2. use the sp_fulltext_service, 'resource_usage' stored proc and maybe
set to 4 in order to force the server to dedicate more resources to
the index population
Any advice or suggestions would be gratefully received.
Regards
Craig
Craig,
Could you provide the full output of -- SELECT @.@.version -- as this is very
helpful info in troubleshooting FTS issue. For now, I'm going to assume that
you're using SQL Server 2000 based upon the below information. As Microsoft
has never formally documented the upper limit of rows that SQL Server 2000
will support, as they have only acknowledged that this version was tested up
to 20 million rows. As you're attempting to FT Index a table with 130
million rows, I'd recommend that you consider using SQL Server 2005
(codename Yukon) as it has been acknowledged by Microsoft to have been
tested up to 200 million row. However, keep in mind that SQL Server 2005 is
still in a beta stage (Beta2) and will not be formally released until
sometime in 2005.
I'm assuming that the document you found that spoke of the performance
counters is referenced in "SQL Server 2000 Full-Text Search Deployment white
paper" at http://support.microsoft.com/default...b;en-us;323739
You may also want to review the Dec 2003 version of "SQL Server 2005
Full-Text Search: Internals and Enhancements" at
http://msdn.microsoft.com/library/de...ovyukondev.asp
Finally, you may also want to review this KB article 303459 (Q303459) "INF:
How to Improve the Performance of FTS Queries for Large Tables" at
http://support.microsoft.com/?id=303459
Hope this helps!
John
"cms2001" <info@.craigstreet.com> wrote in message
news:94e7d7f4.0412021704.47e15474@.posting.google.c om...
> I've currently got a problem with a large full text index on table
> that has around 130 million rows. The table has a total of 6 columns
> enabled for full-text indexing, and the total size of the index is
> around 40GB.
> The problem is that the index will, on occasion, show 'paused'. It
> does this after the index has been working and updating normally for a
> number of weeks, and from this point onwards we have been unable to
> re-start population of the index. The only we have found of bringing
> the index up again is to do a full population - which takes around 3
> weeks.
> I found a document that described some of the performance counters
> that can be used to monitor what the FTI is doing. In particular, a
> counter named Microsoft Gatherer : Reason for Backoff is showing 'High
> Notification Rate' (see attached gif) when the index population
> pauses.
> At present we have both 'change tracking enabled' and 'update index in
> background' enabled on the database, and the performance counter is
> therefore indicating to me that, given the size of the database, it
> simply can't keep up with the number of changes that are happening in
> the background.
> One option is to stop updating the index in the background, and
> schedule an incremental index update at low periods (overnight),
> whilst still using the 'change tracking option'.
> Has anyone come across this situation before?
> I have had a couple of thoughts about things to try
> 1. the db server has 8 CPUs - I understand that one (or more) CPUs can
> be decidated to the MSSearch service.
> 2. use the sp_fulltext_service, 'resource_usage' stored proc and maybe
> set to 4 in order to force the server to dedicate more resources to
> the index population
> Any advice or suggestions would be gratefully received.
> Regards
> Craig
|||Hi John
Many thanks for getting back to me on this. Your assumption of SQL
Server 2000 is correct - SP3 to be precise.
And yes, the whitepaper you added a link to was the document i was
talking about. This has proved very useful so far in our
investigations, along with the other link you added.
As far as SQL Server 2005 goes, this is something that we are working
on in the background. I have read up on the new full text capabilites,
and understand that it has been re-written from the ground up. I am
sure that it would provide a much more scalable platform given the
volumme of data we are talking about.
Our current FTI problems on SQL Server 2000 are actually delaying the
launch of a product, so its imperative that we get this up and running
as soon as possible in some shape or form. The business has some
decisions to make around SQL Server 2005, but there are also
associated risks given its current beta state, so I need to persevere
with SQL Server 2000 for now.
I did have a couple of thoughts around possibilites that we could try.
I don't have the exact specs of the hardware we are running this on at
the moment - but i do know that the box has a total of 8 processors.
Given this, i'm thinking about the following
1/ assign MSSearch.exe to CPU0, and set sp_fulltext_service
'resource_usage', to 4 or 5 to allow the full text engine to consume
more resources
2/ assign SQL Server processors CPU1-6
3/ CPU7 should be left free to handle the NIC
As far as i know, MSSearch will only use a single processor, so even
if we commit CPU0 fully (sp_fulltext_service, 'resource_usage', 5) to
MSSearch, SQL Server should still have 6 processors to play with.
There may also be an option to schedule population of the index during
low periods (overnight) rather than in the background. This would be a
compromise on required funtionality, but may at least be a way forward
in the short term. I'm unsure at present of whether this would help
our situation, but may be worth a try. What do you read into the 'High
Notification Rate' - do you think a scheduled index population may
help in this situation.
The other interesting thing is that although we have the 'High
Notification Rate' message, the CPUs so not seem to be maxing out
(running at 15-25%), and IO seems as though it seems to have some
spare capacity.
Again, many thanks for helping us out with this. If you have any
thoughts on the above, or any other guidance or suggestions, you input
would be much appreciated.
Regards
Craig
"John Kane" <jt-kane@.comcast.net> wrote in message news:<eHoqKsO2EHA.3392@.TK2MSFTNGP10.phx.gbl>...[vbcol=seagreen]
> Craig,
> Could you provide the full output of -- SELECT @.@.version -- as this is very
> helpful info in troubleshooting FTS issue. For now, I'm going to assume that
> you're using SQL Server 2000 based upon the below information. As Microsoft
> has never formally documented the upper limit of rows that SQL Server 2000
> will support, as they have only acknowledged that this version was tested up
> to 20 million rows. As you're attempting to FT Index a table with 130
> million rows, I'd recommend that you consider using SQL Server 2005
> (codename Yukon) as it has been acknowledged by Microsoft to have been
> tested up to 200 million row. However, keep in mind that SQL Server 2005 is
> still in a beta stage (Beta2) and will not be formally released until
> sometime in 2005.
> I'm assuming that the document you found that spoke of the performance
> counters is referenced in "SQL Server 2000 Full-Text Search Deployment white
> paper" at http://support.microsoft.com/default...b;en-us;323739
> You may also want to review the Dec 2003 version of "SQL Server 2005
> Full-Text Search: Internals and Enhancements" at
> http://msdn.microsoft.com/library/de...ovyukondev.asp
> Finally, you may also want to review this KB article 303459 (Q303459) "INF:
> How to Improve the Performance of FTS Queries for Large Tables" at
> http://support.microsoft.com/?id=303459
> Hope this helps!
> John
>
> "cms2001" <info@.craigstreet.com> wrote in message
> news:94e7d7f4.0412021704.47e15474@.posting.google.c om...
|||You're welcome, Craig,
I suspected the SQL 2000 FTS Deployment whitepaper was what you were reading
as I'm one of the *authors* of that document and I did all of the original
research. As for your current FTI problems with SQL Server 2000, they are
not going away as 130 million rows is most likely out of reach for SQL2K
FTS. Contact me offline and I can provide you with some alternatives.
In the meanwhile, and relative to setting the MSSearch service CPU affinity,
you can set the MSSearch service's to use one CPU and then use sp_configure
to set the affinity of SQL Server to that cpu to avoid cpu contention during
heavy MSSearch CPU usage via the following method - launch the Tskmgr.exe
from the AT command on the multi-proc server where sql server resides, as
follows:
at <current_time+1min> /interactive taskmgr.exe
when it launches, you can then set "cpu affinity" for the MSSearch service
to a cpu or set of cpu's not being used by SQL Server. Then you would use
sp_configure to set SQL Server's cpu affinity to the other cpu's, thus
preventing the cpu usage of mssearch from affecting your sql server
processing. Note, this only works on multi-processor servers and is a
secured method for achieving this feature. I've also have documented methods
for allowing the MSSearch service CPU affinity settings to survive a server
reboot.
In regards to the 'High Notification Rate', this most likely is one of two
situations, either SQL Server is *pushing* too many rows to the MSSearch
service to handle or the MSSearch service needs to do a shadow merge in
order to free up some contiguous memory allocated space that it needs to
continue. Although, I think the former is the issue, but then I've never FT
Indexed 130 million rows! SQL Server 2000 FT Indexing is mainly I/O bound
and even at a resource_usage level of 5, the max memory usage is set to
512MB of RAM, assuming that it is available and not used by either SQL
Server or the OS.
Regards,
John
"cms2001" <info@.craigstreet.com> wrote in message
news:94e7d7f4.0412031724.65d5a021@.posting.google.c om...
> Hi John
> Many thanks for getting back to me on this. Your assumption of SQL
> Server 2000 is correct - SP3 to be precise.
> And yes, the whitepaper you added a link to was the document i was
> talking about. This has proved very useful so far in our
> investigations, along with the other link you added.
> As far as SQL Server 2005 goes, this is something that we are working
> on in the background. I have read up on the new full text capabilites,
> and understand that it has been re-written from the ground up. I am
> sure that it would provide a much more scalable platform given the
> volumme of data we are talking about.
> Our current FTI problems on SQL Server 2000 are actually delaying the
> launch of a product, so its imperative that we get this up and running
> as soon as possible in some shape or form. The business has some
> decisions to make around SQL Server 2005, but there are also
> associated risks given its current beta state, so I need to persevere
> with SQL Server 2000 for now.
> I did have a couple of thoughts around possibilites that we could try.
> I don't have the exact specs of the hardware we are running this on at
> the moment - but i do know that the box has a total of 8 processors.
> Given this, i'm thinking about the following
> 1/ assign MSSearch.exe to CPU0, and set sp_fulltext_service
> 'resource_usage', to 4 or 5 to allow the full text engine to consume
> more resources
> 2/ assign SQL Server processors CPU1-6
> 3/ CPU7 should be left free to handle the NIC
>
> As far as i know, MSSearch will only use a single processor, so even
> if we commit CPU0 fully (sp_fulltext_service, 'resource_usage', 5) to
> MSSearch, SQL Server should still have 6 processors to play with.
> There may also be an option to schedule population of the index during
> low periods (overnight) rather than in the background. This would be a
> compromise on required funtionality, but may at least be a way forward
> in the short term. I'm unsure at present of whether this would help
> our situation, but may be worth a try. What do you read into the 'High
> Notification Rate' - do you think a scheduled index population may
> help in this situation.
> The other interesting thing is that although we have the 'High
> Notification Rate' message, the CPUs so not seem to be maxing out
> (running at 15-25%), and IO seems as though it seems to have some
> spare capacity.
> Again, many thanks for helping us out with this. If you have any
> thoughts on the above, or any other guidance or suggestions, you input
> would be much appreciated.
> Regards
> Craig
>
>
>
> "John Kane" <jt-kane@.comcast.net> wrote in message
news:<eHoqKsO2EHA.3392@.TK2MSFTNGP10.phx.gbl>...[vbcol=seagreen]
very[vbcol=seagreen]
that[vbcol=seagreen]
Microsoft[vbcol=seagreen]
2000[vbcol=seagreen]
tested up[vbcol=seagreen]
is[vbcol=seagreen]
white[vbcol=seagreen]
http://msdn.microsoft.com/library/de...ovyukondev.asp[vbcol=seagreen]
"INF:[vbcol=seagreen]

Saturday, February 25, 2012

Problems with accessing database remotely

I'm writing an web app in VS2005.

I've created a product.mdf database through VS2005's Server Explorer (to my knowledge, I'm not using Sql Express). (Side question. The .mdf files are a stand alone xml structure used as a database, correct?).

When I execute locally, everything works great. But when I moved my code to where it is being hosted (remote computer). It's throwing the following error:

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

This is my connection string:

<addname="MyConnectionString1"connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Product.mdf;Integrated Security=True;User Instance=True"providerName="System.Data.SqlClient"/>

What is my problem?

There is no SQL Server 2005 Express running on the remote server.

Jos

|||

Actually, you ARE using SQL Express. The Visual Studio environment does a great job in hiding this - but behind the scenes a SQL Express database engine is running on your local machine (you can see it in the Services.msc explorer). Your web application is using the web.config connection string tofind this SQL Express database.

As the previous reply says, the error message is due to the application trying to find a SQL Express database engine running on the remote computer and serving a database called Product.mdf.

The solution to your problem may be to install SQL Express on the remote computer. You will then need to copy (attach) the Product.mdf database to the remote database server.

However, if your "remote computer" is actually a hosting provider - they may not (and most don't) support SQL Express - and may insist that you use SQL Server Enterprise instead, which is a far more robust option anyway.

|||

Why I got the error message?

The error message you got was due to the using of SQL Express in your local (development) machine.

Ok, how to solve this issue?

It is easy. Eiteher use SQL Express on your production (e.g. hosting server) [NOT Recommended] or do the following:

Attach your .mdf file to a database (e.g. new database) in the sql server of the hosting company.
Change your ConnectionString to be as following:

<add name="MyConnectionString1" connectionString="Server=YourSqlServerName;Database=MyDatabase;Integrated Security=True;" providerName="System.Data.SqlClient"/>

YourSqlServerName: Type the name of the sql server as provided by the hosting company.

MyDatabase: The database you are using which reside in the hosting company sql server.

Note: The above ConnectionString is used with "Windows Authentication", for the "Mixed Mode" use the following ConnectionString:

<add name="MyConnectionString1" connectionString="Server=YourSqlServerName;Database=MyDatabase;User ID=MyUserID; Password:MyStrongPassword"providerName="System.Data.SqlClient"/>