Showing posts with label internet. Show all posts
Showing posts with label internet. Show all posts

Friday, March 30, 2012

How to create second publisher record on the server?

Hello...
What we are trying to accomplish is to be able to replicate from Sql Server 2000 to some laptops running MSDE across the internet. These laptops are NOT part of our domain. I have set up a publication to allow for anonymous pull subscriptions for transa
ctional replication. Everything works fine now...except that for my test I had to setup/configure the laptop with a Hosts and LMHosts file so that it could resolve the server's name from its fully qualified name. This will be a pain for us to implement
and deploy....as we will have hundreds of client machines connecting to our server. The problem has to do with a sql server table that stores the name of the server publisher & distributor.
I noticed (via the sql server profiler tool) that when replication begins, there is some intial login/handshaking that occurs and one of the principal commands that gets executed is something like: exec sp_helpdistpublisher N'ServerName'. This stored pr
oc queries the MSDistPublisher table in the MSDB database. The stored proc returns a single row of data which includes our server's name...as it has been setup...it's machine name. This table does not include (obviously) a record that has the server's fu
lly qualified domain name (ServerName.Domain.Com).
My question is: is there a way to add an additional row of data and use the fully qualified domain name?
thanks for any help.
- DW
in your application, can't you hard code the publisher name with the FQDN
for the publisher/distributor?
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"DW" <DW@.discussions.microsoft.com> wrote in message
news:62391DE0-137B-46EE-9024-9E679829FD84@.microsoft.com...
> Hello...
> What we are trying to accomplish is to be able to replicate from Sql
Server 2000 to some laptops running MSDE across the internet. These laptops
are NOT part of our domain. I have set up a publication to allow for
anonymous pull subscriptions for transactional replication. Everything
works fine now...except that for my test I had to setup/configure the laptop
with a Hosts and LMHosts file so that it could resolve the server's name
from its fully qualified name. This will be a pain for us to implement and
deploy....as we will have hundreds of client machines connecting to our
server. The problem has to do with a sql server table that stores the name
of the server publisher & distributor.
> I noticed (via the sql server profiler tool) that when replication begins,
there is some intial login/handshaking that occurs and one of the principal
commands that gets executed is something like: exec sp_helpdistpublisher
N'ServerName'. This stored proc queries the MSDistPublisher table in the
MSDB database. The stored proc returns a single row of data which includes
our server's name...as it has been setup...it's machine name. This table
does not include (obviously) a record that has the server's fully qualified
domain name (ServerName.Domain.Com).
> My question is: is there a way to add an additional row of data and use
the fully qualified domain name?
> thanks for any help.
> - DW

Monday, March 26, 2012

How to create internet connection?

Hi everybody,
Is there a client side approach of sending and receiving data from a sql database without a web service or a server component (servicedcomponent and server app)? How can you simulate a network connection over the internet that could send and receive data from and to database?

How can you create a class that would do the same task as a network connection using internet communication as medium? Please point me to topics and documents about this matter.

Thanks.

denpsia

SQLServer provides this feature.

I move this post.

|||

In .NET you would use the HttpWebRequest class, here is a simple bit of sample code to send a SOAP packet.

private void soapRequest()
{
Uri soapUri = new Uri("http://" + soapServer + "/clear_integrated");
string soapRequest =
"<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
"<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" " +
"xmlns:sql=\"http://schemas.microsoft.com/sqlserver/2004/SOAP\">" +
"<SOAP-ENV:Body>" +
"<sql:sqlbatch>" +
"<sql:BatchCommands>" +
"select * from authors" +
"</sql:BatchCommands>" +
"</sql:sqlbatch>" +
"</SOAP-ENV:Body>" +
"</SOAP-ENV:Envelope>";

System.Text.UTF8Encoding utfEncoder = new UTF8Encoding();
byte [] requestBytes = utfEncoder.GetBytes(soapRequest);

// Do the work.
for(int i=1; i<=loopCount; i++)
{
try
{
HttpWebRequest webRequest = (System.Net.HttpWebRequest)WebRequest.Create(soapUri);
webRequest.Credentials = System.Net.CredentialCache.DefaultCredentials;
webRequest.Timeout = timeout;
webRequest.KeepAlive = true;
webRequest.Headers.Add("SOAPAction", "\"http://schemas.microsoft.com/sqlserver/2004/SOAPsqlbatch\"");
webRequest.ContentType = "text/xml;charset=\"utf-8\"";
webRequest.Accept = "text/xml";
webRequest.Method = "POST";
webRequest.ContentLength = requestBytes.Length;
Stream requestStream = webRequest.GetRequestStream();
requestStream.Write(requestBytes, 0, requestBytes.Length);
requestStream.Close();
WebResponse webResponse = webRequest.GetResponse();

StreamReader responseStream =
new System.IO.StreamReader(webResponse.GetResponseStream(), Encoding.UTF8);

string stringResponse = responseStream.ReadToEnd();
responseStream.Close();
webResponse.Close();

if (1445 != stringResponse.Length) failCount++;

}
catch (Exception ex)
{
logex(ex);

}
}
}

