Sunday, March 25, 2012
(local) Alias does not function in an virtual sql server?
virtual sql server, the application tries to connect to the active node
instead, resulting in an error message (SQL Server does not exist or access
denied).
Is it possible to configure this alias to connect to the virtual sql server?
Furthermore I recognized, that DTS-Packages with (local)-Data Sources still
work on the virtual server. On a second, similar installed server, this
results in the same error message.
Any thoughts?
Martin Saalmann
There is an Environment Variable you can use in order to run the SQLDIAG
utility on the active node. I'm not sure if it uses the (local) or the "."
designation, but it would be worth a shot.
Type set _CLUSTER_NETWORK_NAME_=SQL NETWORK NAME, and then press ENTER.
NOTE: The SQL NETWORK NAME is the SQL Server virtual name for a named
instance. This is only the first part of the name. For example, if the
instance name is VSQL2\INST2, the SQL NETWORK NAME is VSQL2.
INF: How To Run SQLDIAG On a Clustered/Virtual SQL Server
http://support.microsoft.com/kb/233332/EN-US/
Sincerely,
Anthony Thomas
"Martin Saalmann" <MartinSaalmann@.discussions.microsoft.com> wrote in
message news:8CD4BBE4-7548-4BD5-BDF1-7B437D2A102E@.microsoft.com...
> When I try to connect to (local) server (in Query Analyzer for example) on
an
> virtual sql server, the application tries to connect to the active node
> instead, resulting in an error message (SQL Server does not exist or
access
> denied).
> Is it possible to configure this alias to connect to the virtual sql
server?
> Furthermore I recognized, that DTS-Packages with (local)-Data Sources
still
> work on the virtual server. On a second, similar installed server, this
> results in the same error message.
> Any thoughts?
> Martin Saalmann
>
|||Martin,
you could create an Alias on each Node in the Client Network Utility with
name (local) and then the real name to point at the SQL Virtual Name
Andy.
"Martin Saalmann" <MartinSaalmann@.discussions.microsoft.com> wrote in
message news:8CD4BBE4-7548-4BD5-BDF1-7B437D2A102E@.microsoft.com...
> When I try to connect to (local) server (in Query Analyzer for example) on
> an
> virtual sql server, the application tries to connect to the active node
> instead, resulting in an error message (SQL Server does not exist or
> access
> denied).
> Is it possible to configure this alias to connect to the virtual sql
> server?
> Furthermore I recognized, that DTS-Packages with (local)-Data Sources
> still
> work on the virtual server. On a second, similar installed server, this
> results in the same error message.
> Any thoughts?
> Martin Saalmann
>
Thursday, March 22, 2012
( ) problem
hi all,
i have some problem in my web application, am using vb.net
i have a text box and an add button, when the user click on the add button, whatever written in the textbox stores on my sql database
the problem is whenever there is a ( ' ) character in the text, it send me error
i know why this problem occure but i dont know what is the reqired code for it
this is the code:
sql.commandtext = "INSERT INTO myDB (Ques) VALUES ('" & txtQues.text & "')
what is the solution?
The answer is very simple in C# those are literals and in ANSI SQL they are Delimited Identifiers per ANSI SQL 92 and SQL Server is compliant so try the link below on how to enable it and handle it correctly. Hope this helps.
http://msdn2.microsoft.com/en-us/library/ms176027.aspx
|||If you think about it, you are putting together the string before it gets sent to SQL Server. So, if your value has a single quote it, your insert would look something like:
INSERT INTO myDB (Ques) VALUES ('myvalue's')
This is confusing. The string seems to end after the 'e', when you really want it to end after the 's'. As said, SQL Server is taking that literally. If you're going to build the insert statement this way (as opposed to using a stored procedure), you need to replace single quotes with two single quotes (not a double quote - literally two single quotes).
txtQues.Text.Replace("'", "''")
The string passed to the database will be:
INSERT INTO myDB (Ques) VALUES ('myvalue''s')
which the database will interpret correctly.
|||Parameterized queries.|||thanks alot... for your help
Tuesday, March 20, 2012
"The statement did not return a result set" error on SPs with exec
Hi Richard,
Could you post a sample stored procedure that demonstrates this behavior and the syntax you are using to call it? It sounds like the driver thinks the stored procedure is returning an update count rather than a result set as the first result.
Thanks,
--David Olix
JDBC Development
|||This took a while to pinpoint. It turns out that the problem doesn't have anything to do with exec, instead it looks like a problem with UpdateText. I can reproduce the problem with the following sp:
create procedure spTest
@.id_list ntext
as
declare @.txtptr binary(16),
@.list_length integerCreate Table #parse
( IDList ntext )
Insert Into #parse
Select @.id_listSelect @.txtptr = TextPtr(IDList)
from #parse with (nolock)
Select @.list_length = DataLength(@.id_list)
if ( @.list_length > 0 AND Substring(@.id_list,@.list_length,1) <> ',')
Begin
UpdateText #parse.IDList @.txtptr NULL 0 ','
End
select * from #parse -- comment out this line to have no result setReturn 0
GO
and call it with the following:
PreparedStatement stmt = null;
ResultSet rs = null;
try {
Connection con = this.getConnection();
stmt = con.prepareCall("{call spTest(?)}");
stmt.setString(1, "12,15");
rs = stmt.executeQuery();
}
catch( SQLException e )
{
logger.severe(e.getMessage());
e.printStackTrace();
}
finally {
closeVars(null,stmt,rs);
}
If I replace the "UpdateText" with anything else, no exception is thrown.
|||I'm wondering if UpdateText is returning a value that the driver interprets as an update count. Could you try calling this sp with execute() rather than executeQuery() and let me know if you get an update count followed by the result set that you expect?
Thanks again,
--David Olix
JDBC Development
|||If I call execute followed by getUpdateCount, it returns 1 for the update count. If I call getResultSet after that, it returns null.|||I forgot to mention it above, but you need to call getMoreResults between getUpdateCount and getResultSet. I think the result set should be there.
Regardless, this gives me enough information to start on a fix to your problem. You may want to file this as a bug through the MSDN Product Feedback Center http://lab.msdn.microsoft.com/productfeedback/default.aspx so that you can track it.
Thanks!
|||Even after I added a getMoreResults call between getUpdateCount and getResultSet, getResultSet still returned a null ResultSet.
I'll file a bug report. Thanks for your help.
"The statement did not return a result set" error on SPs with exec
Hi Richard,
Could you post a sample stored procedure that demonstrates this behavior and the syntax you are using to call it? It sounds like the driver thinks the stored procedure is returning an update count rather than a result set as the first result.
Thanks,
--David Olix
JDBC Development
|||This took a while to pinpoint. It turns out that the problem doesn't have anything to do with exec, instead it looks like a problem with UpdateText. I can reproduce the problem with the following sp:
create procedure spTest
@.id_list ntext
as
declare @.txtptr binary(16),
@.list_length integerCreate Table #parse
( IDList ntext )
Insert Into #parse
Select @.id_listSelect @.txtptr = TextPtr(IDList)
from #parse with (nolock)
Select @.list_length = DataLength(@.id_list)
if ( @.list_length > 0 AND Substring(@.id_list,@.list_length,1) <> ',')
Begin
UpdateText #parse.IDList @.txtptr NULL 0 ','
End
select * from #parse -- comment out this line to have no result setReturn 0
GO
and call it with the following:
PreparedStatement stmt = null;
ResultSet rs = null;
try {
Connection con = this.getConnection();
stmt = con.prepareCall("{call spTest(?)}");
stmt.setString(1, "12,15");
rs = stmt.executeQuery();
}
catch( SQLException e )
{
logger.severe(e.getMessage());
e.printStackTrace();
}
finally {
closeVars(null,stmt,rs);
}
If I replace the "UpdateText" with anything else, no exception is thrown.
|||I'm wondering if UpdateText is returning a value that the driver interprets as an update count. Could you try calling this sp with execute() rather than executeQuery() and let me know if you get an update count followed by the result set that you expect?
Thanks again,
--David Olix
JDBC Development
|||If I call execute followed by getUpdateCount, it returns 1 for the update count. If I call getResultSet after that, it returns null.|||I forgot to mention it above, but you need to call getMoreResults between getUpdateCount and getResultSet. I think the result set should be there.
Regardless, this gives me enough information to start on a fix to your problem. You may want to file this as a bug through the MSDN Product Feedback Center http://lab.msdn.microsoft.com/productfeedback/default.aspx so that you can track it.
Thanks!
|||Even after I added a getMoreResults call between getUpdateCount and getResultSet, getResultSet still returned a null ResultSet.
I'll file a bug report. Thanks for your help.
Monday, March 19, 2012
"SQL Server Mobile encountered problems when opening the database."
Hi,
I am writing an application for a device (HP IPAQ 6828) having Windows Mobile 5.0 using
-MS .NET Compact Framework 2.0 SP-1
-SQL Mobile 2005.
-VS 2005 .NET
The application uses Merge Replication. The error occurs in the Synchronise() Method of the SqlCeReplication object.
"SQL Server Mobile encountered problems when opening the database."
repl.AddSubscription(AddOption.ExistingDatabase)
repl.Synchronize()
I also checked the the connection string and it seems to be fine. Both my device and server can ping each other. Moreever I can also access the Web syncronization folder(on server) from the device.
Is anyone having a resolution for this?The most common is not disposing the replication object or other data related objects. Make sure there isn't any other arround.
Sql Mobile 2005 allows multiple connections except while syncronizing.
Another known cause is a bad path on the connection string.
Other forum entries referring this problem:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=334604&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=478902&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=961633&SiteID=1|||
Hi,
I finally found the solution to this...
repl.AddSubscription(AddOption.ExistingDatabase)
repl.Synchronize()
(Note: I am trying to synchronize on an exisiting database)
The problem was since my database is already in use by my application and I am trying to sync the same DB. Synchronization cannot occur if the connection is already open by the application. Sql Mobile 2005 allows multiple connections except while synchronizing.
Therefore we need to close and dispose the open connection used by the application as under before attempting to synchonize.
(Below is the sample code)
private sub SampleSync()
sharedCon.close
sharedCon.dispose
try
' TO DO: Set replication object properties here
repl.AddSubscription(AddOption.ExistingDatabase)
repl.Synchronize()
finally
repl.dispose
end try
' TO DO: Open your shared connection here if required.
End sub
Note: Most of the times the connection string also causes a problem. A sample connection string would look like this...
repl.SubscriberConnectionString ="\Program Files\YourAppName\YourDb.sdf;Password =<...>"
"SQL Server Management Studio Express" install location
Peter|||found it here
"C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\ssmsee.exe"
Friday, March 16, 2012
"Report is being generated"
Hi
I have a windows application. I am using following code right after setting the LocalReport ReportPath. Report rendering is too slow if use following line of code and Report viewer does not show spiny and the text that says “Report is being generated.”
Me.ReportViewer1.SetDisplayMode(DisplayMode.PrintLayout)
Me.ReportViewer1.ZoomMode = ZoomMode.Percent
Me.ReportViewer1.ZoomPercent = 80
Please advise how can make it fast and show spiny.
Thanks in advance.
As to how to make it fast, you need to either increase the horsepower of your system or optimize your SQL query.
As to the spiny thingy, I believe that setting the zoom on the report viewer changes the zoom of the report once it is rendered. From what I can tell, the spiny thingy is rendered prior to the report being rendered.
I think the report viewer is actually showing the spiny thingy, but your report viewer is too large and the spiny thingy always appears in the middle of the report viewer.
I've yet to find an answer as to how to move the spiny thingy closer to the upper left corner of the screen. If you figure it out, let me know!
|||
Thanks for your reply. I think it is not related with SQL server query or system speed. If I take out following line of code it works superfast and spiny also appears.
Me.ReportViewer1.SetDisplayMode(DisplayMode.PrintLayout)
Me.ReportViewer1.ZoomMode = ZoomMode.Percent
Me.ReportViewer1.ZoomPercent = 80
I am getting a dataset from the server and then assigning that dataset to RDL file in Windows application at client side so there is no SQL server involved.
Spiny does not appear even after taking out Zoom mode and zoom percent. I guess something is wrong with setting DisplayMode.PrintLayout.
|||Any answer?|||
Just a reality check on Mr. Spiny:
Are you executing this report asynchronously?
>L<
|||Yes.|||Then, see here http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=231258&SiteID=1>L<
|||Thanks Lisa,
I am using a Report Viewer for Windows application and I guess by default AsyncRendering is True. I did not find any way to make it false to give a try. I am still not able to figure it out why "SetDisplayMode(DisplayMode.PrintLayout)" making report rendering so slow and also it is making spiny to disapear.
Appreciate you help.
|||Hi there,
Of course you're right that there is this difference between web and winform usage -- and I often forget which we're talking about <sigh>. I apologize.
Did you try using the ShowProgress property to get Mr. Spiny?
You probably haven't touched it at all. And I don't think that setting display mode to false would automatically set ShowProgress False, but it *might* have that effect -- test its value, just in case, after you use the SetDisplayMode method.
Can you verify a couple of things about this report -- what is the interactive page size versus the standard page size? If the two are different, this might explain why you don't see the progress feedback in one case but you do in the other (if the page sizes are significantly different, I mean).
Alternatively, if you have been omitting the zoom-setting lines after the SetDisplayMode line when you don't set display mode, then Greg's explanation completely maks sense: the original zoom value shows enough of the page to show the progress feedback, while your chosen zoom value here does not.
>L<
"Report is being generated"
Hi
I have a windows application. I am using following code right after setting the LocalReport ReportPath. Report rendering is too slow if use following line of code and Report viewer does not show spiny and the text that says “Report is being generated.”
Me.ReportViewer1.SetDisplayMode(DisplayMode.PrintLayout)
Me.ReportViewer1.ZoomMode = ZoomMode.Percent
Me.ReportViewer1.ZoomPercent = 80
Please advise how can make it fast and show spiny.
Thanks in advance.
As to how to make it fast, you need to either increase the horsepower of your system or optimize your SQL query.
As to the spiny thingy, I believe that setting the zoom on the report viewer changes the zoom of the report once it is rendered. From what I can tell, the spiny thingy is rendered prior to the report being rendered.
I think the report viewer is actually showing the spiny thingy, but your report viewer is too large and the spiny thingy always appears in the middle of the report viewer.
I've yet to find an answer as to how to move the spiny thingy closer to the upper left corner of the screen. If you figure it out, let me know!
|||
Thanks for your reply. I think it is not related with SQL server query or system speed. If I take out following line of code it works superfast and spiny also appears.
Me.ReportViewer1.SetDisplayMode(DisplayMode.PrintLayout)
Me.ReportViewer1.ZoomMode = ZoomMode.Percent
Me.ReportViewer1.ZoomPercent = 80
I am getting a dataset from the server and then assigning that dataset to RDL file in Windows application at client side so there is no SQL server involved.
Spiny does not appear even after taking out Zoom mode and zoom percent. I guess something is wrong with setting DisplayMode.PrintLayout.
|||Any answer?|||
Just a reality check on Mr. Spiny:
Are you executing this report asynchronously?
>L<
|||Yes.|||Then, see here http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=231258&SiteID=1>L<
|||Thanks Lisa,
I am using a Report Viewer for Windows application and I guess by default AsyncRendering is True. I did not find any way to make it false to give a try. I am still not able to figure it out why "SetDisplayMode(DisplayMode.PrintLayout)" making report rendering so slow and also it is making spiny to disapear.
Appreciate you help.
|||Hi there,
Of course you're right that there is this difference between web and winform usage -- and I often forget which we're talking about <sigh>. I apologize.
Did you try using the ShowProgress property to get Mr. Spiny?
You probably haven't touched it at all. And I don't think that setting display mode to false would automatically set ShowProgress False, but it *might* have that effect -- test its value, just in case, after you use the SetDisplayMode method.
Can you verify a couple of things about this report -- what is the interactive page size versus the standard page size? If the two are different, this might explain why you don't see the progress feedback in one case but you do in the other (if the page sizes are significantly different, I mean).
Alternatively, if you have been omitting the zoom-setting lines after the SetDisplayMode line when you don't set display mode, then Greg's explanation completely maks sense: the original zoom value shows enough of the page to show the progress feedback, while your chosen zoom value here does not.
>L<
"Report is being generated"
Hi
I have a windows application. I am using following code right after setting the LocalReport ReportPath. Report rendering is too slow if use following line of code and Report viewer does not show spiny and the text that says “Report is being generated.”
Me.ReportViewer1.SetDisplayMode(DisplayMode.PrintLayout)
Me.ReportViewer1.ZoomMode = ZoomMode.Percent
Me.ReportViewer1.ZoomPercent = 80
Please advise how can make it fast and show spiny.
Thanks in advance.
As to how to make it fast, you need to either increase the horsepower of your system or optimize your SQL query.
As to the spiny thingy, I believe that setting the zoom on the report viewer changes the zoom of the report once it is rendered. From what I can tell, the spiny thingy is rendered prior to the report being rendered.
I think the report viewer is actually showing the spiny thingy, but your report viewer is too large and the spiny thingy always appears in the middle of the report viewer.
I've yet to find an answer as to how to move the spiny thingy closer to the upper left corner of the screen. If you figure it out, let me know!
|||
Thanks for your reply. I think it is not related with SQL server query or system speed. If I take out following line of code it works superfast and spiny also appears.
Me.ReportViewer1.SetDisplayMode(DisplayMode.PrintLayout)
Me.ReportViewer1.ZoomMode = ZoomMode.Percent
Me.ReportViewer1.ZoomPercent = 80
I am getting a dataset from the server and then assigning that dataset to RDL file in Windows application at client side so there is no SQL server involved.
Spiny does not appear even after taking out Zoom mode and zoom percent. I guess something is wrong with setting DisplayMode.PrintLayout.
|||Any answer?|||
Just a reality check on Mr. Spiny:
Are you executing this report asynchronously?
>L<
|||Yes.|||Then, see here http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=231258&SiteID=1>L<
|||Thanks Lisa,
I am using a Report Viewer for Windows application and I guess by default AsyncRendering is True. I did not find any way to make it false to give a try. I am still not able to figure it out why "SetDisplayMode(DisplayMode.PrintLayout)" making report rendering so slow and also it is making spiny to disapear.
Appreciate you help.
|||Hi there,
Of course you're right that there is this difference between web and winform usage -- and I often forget which we're talking about <sigh>. I apologize.
Did you try using the ShowProgress property to get Mr. Spiny?
You probably haven't touched it at all. And I don't think that setting display mode to false would automatically set ShowProgress False, but it *might* have that effect -- test its value, just in case, after you use the SetDisplayMode method.
Can you verify a couple of things about this report -- what is the interactive page size versus the standard page size? If the two are different, this might explain why you don't see the progress feedback in one case but you do in the other (if the page sizes are significantly different, I mean).
Alternatively, if you have been omitting the zoom-setting lines after the SetDisplayMode line when you don't set display mode, then Greg's explanation completely maks sense: the original zoom value shows enough of the page to show the progress feedback, while your chosen zoom value here does not.
>L<
Thursday, March 8, 2012
"Network general error"....
Hi Guys,
I have a problem with my application.when i try to run it to a network pc, show me this message "Network general error". But if i run it to simple pc everything ok.
Database is local. SQL Express agent running locally.Also all protocols for sql server is enebled.
Any ideas,,,,
COuld it be that the firewall is enabled or not configured for accessing the computer on this specific port ?HTH, jens Suessmeyer.
http://www.sqlserver2005.de
Tuesday, March 6, 2012
"Fuzzy search" component
Good day.
I'd like to add "fuzzy search" functionality to my application.
"Fuzzy search" in this topic means selecting (from DB table) rows, which have "fuzzy search" coefficient (calculated using etalon string) not less some_predefined_const. Fuzzy search coefficient calculating algorithm can be various.
So with etalon string "Margaret" "fuzzy search" can find "Nargaret", "Margoret", "Margret" etc.
IMHO time to develop, test and tune code must be quite long. I prefer to buy such "fuzzy search" component.
Does anybody know where can I get such component - server version (SQL 2005) or client version (.NET)?
How much can such component cost?
Thanks.
Hello,
Have you looked at the SOUNDEX() function? Although not offering the complete solution, it'll give you something to build upon. For example, if CustName contained Margaret, Nargaret and Margoret, you could:
SELECT * FROM dbo.Customers WHERE SOUNDEX(CustName) LIKE '_626'
This will return all three CustName values.
Cheers,
Rob
|||
No, it won′t. The Naragret is a "n" variation, therefore you probably would need a stronger SOUNDEX functionality like the one that comes with SQL Server. See the following sample to test the soundex:
CREATE TABLE #SomeTable
(
nameCol VARCHAR(50)
)
GO
INSERT INTO #SomeTable
VALUES ('Margaret')
INSERT INTO #SomeTable
VALUES ('Nargaret')
INSERT INTO #SomeTable
VALUES ('Margoret')
SELECT * FROM #SomeTable
WHERE SOUNDEX(namecol) = SOUNDEX('Margaret')
nameCol
--
Margaret
Margoret
(2 row(s) affected)
I would sugegst buying a thrid party component which can be either used from your application code or within the SQLCLR (if you don′t mind using SQLCLR in your SQL Server)
Jens K. Suessmeyer
http://www.sqlserver2005.de
Sure it will:
Code Snippet
create table test(CustName varchar(40) not null)
go
insert into test
select 'Margaret'
union
select 'Nargaret'
union
select 'Margoret'
go
SELECT * FROM dbo.test WHERE SOUNDEX(CustName) LIKE '_626'
|||Sure, but for the simple way of just passing in values and not just assuming that only the first character is changed, e.g. someone put a typo in there writing Amgaret (which would be A526) instead of Margaret you probabyl would need a real fuzzy lookup instead of only replacing the first char.
I don′t know if that fits the original posters need, but sure your solution fits for this particular case. Maybe I misunderstood the situation or the description was too vague to identify the problem.
Jens K. Suessmeyer
http://www.sqlserver2005.de
|||Hi all.Thank you for answers
I cant use soundex with my problem (example can explain why)
Typical scenario to use "fuzzy lookup" functionality:
0. Initial data loading process inserts into DB table song title and author name: "HUNG UP MADONNA".
There could be some errors during initial data loading process (cause there are no input information quality check).
And song title and author name could be "HANG UP MADONNA" or "HUNG UP MADONA".
1. Manager wants to find this song and view some additional info.
2. He doesn't know what is the right query string "HUNG UP MADONNA" or "MADONNA HUNG UP"
3. Manager enters some similarity coefficient, defining minimal "similarity value".
4. Application retrieves some rows from DB using query string and similarity coefficient.
5. Manager works with the row with max similarity coefficient.
Does anybody know some third party components?
Or how do you think how much can it cost? Its my manager's question .
Saturday, February 25, 2012
"Creating a Mobile Application with SQL Server" Tutorial Problem
I am attempting to go through the "Creating a Mobile Application with SQL Server" walkthrough found in the SQL Mobile Books Online help file. Towards the end of this document (under SQL Server Mobile Tasks), they show how to create a new subscription. Unfortunately, after step 10--when you are asked to click finish--I get the following error:
TITLE: Microsoft SQL Server Management Studio
Failure to connect to SQL Server with provided connection information. SQL Server does not exist, access is denied because the IIS user is not a valid user on the SQL Server, or the password is incorrect.
HRESULT 0x80004005 (29061)
One potential area of concern is in setting up the windows authentication login. Step two of "Secure the publication" states "type computername\iusr_computername, where computername is the name of your computer." I was not sure what iusr_computername stood for--should I just type in my windows account for this machine? Or am I to make an account called "isur_computername?"
I just restarted my system and now receive a different error (at the same place):
TITLE: Microsoft SQL Server Management Studio
Authentication failed on the computer running IIS.
HRESULT 0x80070057 (28011)
Hi,
IUSR_<IISMachineName> is an account automatically built-in and would be created automatically when IIS is installed. This is the login account that would be used when you chose the authentication as anonymous. Simply to say, this is anonymous user account. Ofcourse, you can change IIS to use a different account as anonymous account. Now, please replace the 'IISMachineName' with IIS Machine name in your environment and assign permissions to this IUSR account on Virtual Directory (read & write, create and delete files).
Hope this helps!
Thanks,
Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Everywhere, Microsoft Corporation
|||I'm having the same problem when I try to use a subscription for MS SQL 2005 I get the same error message. I have tried to use different account including the IUSR_<machinename> but have the same problem.|||Hi keyboardape. Did you solve your problem?
I met the same issue like your and I solved it today.
Let me know
|||I am getting this same message! I'm trying to get the AdventureWorks merge replication sample using a mobile device to work.
I have tried both anonymous and authenticated and used various users. Any help? Thanks!
|||Hi Nick, what was the solution?
initially I had the exactly same error as jonfroehlich ...
the walkthrough goes fine until step 10 of 'create a new subscripition' then it just fails and gives the following error:
--
Failure to connect to SQL Server with provided connection information.
SQL Server does not exist, access is denied because the IIS user is not a valid user on the SQL Server, or the password is incorrect.
HRESULT 0x80004005 (29061)
The operation could not be completed.
--
but after running it again the error msg has changed to ...
--
Initializing SQL Server Reconciler has failed.
HRESULT 0x80045901 (29045)
The process could not connect to Distributor '<mycomputername>.
HRESULT 0x00004E74 (0)The operation could not be completed.
--
I created a new iusr_<computername> account as directed in the walkthrough and have assigned it accordingly...
can you help?
Thanks
|||Hi thereas Laxmi suggested, you do have to set up the IIS and the authentication correctly
try the following:
1. after creating your publication on the management studio, add the user IUSR_<IISMachineName> in the security->login folder
Important: you don't have to create that user, this user already exist, so look it up under advanced search!!
2. rightclick on that user and choose properties
3. under usermappings check the box of the database you would like to access, then click ok
4. rightclick on your publication and choose properties
5. select publication access list an add the IUSR_<IISMachineName> user and click ok
6. rightclick on your publication, select view snapshot status and generate the snapshot
7. execute the web synchronisation wizard (conwizz30.exe) before the subscription wizard!!
this wizard creates the virtual directory for the webaccess, choose annonymous access
8. execute the subscription wizard and use windowsauthentication
the following link helps a lot:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/med302_msdn_sql_mobile.asp?frame=true
by the way, check the port (settigns-Controlpanel-administrativetool-iis) of your IIS (default is 80) but it might be possible that it's not (if you use skype or such appilations)
if it's not 80 you have to add the port to the url in the WebServer Authentication Step of the Subscription Wizard like 192.168.0.111:81/myVirtDir
Hop it helps
Greets Florian
|||
In my case, I got a very similar error message while trying to use SQL server authentication with the 'sa' account.
- Synchronizing Data (100%) (Error)
Messages
* Failure to connect to SQL Server with provided connection information. SQL Server does not exist, access is denied because the SQL user is not a valid user on the SQL Server, or the password is incorrect.
HRESULT 0x80004005 (29060)
It turned out sa account was disabled by default.
|||I have the same problem. The fix of Florian did not help me.
Any suggestion?
Thanks
GIo
|||It is Correct.
Thanks. I got the solution. I have created a Word Document to configure step by step.
But, I dont know how to upload it here to help others.
|||Hi,
Previously I was using Sql mobile in device, that was worked fine with SQL Server 2005. Now as per client's requirement they want the Database in sql ce and sql server 2000.
First of all I would like to know that which are the required cab files for sql ce environment in the device and from where i can get those?
When i see the merge agent, it is connecting Sql server 2000 from sql mobile and it is able to connect the sql server 2000 publisher, but after connecting to publisher when it tries to connect the subscriber it stops with message "Connecting to subscriber WM_Dhaval1". after waiting for 10 minutes the message changes to "The agent is suspect, no response within last 10 minutes" with failed satus. I am sure the problem is with subscriber.
Is sql mobile compatible with sql server 2000? or i have to use sql ce for mobile device explicitely?
|||Was having the same issue. I believe it is caused because I have multiple network cards.I got this tutorial working, when in the wizard to create a new subscription on the page "choose publication" I selected the aktual server name (my pc name) rather than (local). Then it worked for me.
good luck
|||I have the same problem, each time to subscribe the subscription said that the IIS user is not valid SQL Server user. When I create publication on Windows XP the problem is solved, but when I try on Vista the problem go back again. I have create SQL Server login for IUSR and put it into Publication Access List (PAL) of my publication. Is there any user that I must include for IIS 7 or only IUSR.
Sorry I'm really new on discovering IIS 7, for IIS 6 just fine for me.
Thanks,
"Creating a Mobile Application with SQL Server" Tutorial Problem
I am attempting to go through the "Creating a Mobile Application with SQL Server" walkthrough found in the SQL Mobile Books Online help file. Towards the end of this document (under SQL Server Mobile Tasks), they show how to create a new subscription. Unfortunately, after step 10--when you are asked to click finish--I get the following error:
TITLE: Microsoft SQL Server Management Studio
Failure to connect to SQL Server with provided connection information. SQL Server does not exist, access is denied because the IIS user is not a valid user on the SQL Server, or the password is incorrect.
HRESULT 0x80004005 (29061)
One potential area of concern is in setting up the windows authentication login. Step two of "Secure the publication" states "type computername\iusr_computername, where computername is the name of your computer." I was not sure what iusr_computername stood for--should I just type in my windows account for this machine? Or am I to make an account called "isur_computername?"
I just restarted my system and now receive a different error (at the same place):
TITLE: Microsoft SQL Server Management Studio
Authentication failed on the computer running IIS.
HRESULT 0x80070057 (28011)
Hi,
IUSR_<IISMachineName> is an account automatically built-in and would be created automatically when IIS is installed. This is the login account that would be used when you chose the authentication as anonymous. Simply to say, this is anonymous user account. Ofcourse, you can change IIS to use a different account as anonymous account. Now, please replace the 'IISMachineName' with IIS Machine name in your environment and assign permissions to this IUSR account on Virtual Directory (read & write, create and delete files).
Hope this helps!
Thanks,
Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Everywhere, Microsoft Corporation
|||I'm having the same problem when I try to use a subscription for MS SQL 2005 I get the same error message. I have tried to use different account including the IUSR_<machinename> but have the same problem.|||Hi keyboardape. Did you solve your problem?
I met the same issue like your and I solved it today.
Let me know
|||I am getting this same message! I'm trying to get the AdventureWorks merge replication sample using a mobile device to work.
I have tried both anonymous and authenticated and used various users. Any help? Thanks!
|||Hi Nick, what was the solution?
initially I had the exactly same error as jonfroehlich ...
the walkthrough goes fine until step 10 of 'create a new subscripition' then it just fails and gives the following error:
--
Failure to connect to SQL Server with provided connection information.
SQL Server does not exist, access is denied because the IIS user is not a valid user on the SQL Server, or the password is incorrect.
HRESULT 0x80004005 (29061)
The operation could not be completed.
--
but after running it again the error msg has changed to ...
--
Initializing SQL Server Reconciler has failed.
HRESULT 0x80045901 (29045)
The process could not connect to Distributor '<mycomputername>.
HRESULT 0x00004E74 (0)The operation could not be completed.
--
I created a new iusr_<computername> account as directed in the walkthrough and have assigned it accordingly...
can you help?
Thanks
|||Hi thereas Laxmi suggested, you do have to set up the IIS and the authentication correctly
try the following:
1. after creating your publication on the management studio, add the user IUSR_<IISMachineName> in the security->login folder
Important: you don't have to create that user, this user already exist, so look it up under advanced search!!
2. rightclick on that user and choose properties
3. under usermappings check the box of the database you would like to access, then click ok
4. rightclick on your publication and choose properties
5. select publication access list an add the IUSR_<IISMachineName> user and click ok
6. rightclick on your publication, select view snapshot status and generate the snapshot
7. execute the web synchronisation wizard (conwizz30.exe) before the subscription wizard!!
this wizard creates the virtual directory for the webaccess, choose annonymous access
8. execute the subscription wizard and use windowsauthentication
the following link helps a lot:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/med302_msdn_sql_mobile.asp?frame=true
by the way, check the port (settigns-Controlpanel-administrativetool-iis) of your IIS (default is 80) but it might be possible that it's not (if you use skype or such appilations)
if it's not 80 you have to add the port to the url in the WebServer Authentication Step of the Subscription Wizard like 192.168.0.111:81/myVirtDir
Hop it helps
Greets Florian
|||
In my case, I got a very similar error message while trying to use SQL server authentication with the 'sa' account.
- Synchronizing Data (100%) (Error)
Messages
* Failure to connect to SQL Server with provided connection information. SQL Server does not exist, access is denied because the SQL user is not a valid user on the SQL Server, or the password is incorrect.
HRESULT 0x80004005 (29060)
It turned out sa account was disabled by default.
|||I have the same problem. The fix of Florian did not help me.
Any suggestion?
Thanks
GIo
|||It is Correct.
Thanks. I got the solution. I have created a Word Document to configure step by step.
But, I dont know how to upload it here to help others.
|||Hi,
Previously I was using Sql mobile in device, that was worked fine with SQL Server 2005. Now as per client's requirement they want the Database in sql ce and sql server 2000.
First of all I would like to know that which are the required cab files for sql ce environment in the device and from where i can get those?
When i see the merge agent, it is connecting Sql server 2000 from sql mobile and it is able to connect the sql server 2000 publisher, but after connecting to publisher when it tries to connect the subscriber it stops with message "Connecting to subscriber WM_Dhaval1". after waiting for 10 minutes the message changes to "The agent is suspect, no response within last 10 minutes" with failed satus. I am sure the problem is with subscriber.
Is sql mobile compatible with sql server 2000? or i have to use sql ce for mobile device explicitely?
|||Was having the same issue. I believe it is caused because I have multiple network cards.I got this tutorial working, when in the wizard to create a new subscription on the page "choose publication" I selected the aktual server name (my pc name) rather than (local). Then it worked for me.
good luck
|||I have the same problem, each time to subscribe the subscription said that the IIS user is not valid SQL Server user. When I create publication on Windows XP the problem is solved, but when I try on Vista the problem go back again. I have create SQL Server login for IUSR and put it into Publication Access List (PAL) of my publication. Is there any user that I must include for IIS 7 or only IUSR.
Sorry I'm really new on discovering IIS 7, for IIS 6 just fine for me.
Thanks,
"Creating a Mobile Application with SQL Server" Tutorial Problem
I am attempting to go through the "Creating a Mobile Application with SQL Server" walkthrough found in the SQL Mobile Books Online help file. Towards the end of this document (under SQL Server Mobile Tasks), they show how to create a new subscription. Unfortunately, after step 10--when you are asked to click finish--I get the following error:
TITLE: Microsoft SQL Server Management Studio
Failure to connect to SQL Server with provided connection information. SQL Server does not exist, access is denied because the IIS user is not a valid user on the SQL Server, or the password is incorrect.
HRESULT 0x80004005 (29061)
One potential area of concern is in setting up the windows authentication login. Step two of "Secure the publication" states "type computername\iusr_computername, where computername is the name of your computer." I was not sure what iusr_computername stood for--should I just type in my windows account for this machine? Or am I to make an account called "isur_computername?"
I just restarted my system and now receive a different error (at the same place):
TITLE: Microsoft SQL Server Management Studio
Authentication failed on the computer running IIS.
HRESULT 0x80070057 (28011)
Hi,
IUSR_<IISMachineName> is an account automatically built-in and would be created automatically when IIS is installed. This is the login account that would be used when you chose the authentication as anonymous. Simply to say, this is anonymous user account. Ofcourse, you can change IIS to use a different account as anonymous account. Now, please replace the 'IISMachineName' with IIS Machine name in your environment and assign permissions to this IUSR account on Virtual Directory (read & write, create and delete files).
Hope this helps!
Thanks,
Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Everywhere, Microsoft Corporation
|||I'm having the same problem when I try to use a subscription for MS SQL 2005 I get the same error message. I have tried to use different account including the IUSR_<machinename> but have the same problem.|||
Hi keyboardape. Did you solve your problem?
I met the same issue like your and I solved it today.
Let me know
|||I am getting this same message! I'm trying to get the AdventureWorks merge replication sample using a mobile device to work.
I have tried both anonymous and authenticated and used various users. Any help? Thanks!
|||Hi Nick, what was the solution?
initially I had the exactly same error as jonfroehlich ...
the walkthrough goes fine until step 10 of 'create a new subscripition' then it just fails and gives the following error:
--
Failure to connect to SQL Server with provided connection information.
SQL Server does not exist, access is denied because the IIS user is not a valid user on the SQL Server, or the password is incorrect.
HRESULT 0x80004005 (29061)
The operation could not be completed.
--
but after running it again the error msg has changed to ...
--
Initializing SQL Server Reconciler has failed.
HRESULT 0x80045901 (29045)
The process could not connect to Distributor '<mycomputername>.
HRESULT 0x00004E74 (0)The operation could not be completed.
--
I created a new iusr_<computername> account as directed in the walkthrough and have assigned it accordingly...
can you help?
Thanks
|||Hi thereas Laxmi suggested, you do have to set up the IIS and the authentication correctly
try the following:
1. after creating your publication on the management studio, add the user IUSR_<IISMachineName> in the security->login folder
Important: you don't have to create that user, this user already exist, so look it up under advanced search!!
2. rightclick on that user and choose properties
3. under usermappings check the box of the database you would like to access, then click ok
4. rightclick on your publication and choose properties
5. select publication access list an add the IUSR_<IISMachineName> user and click ok
6. rightclick on your publication, select view snapshot status and generate the snapshot
7. execute the web synchronisation wizard (conwizz30.exe) before the subscription wizard!!
this wizard creates the virtual directory for the webaccess, choose annonymous access
8. execute the subscription wizard and use windowsauthentication
the following link helps a lot:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/med302_msdn_sql_mobile.asp?frame=true
by the way, check the port (settigns-Controlpanel-administrativetool-iis) of your IIS (default is 80) but it might be possible that it's not (if you use skype or such appilations)
if it's not 80 you have to add the port to the url in the WebServer Authentication Step of the Subscription Wizard like 192.168.0.111:81/myVirtDir
Hop it helps
Greets Florian|||
In my case, I got a very similar error message while trying to use SQL server authentication with the 'sa' account.
- Synchronizing Data (100%) (Error)
Messages
* Failure to connect to SQL Server with provided connection information. SQL Server does not exist, access is denied because the SQL user is not a valid user on the SQL Server, or the password is incorrect.
HRESULT 0x80004005 (29060)
It turned out sa account was disabled by default.
|||I have the same problem. The fix of Florian did not help me.
Any suggestion?
Thanks
GIo
|||It is Correct.
Thanks. I got the solution. I have created a Word Document to configure step by step.
But, I dont know how to upload it here to help others.
|||Hi,
Previously I was using Sql mobile in device, that was worked fine with SQL Server 2005. Now as per client's requirement they want the Database in sql ce and sql server 2000.
First of all I would like to know that which are the required cab files for sql ce environment in the device and from where i can get those?
When i see the merge agent, it is connecting Sql server 2000 from sql mobile and it is able to connect the sql server 2000 publisher, but after connecting to publisher when it tries to connect the subscriber it stops with message "Connecting to subscriber WM_Dhaval1". after waiting for 10 minutes the message changes to "The agent is suspect, no response within last 10 minutes" with failed satus. I am sure the problem is with subscriber.
Is sql mobile compatible with sql server 2000? or i have to use sql ce for mobile device explicitely?
|||Was having the same issue. I believe it is caused because I have multiple network cards.I got this tutorial working, when in the wizard to create a new subscription on the page "choose publication" I selected the aktual server name (my pc name) rather than (local). Then it worked for me.
good luck|||I have the same problem, each time to subscribe the subscription said that the IIS user is not valid SQL Server user. When I create publication on Windows XP the problem is solved, but when I try on Vista the problem go back again. I have create SQL Server login for IUSR and put it into Publication Access List (PAL) of my publication. Is there any user that I must include for IIS 7 or only IUSR.
Sorry I'm really new on discovering IIS 7, for IIS 6 just fine for me.
Thanks,
"Creating a Mobile Application with SQL Server" Tutorial Problem
I am attempting to go through the "Creating a Mobile Application with SQL Server" walkthrough found in the SQL Mobile Books Online help file. Towards the end of this document (under SQL Server Mobile Tasks), they show how to create a new subscription. Unfortunately, after step 10--when you are asked to click finish--I get the following error:
TITLE: Microsoft SQL Server Management Studio
Failure to connect to SQL Server with provided connection information. SQL Server does not exist, access is denied because the IIS user is not a valid user on the SQL Server, or the password is incorrect.
HRESULT 0x80004005 (29061)
One potential area of concern is in setting up the windows authentication login. Step two of "Secure the publication" states "type computername\iusr_computername, where computername is the name of your computer." I was not sure what iusr_computername stood for--should I just type in my windows account for this machine? Or am I to make an account called "isur_computername?"
I just restarted my system and now receive a different error (at the same place):
TITLE: Microsoft SQL Server Management Studio
Authentication failed on the computer running IIS.
HRESULT 0x80070057 (28011)
Hi,
IUSR_<IISMachineName> is an account automatically built-in and would be created automatically when IIS is installed. This is the login account that would be used when you chose the authentication as anonymous. Simply to say, this is anonymous user account. Ofcourse, you can change IIS to use a different account as anonymous account. Now, please replace the 'IISMachineName' with IIS Machine name in your environment and assign permissions to this IUSR account on Virtual Directory (read & write, create and delete files).
Hope this helps!
Thanks,
Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Everywhere, Microsoft Corporation
|||I'm having the same problem when I try to use a subscription for MS SQL 2005 I get the same error message. I have tried to use different account including the IUSR_<machinename> but have the same problem.|||
Hi keyboardape. Did you solve your problem?
I met the same issue like your and I solved it today.
Let me know
|||I am getting this same message! I'm trying to get the AdventureWorks merge replication sample using a mobile device to work.
I have tried both anonymous and authenticated and used various users. Any help? Thanks!
|||Hi Nick, what was the solution?
initially I had the exactly same error as jonfroehlich ...
the walkthrough goes fine until step 10 of 'create a new subscripition' then it just fails and gives the following error:
--
Failure to connect to SQL Server with provided connection information.
SQL Server does not exist, access is denied because the IIS user is not a valid user on the SQL Server, or the password is incorrect.
HRESULT 0x80004005 (29061)
The operation could not be completed.
--
but after running it again the error msg has changed to ...
--
Initializing SQL Server Reconciler has failed.
HRESULT 0x80045901 (29045)
The process could not connect to Distributor '<mycomputername>.
HRESULT 0x00004E74 (0)The operation could not be completed.
--
I created a new iusr_<computername> account as directed in the walkthrough and have assigned it accordingly...
can you help?
Thanks
|||Hi thereas Laxmi suggested, you do have to set up the IIS and the authentication correctly
try the following:
1. after creating your publication on the management studio, add the user IUSR_<IISMachineName> in the security->login folder
Important: you don't have to create that user, this user already exist, so look it up under advanced search!!
2. rightclick on that user and choose properties
3. under usermappings check the box of the database you would like to access, then click ok
4. rightclick on your publication and choose properties
5. select publication access list an add the IUSR_<IISMachineName> user and click ok
6. rightclick on your publication, select view snapshot status and generate the snapshot
7. execute the web synchronisation wizard (conwizz30.exe) before the subscription wizard!!
this wizard creates the virtual directory for the webaccess, choose annonymous access
8. execute the subscription wizard and use windowsauthentication
the following link helps a lot:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/med302_msdn_sql_mobile.asp?frame=true
by the way, check the port (settigns-Controlpanel-administrativetool-iis) of your IIS (default is 80) but it might be possible that it's not (if you use skype or such appilations)
if it's not 80 you have to add the port to the url in the WebServer Authentication Step of the Subscription Wizard like 192.168.0.111:81/myVirtDir
Hop it helps
Greets Florian|||
In my case, I got a very similar error message while trying to use SQL server authentication with the 'sa' account.
- Synchronizing Data (100%) (Error)
Messages
* Failure to connect to SQL Server with provided connection information. SQL Server does not exist, access is denied because the SQL user is not a valid user on the SQL Server, or the password is incorrect.
HRESULT 0x80004005 (29060)
It turned out sa account was disabled by default.
|||I have the same problem. The fix of Florian did not help me.
Any suggestion?
Thanks
GIo
|||It is Correct.
Thanks. I got the solution. I have created a Word Document to configure step by step.
But, I dont know how to upload it here to help others.
|||Hi,
Previously I was using Sql mobile in device, that was worked fine with SQL Server 2005. Now as per client's requirement they want the Database in sql ce and sql server 2000.
First of all I would like to know that which are the required cab files for sql ce environment in the device and from where i can get those?
When i see the merge agent, it is connecting Sql server 2000 from sql mobile and it is able to connect the sql server 2000 publisher, but after connecting to publisher when it tries to connect the subscriber it stops with message "Connecting to subscriber WM_Dhaval1". after waiting for 10 minutes the message changes to "The agent is suspect, no response within last 10 minutes" with failed satus. I am sure the problem is with subscriber.
Is sql mobile compatible with sql server 2000? or i have to use sql ce for mobile device explicitely?
|||Was having the same issue. I believe it is caused because I have multiple network cards.I got this tutorial working, when in the wizard to create a new subscription on the page "choose publication" I selected the aktual server name (my pc name) rather than (local). Then it worked for me.
good luck|||I have the same problem, each time to subscribe the subscription said that the IIS user is not valid SQL Server user. When I create publication on Windows XP the problem is solved, but when I try on Vista the problem go back again. I have create SQL Server login for IUSR and put it into Publication Access List (PAL) of my publication. Is there any user that I must include for IIS 7 or only IUSR.
Sorry I'm really new on discovering IIS 7, for IIS 6 just fine for me.
Thanks,
"Creating a Mobile Application with SQL Server" Tutorial Problem
I am attempting to go through the "Creating a Mobile Application with SQL Server" walkthrough found in the SQL Mobile Books Online help file. Towards the end of this document (under SQL Server Mobile Tasks), they show how to create a new subscription. Unfortunately, after step 10--when you are asked to click finish--I get the following error:
TITLE: Microsoft SQL Server Management Studio
Failure to connect to SQL Server with provided connection information. SQL Server does not exist, access is denied because the IIS user is not a valid user on the SQL Server, or the password is incorrect.
HRESULT 0x80004005 (29061)
One potential area of concern is in setting up the windows authentication login. Step two of "Secure the publication" states "type computername\iusr_computername, where computername is the name of your computer." I was not sure what iusr_computername stood for--should I just type in my windows account for this machine? Or am I to make an account called "isur_computername?"
I just restarted my system and now receive a different error (at the same place):
TITLE: Microsoft SQL Server Management Studio
Authentication failed on the computer running IIS.
HRESULT 0x80070057 (28011)
Hi,
IUSR_<IISMachineName> is an account automatically built-in and would be created automatically when IIS is installed. This is the login account that would be used when you chose the authentication as anonymous. Simply to say, this is anonymous user account. Ofcourse, you can change IIS to use a different account as anonymous account. Now, please replace the 'IISMachineName' with IIS Machine name in your environment and assign permissions to this IUSR account on Virtual Directory (read & write, create and delete files).
Hope this helps!
Thanks,
Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Everywhere, Microsoft Corporation
|||I'm having the same problem when I try to use a subscription for MS SQL 2005 I get the same error message. I have tried to use different account including the IUSR_<machinename> but have the same problem.|||Hi keyboardape. Did you solve your problem?
I met the same issue like your and I solved it today.
Let me know
|||I am getting this same message! I'm trying to get the AdventureWorks merge replication sample using a mobile device to work.
I have tried both anonymous and authenticated and used various users. Any help? Thanks!
|||Hi Nick, what was the solution?
initially I had the exactly same error as jonfroehlich ...
the walkthrough goes fine until step 10 of 'create a new subscripition' then it just fails and gives the following error:
--
Failure to connect to SQL Server with provided connection information.
SQL Server does not exist, access is denied because the IIS user is not a valid user on the SQL Server, or the password is incorrect.
HRESULT 0x80004005 (29061)
The operation could not be completed.
--
but after running it again the error msg has changed to ...
--
Initializing SQL Server Reconciler has failed.
HRESULT 0x80045901 (29045)
The process could not connect to Distributor '<mycomputername>.
HRESULT 0x00004E74 (0)The operation could not be completed.
--
I created a new iusr_<computername> account as directed in the walkthrough and have assigned it accordingly...
can you help?
Thanks
|||Hi thereas Laxmi suggested, you do have to set up the IIS and the authentication correctly
try the following:
1. after creating your publication on the management studio, add the user IUSR_<IISMachineName> in the security->login folder
Important: you don't have to create that user, this user already exist, so look it up under advanced search!!
2. rightclick on that user and choose properties
3. under usermappings check the box of the database you would like to access, then click ok
4. rightclick on your publication and choose properties
5. select publication access list an add the IUSR_<IISMachineName> user and click ok
6. rightclick on your publication, select view snapshot status and generate the snapshot
7. execute the web synchronisation wizard (conwizz30.exe) before the subscription wizard!!
this wizard creates the virtual directory for the webaccess, choose annonymous access
8. execute the subscription wizard and use windowsauthentication
the following link helps a lot:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/med302_msdn_sql_mobile.asp?frame=true
by the way, check the port (settigns-Controlpanel-administrativetool-iis) of your IIS (default is 80) but it might be possible that it's not (if you use skype or such appilations)
if it's not 80 you have to add the port to the url in the WebServer Authentication Step of the Subscription Wizard like 192.168.0.111:81/myVirtDir
Hop it helps
Greets Florian
|||
In my case, I got a very similar error message while trying to use SQL server authentication with the 'sa' account.
- Synchronizing Data (100%) (Error)
Messages
* Failure to connect to SQL Server with provided connection information. SQL Server does not exist, access is denied because the SQL user is not a valid user on the SQL Server, or the password is incorrect.
HRESULT 0x80004005 (29060)
It turned out sa account was disabled by default.
|||I have the same problem. The fix of Florian did not help me.
Any suggestion?
Thanks
GIo
|||It is Correct.
Thanks. I got the solution. I have created a Word Document to configure step by step.
But, I dont know how to upload it here to help others.
|||Hi,
Previously I was using Sql mobile in device, that was worked fine with SQL Server 2005. Now as per client's requirement they want the Database in sql ce and sql server 2000.
First of all I would like to know that which are the required cab files for sql ce environment in the device and from where i can get those?
When i see the merge agent, it is connecting Sql server 2000 from sql mobile and it is able to connect the sql server 2000 publisher, but after connecting to publisher when it tries to connect the subscriber it stops with message "Connecting to subscriber WM_Dhaval1". after waiting for 10 minutes the message changes to "The agent is suspect, no response within last 10 minutes" with failed satus. I am sure the problem is with subscriber.
Is sql mobile compatible with sql server 2000? or i have to use sql ce for mobile device explicitely?
|||Was having the same issue. I believe it is caused because I have multiple network cards.I got this tutorial working, when in the wizard to create a new subscription on the page "choose publication" I selected the aktual server name (my pc name) rather than (local). Then it worked for me.
good luck
|||I have the same problem, each time to subscribe the subscription said that the IIS user is not valid SQL Server user. When I create publication on Windows XP the problem is solved, but when I try on Vista the problem go back again. I have create SQL Server login for IUSR and put it into Publication Access List (PAL) of my publication. Is there any user that I must include for IIS 7 or only IUSR.
Sorry I'm really new on discovering IIS 7, for IIS 6 just fine for me.
Thanks,
"ConstraintException" error while filling dataset?
Hi,
I always get a "ConstraintException" error when trying, at beginning of application, to run following statement (within "Form1_Load" routine called by "this->Load" EventHandler):
"this->TauxTaxeTableAdapter->FillByPays(this->TauxTaxeDataSet->TauxTaxe,Cur_GrdView_SlPays);"
Also curiously if, while application is still running, I invoke again that same statement by means of a pushbutton clickevent, everything is running smootly without error... Looks to me that it is bugging only when running the first time...
Within Dataset, I tried to see what constraint could give me such trouble. Here is the only constraint I could find:
"this->Constraints->Add((gcnew System::Data::UniqueConstraint(L"Constraint1", gcnew cli::array< System::Data::DataColumn^ >(2) {this->columnPays, this->columnProvince_Etat}, true)));"
I then tried to find within "TauxTaxe" table if there could be any trace of records where "Pays" and "Province_Etat" columns would show any null value as well as any duplicate key values but there wasn't any...
Any place I should start to look for? BTW, I'm using a SQL Express database.
Thanks for your help,
Stphane
Here is the detailed error log I got:
System.Data.ConstraintException: Impossible d'activer les contraintes. Une ou plusieurs lignes contiennent des valeurs qui violent les contraintes de type non null, unique ou de cl externe.
à System.Data.DataSet.FailedEnableConstraints()
à System.Data.DataSet.EnableConstraints()
à System.Data.DataSet.set_EnforceConstraints(Boolean value)
à System.Data.Common.DataAdapter.Fill(DataTable[] dataTables, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)
à System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
à System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
à System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
à Test_ADO.DS_TauxTaxeTableAdapters.TA_TauxTaxe.FillByPays(TauxTaxeDataTable dataTable, String Pays) dans d:\projet\visual c++ 2005\projets c++cli\test_ado\ds_tauxtaxe.h:ligne 1247
à Test_ADO.Form1.Sel_Pays_NewSel(Object sender, EventArgs e) dans d:\projet\visual c++ 2005\projets c++cli\test_ado\form1.h:ligne 1887
à System.Windows.Forms.RadioButton.OnCheckedChanged(EventArgs e)
à System.Windows.Forms.RadioButton.set_Checked(Boolean value)
à Test_ADO.Form1.Init_Form1() dans d:\projet\visual c++ 2005\projets c++cli\test_ado\form1.h:ligne 1480
à Test_ADO.Form1.Form1_Load(Object sender, EventArgs e) dans d:\projet\visual c++ 2005\projets c++cli\test_ado\form1.h:ligne 1446
à System.Windows.Forms.Form.OnLoad(EventArgs e)
à System.Windows.Forms.Form.OnCreateControl()
à System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
à System.Windows.Forms.Control.CreateControl()
à System.Windows.Forms.Control.WmShowWindow(Message& m)
à System.Windows.Forms.Control.WndProc(Message& m)
à System.Windows.Forms.ScrollableControl.WndProc(Message& m)
à System.Windows.Forms.ContainerControl.WndProc(Message& m)
à System.Windows.Forms.Form.WmShowWindow(Message& m)
à System.Windows.Forms.Form.WndProc(Message& m)
à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
à System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Finally, SQL Statement for "TA_TauxTaxe::FillByPays" is the following:
SELECT Pays, Province_Etat, Taxe1_Appl, Taxe1_Dsc, Taxe1_Taux, Taxe2_Appl, Taxe2_Dsc, Taxe2_Taux
FROM TauxTaxe
WHERE (Pays = @.Pays)
In debug mode, I double-checked and could verify that @.Pays didn't have any null value but a valid string value at time "Fill" routine was invoked. Any clue?
Hi again,
Seems that I found myself the solution to my problem. Let me explain. I first deleted all records in SQL table the error message was targetting. I then added a few records, in fact all states of U.S. and provinces of Canada and double-checked step by step how the SQL database was reacting. While entering a quite long province name, I finally discovered the problem which seemed to be a field length problem. I checked in Server Explorer the length of corresponding field but everything was OK. I then suspected that maybe the Dataset used by application didn't get updated. Bingo! It was effectively the case. In DataSet, the corresponding field still had the original length value and didn't get updated when I modified field length within Server Explorer. I think I learned a new thing... Any tricks you guys would maybe share on this issue? Must I absolutely make this "double" step each time I modify any table layout within Server Explorer?
Stphane
"Class not registered" with RMO and x64 Windows
I have a small .net application that uses RMO to synchronize a merge subscription. Everything works fine when I build with platform target = "Any CPU" on both x86 and x64 systems, but I get a "Class not registered" error on my x64 system when the application is built with platform target = "x86". Incase you are wondering I have to run this code under x86 because it is actually going to distributed in a dll and called from an x86 application.
x64 System:
Microsoft Windows Server 2003 R2
Enterprise x64 Edition
Service Pack 1
Here is my code:
{
ServerConnection dbconn = new ServerConnection(publication_server);
dbconn.LoginSecure = true;
dbconn.Connect();
MergeSubscription subscription = new MergeSubscription();
subscription.ConnectionContext = dbconn;
subscription.DatabaseName = publication_db;
subscription.PublicationName = publication_name;
subscription.SubscriberName = subscription_server;
subscription.SubscriptionDBName = subscription_db;
if (!subscription.LoadProperties() || subscription.SubscriberSecurity == null)
throw new Exception("Unable to initialize the Synchronization");
MergeSynchronizationAgent agent = subscription.SynchronizationAgent;
agent.Synchronize();
}
The MergeSynchronizationAgent class is platform specific (it is just a thin wrapper around a pile of native code), so you would need to make sure that you have the x86 version of SQL Server installed on your x64 server if you compile your exe as x86.
-Raymond
|||I would hate to install an x86 instance of SQL Server to solve this issue. Is there anything short of that I can do to get the appropriate files and registry keys on to an x64 system?
Thanks for your help.
|||Sorry to disappoint you, but there really isn't a supported way to allow you to just pick the dependencies for running the MergeSynchronizationAgent class although we have plans to come up with a merge module for replication components in the future. Realistically, it would be rather difficult to just pick out the dependencies for the MergeSynchronizationAgent class as it depends on things that folks normally don't suspect such as:
sqlncli.dll\rll
msvc80*.dll
The 2.0 .NET Framework
instapi.dll under 90\Share and corresponding registry key for locating it.
-Raymond
Sunday, February 19, 2012
"Advanced search" query in SQL Server2000
Hi query-experts,
I have an application that connects to a db running on SQL server 2000. I want the user to be able to do a google-like search, which returns all records containing all given keywords specified by the user in any of the fields, example:
Table has the fields: id, fruit, color
User enters: apple pear green
The query should return all records that contain apple AND pear AND green in any of the fields.
Now I do it like this:
SELECT * FROM table WHERE (fruit LIKE '%apple%' OR fruit LIKE '%pear%' OR fruit LIKE '%green%') AND (color LIKE '%apple%' OR color LIKE '%pear%' OR color LIKE '%green%')
this query works fine, but since my actual table contains about 10 fields that have to be searched, the query get's quite huge, especially when 2 or more keywords are given.
Question: is there an easier way to achieve this?
(this is what my query actually looks like, using the keywords dekker warmenhuizen 0226:)
SELECT
tKlant.nKlant AS nKlant,
MAX(sAchternaam) AS sAchternaam,
MAX(sVoornaam) AS sVoornaam,
MAX(sVoorletters) AS sVoorletters,
MAX(sBedrijfsnaam) AS sBedrijfsnaam,
MAX(sPlaats) AS sPlaats,
MAX(sStraat + ' ' + sHuisnummer) AS sAdres,
MAX(sPostcode) AS sPostcode,
MAX(sCommunicatie) AS sCommunicatie,
(CASE DATALENGTH(mOverig) WHEN 0 THEN 0 ELSE 1 END) AS HasOverig,
MAX(sKlantGroep) AS sKlantGroep
FROM tKlant
LEFT JOIN tKlantGroep ON tKlant.nKlantGroep = tKlantGroep.nKlantGroep
LEFT JOIN tCommunicatie ON tKlant.nKlant = tCommunicatie.nKlant
LEFT JOIN tAdres ON tKlant.nKlant = tAdres.nKlant
WHERE (tKlant.sAchternaam LIKE '%dekker%' OR tKlant.sBedrijfsnaam LIKE '%dekker%' OR tKlant.sKlant LIKE '%dekker%' OR tKlant.sVoornaam LIKE '%dekker%' OR tKlant.mOverig LIKE '%dekker%' OR tCommunicatie.sCommunicatie LIKE '%dekker%' OR tAdres.sStraat + ' ' + tAdres.sHuisnummer LIKE '%dekker%' OR tAdres.sPostcode LIKE '%dekker%' OR tAdres.sPlaats LIKE '%dekker%' OR tKlantGroep.sKlantGroep LIKE '%dekker%')
AND (tKlant.sAchternaam LIKE '%warmenhuizen%' OR tKlant.sBedrijfsnaam LIKE '%warmenhuizen%' OR tKlant.sKlant LIKE '%warmenhuizen%' OR tKlant.sVoornaam LIKE '%warmenhuizen%' OR tKlant.mOverig LIKE '%warmenhuizen%' OR tCommunicatie.sCommunicatie LIKE '%warmenhuizen%' OR tAdres.sStraat + ' ' + tAdres.sHuisnummer LIKE '%warmenhuizen%' OR tAdres.sPostcode LIKE '%warmenhuizen%' OR tAdres.sPlaats LIKE '%warmenhuizen%' OR tKlantGroep.sKlantGroep LIKE '%warmenhuizen%')
AND (tKlant.sAchternaam LIKE '%0226%' OR tKlant.sBedrijfsnaam LIKE '%0226%' OR tKlant.sKlant LIKE '%0226%' OR tKlant.sVoornaam LIKE '%0226%' OR tKlant.mOverig LIKE '%0226%' OR tCommunicatie.sCommunicatie LIKE '%0226%' OR tAdres.sStraat + ' ' + tAdres.sHuisnummer LIKE '%0226%' OR tAdres.sPostcode LIKE '%0226%' OR tAdres.sPlaats LIKE '%0226%' OR tKlantGroep.sKlantGroep LIKE '%0226%')
GROUP BY tKlant.nKlant, DATALENGTH(mOverig)
ORDER BY sAchternaam, sPlaats, sAdres;
SELECT
*
FROM table
WHERE fruit in ('apple','pear','green')
and color in ('apple','pear','green')
I recommend you take a look at Erland's article:
http://www.sommarskog.se/dyn-search.html
|||Thanks! I'll check it out
Monday, February 13, 2012
%LIKE% GETDATE() query
I'm building an ASP application in Dreamweaver MX2004 on the application the
user is aloud to inout a record. The following page has two recordsets, one
that returns the data that the user enterred in the previuos record and
another that identifies users who have requested that kind of information.
The first recordset however is where the problem lies as currently the
recordset is built based on two values - USERID and ADREFERENCE. The problem
with this is that it could return more than one record and then everything
becomes

would be and Dateposted = GETDATE() obviously this wont work though as it
will be looking for a record posted the exact time, the question is would -
Dateposted %LIKE% GETDATE work, or is therer an alternative - ideally withou
t
any complex SQL programming as i'm totaaly new to SQL
thanksYou can use DateDiff(dd, Dateposted , getdate())= 0 to do it.
Perayu
"GTN170777" <GTN170777@.discussions.microsoft.com> wrote in message
news:21F267E8-E6C6-4B78-AF25-CDB0B68B7137@.microsoft.com...
> Hi,
> I'm building an ASP application in Dreamweaver MX2004 on the application
> the
> user is aloud to inout a record. The following page has two recordsets,
> one
> that returns the data that the user enterred in the previuos record and
> another that identifies users who have requested that kind of information.
> The first recordset however is where the problem lies as currently the
> recordset is built based on two values - USERID and ADREFERENCE. The
> problem
> with this is that it could return more than one record and then everything
> becomes

> which
> would be and Dateposted = GETDATE() obviously this wont work though as it
> will be looking for a record posted the exact time, the question is
> would -
> Dateposted %LIKE% GETDATE work, or is therer an alternative - ideally
> without
> any complex SQL programming as i'm totaaly new to SQL
> thanks|||You can't use the LIKE comparison operator with datetime values, but you can
use BETWEEN. For example, if you wanted to find records within the last 5
minutes
SELECT ...
WHERE [Dateposted] BETWEEN DATEADD(mi, -5, GETDATE()) AND GETDATE()
For other ideas, take a look at the DATEADD and DATEDIFF functions in Books
Online.
"GTN170777" wrote:
> Hi,
> I'm building an ASP application in Dreamweaver MX2004 on the application t
he
> user is aloud to inout a record. The following page has two recordsets, on
e
> that returns the data that the user enterred in the previuos record and
> another that identifies users who have requested that kind of information.
> The first recordset however is where the problem lies as currently the
> recordset is built based on two values - USERID and ADREFERENCE. The probl
em
> with this is that it could return more than one record and then everything
> becomes

ch
> would be and Dateposted = GETDATE() obviously this wont work though as it
> will be looking for a record posted the exact time, the question is would
-
> Dateposted %LIKE% GETDATE work, or is therer an alternative - ideally with
out
> any complex SQL programming as i'm totaaly new to SQL
> thanks|||> The first recordset however is where the problem lies as currently the
> recordset is built based on two values - USERID and ADREFERENCE. The
> problem
> with this is that it could return more than one record and then everything
> becomes

If you are using IDENTITY then after the insert you could select
SCOPE_IDENTITY() and keep track of that. Now, just
SELECT UserID, AdReference, DatePosted
FROM your_table
WHERE identity_column = whatever;
If you are not using IDENTITY and the key is UserID/AdReference/DateTime
then you could say:
SELECT TOP 1 UserID, AdReference, DatePosted
FROM your_table
ORDER BY DatePosted DESC;
> the question is would -
> Dateposted %LIKE% GETDATE work
No, there are all kinds of issues with this. First off, GETDATE() returns a
date, not a string. What you see when you SELECT GETDATE() or PRINT is not
how it's stored internally. So, you'd have to convert both sides to a
string, and this is not going to work well at all. Additionally, GETDATE()
when you run the select afterward is not going to contain the same value as
GETDATE() was when the insert happened. You could restrict the comparison
to the hour or to the day, but if they added two posts in that timeframe,
you would still get multiple rows back.
A|||"Perayu" wrote:
> You can use DateDiff(dd, Dateposted , getdate())= 0 to do it.
> Perayu
>
--The problem than can happen with this is
SELECT DATEDIFF(dd, '2006-01-24 23:59:59', '2006-01-25 00:00:01')
/*Returns 1, even though the two dates are only 2 seconds apart. Not a bug;
DATEDIFF counts the number of dividing boundaries crossed going from the
first date to the second date for the specified type of date differential */|||Thanks Mark, should have thought about that!!
"Mark Williams" wrote:
> You can't use the LIKE comparison operator with datetime values, but you c
an
> use BETWEEN. For example, if you wanted to find records within the last 5
> minutes
> SELECT ...
> WHERE [Dateposted] BETWEEN DATEADD(mi, -5, GETDATE()) AND GETDATE()
> For other ideas, take a look at the DATEADD and DATEDIFF functions in Book
s
> Online.
> --
>
> "GTN170777" wrote:
>|||But what if they had multiple posts in the last 5 minutes? You should be
designing your system so that you can identify a single row by more than the
fact that it fell within a certain time range. No matter how narrow you
make your window, it is possible that either (a) multiple rows will match or
(b) your window is too small to even capture the last insert.
> Thanks Mark, should have thought about that!!
> "Mark Williams" wrote:
>|||To compare datetime fields and ignore the time, do this
WHERE CONVERT(CHR(8), Dateposted ,112) = CONVERT(CHAR(8),GetDate(),112)
this would be the same as the following if Dateposted = 1/24/2006
WHERE '20060124' = '20060125'
But this probably would not solve your problem if the user could add more
than one record per day. The best solution is to use SCOPE_IDENTITY() as a
previous poster suggested.
kevin
"GTN170777" wrote:
> Hi,
> I'm building an ASP application in Dreamweaver MX2004 on the application t
he
> user is aloud to inout a record. The following page has two recordsets, on
e
> that returns the data that the user enterred in the previuos record and
> another that identifies users who have requested that kind of information.
> The first recordset however is where the problem lies as currently the
> recordset is built based on two values - USERID and ADREFERENCE. The probl
em
> with this is that it could return more than one record and then everything
> becomes

ch
> would be and Dateposted = GETDATE() obviously this wont work though as it
> will be looking for a record posted the exact time, the question is would
-
> Dateposted %LIKE% GETDATE work, or is therer an alternative - ideally with
out
> any complex SQL programming as i'm totaaly new to SQL
> thanks|||That sounded interesting, so I added IsLike(pattern) to my TDate UDT at
http://channel9.msdn.com/ShowPost.aspx?PostID=147390
Here is sample of usage:
DECLARE @.t table(
Date datetime
);
insert @.t SELECT '1/1/2005'
insert @.t select '1/2/2005'
insert @.t select '9/1/2005'
insert @.t select '4/4/2005'
insert @.t select '4/12/2005'
insert @.t select '10/20/2005'
insert @.t select '11/22/2005'
insert @.t select '12/25/2005'
-- Select any date in 2005 that has a day in the 20's.
select Date
from @.t
where TDate::FromSqlDateTime(Date).IsLike(''/2?/2005') = 1
-- Select any date that only has 1 digit in the month and 1 digit in the
day.
select Date
from @.t
where TDate::FromSqlDateTime(Date).IsLike('?/?/'') = 1
OUTPUT
Date
2005-10-20 00:00:00.000
2005-11-22 00:00:00.000
2005-12-25 00:00:00.000
Date
2005-01-01 00:00:00.000
2005-01-02 00:00:00.000
2005-09-01 00:00:00.000
2005-04-04 00:00:00.000
Kinda

--
William Stacey [MVP]
"GTN170777" <GTN170777@.discussions.microsoft.com> wrote in message
news:21F267E8-E6C6-4B78-AF25-CDB0B68B7137@.microsoft.com...
| Hi,
| I'm building an ASP application in Dreamweaver MX2004 on the application
the
| user is aloud to inout a record. The following page has two recordsets,
one
| that returns the data that the user enterred in the previuos record and
| another that identifies users who have requested that kind of information.
| The first recordset however is where the problem lies as currently the
| recordset is built based on two values - USERID and ADREFERENCE. The
problem
| with this is that it could return more than one record and then everything
| becomes

which
| would be and Dateposted = GETDATE() obviously this wont work though as it
| will be looking for a record posted the exact time, the question is
would -
| Dateposted %LIKE% GETDATE work, or is therer an alternative - ideally
without
| any complex SQL programming as i'm totaaly new to SQL
|
| thanks