|||

Hi Matt,

This topic is quite old. Thanks for the reply, at that time I post this topic, I am working on windows application on a tablet pc that needs internet connection and remote access to a remote MySQL database. This code of yours is for asp.net and how exactly would the data be transmitted? What protocol or utility would handle the actual sending of data, in my work then we uses VPN to establish remote database connection and ras dialup to establish internet connection. Thanks for the code, it might proved useful next time.

den2005

How to create internet connection?

Hi everybody,
Is there a client side approach of sending and receiving data from a sql database without a web service or a server component (servicedcomponent and server app)? How can you simulate a network connection over the internet that could send and receive data from and to database?

How can you create a class that would do the same task as a network connection using internet communication as medium? Please point me to topics and documents about this matter.

Thanks.

denpsia

SQLServer provides this feature.

I move this post.

|||

In .NET you would use the HttpWebRequest class, here is a simple bit of sample code to send a SOAP packet.

private void soapRequest()
{
Uri soapUri = new Uri("http://" + soapServer + "/clear_integrated");
string soapRequest =
"<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
"<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" " +
"xmlns:sql=\"http://schemas.microsoft.com/sqlserver/2004/SOAP\">" +
"<SOAP-ENV:Body>" +
"<sql:sqlbatch>" +
"<sql:BatchCommands>" +
"select * from authors" +
"</sql:BatchCommands>" +
"</sql:sqlbatch>" +
"</SOAP-ENV:Body>" +
"</SOAP-ENV:Envelope>";

System.Text.UTF8Encoding utfEncoder = new UTF8Encoding();
byte [] requestBytes = utfEncoder.GetBytes(soapRequest);

// Do the work.
for(int i=1; i<=loopCount; i++)
{
try
{
HttpWebRequest webRequest = (System.Net.HttpWebRequest)WebRequest.Create(soapUri);
webRequest.Credentials = System.Net.CredentialCache.DefaultCredentials;
webRequest.Timeout = timeout;
webRequest.KeepAlive = true;
webRequest.Headers.Add("SOAPAction", "\"http://schemas.microsoft.com/sqlserver/2004/SOAPsqlbatch\"");
webRequest.ContentType = "text/xml;charset=\"utf-8\"";
webRequest.Accept = "text/xml";
webRequest.Method = "POST";
webRequest.ContentLength = requestBytes.Length;
Stream requestStream = webRequest.GetRequestStream();
requestStream.Write(requestBytes, 0, requestBytes.Length);
requestStream.Close();
WebResponse webResponse = webRequest.GetResponse();

StreamReader responseStream =
new System.IO.StreamReader(webResponse.GetResponseStream(), Encoding.UTF8);

string stringResponse = responseStream.ReadToEnd();
responseStream.Close();
webResponse.Close();

if (1445 != stringResponse.Length) failCount++;

}
catch (Exception ex)
{
logex(ex);

}
}
}

|||

Hi Matt,

This topic is quite old. Thanks for the reply, at that time I post this topic, I am working on windows application on a tablet pc that needs internet connection and remote access to a remote MySQL database. This code of yours is for asp.net and how exactly would the data be transmitted? What protocol or utility would handle the actual sending of data, in my work then we uses VPN to establish remote database connection and ras dialup to establish internet connection. Thanks for the code, it might proved useful next time.

den2005

sql

Monday, March 12, 2012

How to create a group acct in reports manager just for browsing

How to create a group acct for just browsing the reports, this acct.

reports are hosted on internet and now would like to give the access to all users,

would like to use the same group acct. for all users.

when ever i try to access reports, i have to provide a windows uername and password. the same reports which are on an intranet environment does'nt ask for username and password. it seems like internet report site will ask for username and password and does'nt want to share the admin username and password.

Thank you all for the information.

Hi,

seems that the internet representation does not use integrated authentication. Therefore you will have to provide the credentials for connecting. What do you want to achieve within your solution ?

So, you want to let the user enter their individual credentials at the internet representation (then you will have to use Basic authentication or a certificate solution) or you you want to authenticate them with a generic user (then you will have to create a website / Virtual directory (this depends on your design) and configure the security for this directory indivudally to anonymous access. Provide the user account which will be impersonated for the accessing users in the settings of IIS)


HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de