Showing posts with label accomplish. Show all posts
Showing posts with label accomplish. Show all posts

Friday, March 30, 2012

How to create SQL Server Express server (INSTANCENAME) programmatically?

In deploying SQL Express, how do I create a new server (INSTANCENAME)
programmatically?
What would be the best approach to accomplish this.

Thank you so much,(ianicbass@.yahoo.com) writes:
> In deploying SQL Express, how do I create a new server (INSTANCENAME)
> programmatically?
> What would be the best approach to accomplish this.

You should look in Books Online under installing SQL Server, and
particularly unattended installation.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

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

Friday, February 24, 2012

How to count a very large volume of request

Hello,
What is the best way to accomplish the following.
1) An ASP.NET program (consiting of one file somepage.aspx) receives about
25,000,000 requests pay day.
2) The requests come from a limited set of IP addresses.
3) How to count the total number of request from each IP address per day.
SQL Server 2000 is used on the backend.
Currently we used the following architecture:
* Each request to somepage.aspx generates an INSERT into a LogTable1
* There is a clustered index on the LogTable1 on the dateStamp field which
is of the type smalldatetime
* The dateStamp field has a default that sets it to the getdate()
* At the end of each day at 12:01AM there is a simple query that runs and
does a group by to count the number of requests from each IP in the given
date range (past 24 hours). This query works great and takes only 2 minutes
to run.
Is there a better way to accomplish this without having to do INSERTS into
the LogTable1 for each request?
It would not work to have the ASP.NET program execute an UPDATE each time to
increment the total number of request, since this would cause LOTSSS of
locking in the database layer.
Thanks in advance.
ArsenYou could store the data in your Application Cache, and update it
periodically to the database.
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"Arsen V." <arsen.NoSpamPlease@.emergency24.com> wrote in message
news:emdbHKo6DHA.2412@.TK2MSFTNGP09.phx.gbl...
quote:

> Hello,
> What is the best way to accomplish the following.
> 1) An ASP.NET program (consiting of one file somepage.aspx) receives about
> 25,000,000 requests pay day.
> 2) The requests come from a limited set of IP addresses.
> 3) How to count the total number of request from each IP address per day.
> SQL Server 2000 is used on the backend.
> Currently we used the following architecture:
> * Each request to somepage.aspx generates an INSERT into a LogTable1
> * There is a clustered index on the LogTable1 on the dateStamp field which
> is of the type smalldatetime
> * The dateStamp field has a default that sets it to the getdate()
> * At the end of each day at 12:01AM there is a simple query that runs and
> does a group by to count the number of requests from each IP in the given
> date range (past 24 hours). This query works great and takes only 2

minutes
quote:

> to run.
> Is there a better way to accomplish this without having to do INSERTS into
> the LogTable1 for each request?
> It would not work to have the ASP.NET program execute an UPDATE each time

to
quote:

> increment the total number of request, since this would cause LOTSSS of
> locking in the database layer.
> Thanks in advance.
> Arsen
>
|||Hi,
What about using the IIS log file?
you could set it in the way you need it, basically the client IP and maybe
the time, if you configure it to update daily all you have to do at 12:01
is run a process that read the file generated and do what you need.
Cheers,
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Arsen V." <arsen.NoSpamPlease@.emergency24.com> wrote in message
news:emdbHKo6DHA.2412@.TK2MSFTNGP09.phx.gbl...
quote:

> Hello,
> What is the best way to accomplish the following.
> 1) An ASP.NET program (consiting of one file somepage.aspx) receives about
> 25,000,000 requests pay day.
> 2) The requests come from a limited set of IP addresses.
> 3) How to count the total number of request from each IP address per day.
> SQL Server 2000 is used on the backend.
> Currently we used the following architecture:
> * Each request to somepage.aspx generates an INSERT into a LogTable1
> * There is a clustered index on the LogTable1 on the dateStamp field which
> is of the type smalldatetime
> * The dateStamp field has a default that sets it to the getdate()
> * At the end of each day at 12:01AM there is a simple query that runs and
> does a group by to count the number of requests from each IP in the given
> date range (past 24 hours). This query works great and takes only 2

minutes
quote:

> to run.
> Is there a better way to accomplish this without having to do INSERTS into
> the LogTable1 for each request?
> It would not work to have the ASP.NET program execute an UPDATE each time

to
quote:

> increment the total number of request, since this would cause LOTSSS of
> locking in the database layer.
> Thanks in advance.
> Arsen
>
|||Hi Kevin,
Do you suggest storing the TOTALs in the Cache?
Or storing the actual requests: date and ip
Would there be a locking problem?
How to do the "periodic updates" to the database from the Cache?
Thanks,
Arsen
"Kevin Spencer" <kevin@.takempis.com> wrote in message
news:ezSYvso6DHA.1936@.TK2MSFTNGP12.phx.gbl...
quote:

> You could store the data in your Application Cache, and update it
> periodically to the database.
> --
> HTH,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> Big things are made up
> of lots of little things.
> "Arsen V." <arsen.NoSpamPlease@.emergency24.com> wrote in message
> news:emdbHKo6DHA.2412@.TK2MSFTNGP09.phx.gbl...
about[QUOTE]
day.[QUOTE]
which[QUOTE]
and[QUOTE]
given[QUOTE]
> minutes
into[QUOTE]
time[QUOTE]
> to
>
|||Hi Arsen,
You could put a DataTable in the Application Cache, and add records to it
with each Request. As for periodic updating, you could put a routine in the
Session_OnStart Sub that checks an Application DateTime variable, and at
certain intervals, inserts all the records from the DataTable into the
database and clears out the DataTable.
To be safe, you would want to add code to your Application_OnEnd sub to
update the database if the Application stops or times out; however, with 25M
requests per day, that might not be necessary.
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"Arsen V." <arsen.NoSpamPlease@.emergency24.com> wrote in message
news:#daQL6o6DHA.2908@.tk2msftngp13.phx.gbl...
quote:

> Hi Kevin,
> Do you suggest storing the TOTALs in the Cache?
> Or storing the actual requests: date and ip
> Would there be a locking problem?
> How to do the "periodic updates" to the database from the Cache?
> Thanks,
> Arsen
> "Kevin Spencer" <kevin@.takempis.com> wrote in message
> news:ezSYvso6DHA.1936@.TK2MSFTNGP12.phx.gbl...
> about
> day.
> which
> and
> given
> into
> time
of[QUOTE]
>
|||what i have done is cache the last 15 minutes. the cache has the ipaddress,
the start of the 15 min interval, pagename, and number of hits during the
interval. as most users cluster their hits, this cuts down the number of
inserts.
i flush the cache every 15 minutes of when too large.
you can then get daily or hourly stats from the db with simple queries.
-- bruce (sqlwork.com)
"Arsen V." <arsen.NoSpamPlease@.emergency24.com> wrote in message
news:emdbHKo6DHA.2412@.TK2MSFTNGP09.phx.gbl...
quote:

> Hello,
> What is the best way to accomplish the following.
> 1) An ASP.NET program (consiting of one file somepage.aspx) receives about
> 25,000,000 requests pay day.
> 2) The requests come from a limited set of IP addresses.
> 3) How to count the total number of request from each IP address per day.
> SQL Server 2000 is used on the backend.
> Currently we used the following architecture:
> * Each request to somepage.aspx generates an INSERT into a LogTable1
> * There is a clustered index on the LogTable1 on the dateStamp field which
> is of the type smalldatetime
> * The dateStamp field has a default that sets it to the getdate()
> * At the end of each day at 12:01AM there is a simple query that runs and
> does a group by to count the number of requests from each IP in the given
> date range (past 24 hours). This query works great and takes only 2

minutes
quote:

> to run.
> Is there a better way to accomplish this without having to do INSERTS into
> the LogTable1 for each request?
> It would not work to have the ASP.NET program execute an UPDATE each time

to
quote:

> increment the total number of request, since this would cause LOTSSS of
> locking in the database layer.
> Thanks in advance.
> Arsen
>

How to count a very large volume of request

Hello,
What is the best way to accomplish the following.
1) An ASP.NET program (consiting of one file somepage.aspx) receives about
25,000,000 requests pay day.
2) The requests come from a limited set of IP addresses.
3) How to count the total number of request from each IP address per day.
SQL Server 2000 is used on the backend.
Currently we used the following architecture:
* Each request to somepage.aspx generates an INSERT into a LogTable1
* There is a clustered index on the LogTable1 on the dateStamp field which
is of the type smalldatetime
* The dateStamp field has a default that sets it to the getdate()
* At the end of each day at 12:01AM there is a simple query that runs and
does a group by to count the number of requests from each IP in the given
date range (past 24 hours). This query works great and takes only 2 minutes
to run.
Is there a better way to accomplish this without having to do INSERTS into
the LogTable1 for each request?
It would not work to have the ASP.NET program execute an UPDATE each time to
increment the total number of request, since this would cause LOTSSS of
locking in the database layer.
Thanks in advance.
ArsenYou could store the data in your Application Cache, and update it
periodically to the database.
--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"Arsen V." <arsen.NoSpamPlease@.emergency24.com> wrote in message
news:emdbHKo6DHA.2412@.TK2MSFTNGP09.phx.gbl...
> Hello,
> What is the best way to accomplish the following.
> 1) An ASP.NET program (consiting of one file somepage.aspx) receives about
> 25,000,000 requests pay day.
> 2) The requests come from a limited set of IP addresses.
> 3) How to count the total number of request from each IP address per day.
> SQL Server 2000 is used on the backend.
> Currently we used the following architecture:
> * Each request to somepage.aspx generates an INSERT into a LogTable1
> * There is a clustered index on the LogTable1 on the dateStamp field which
> is of the type smalldatetime
> * The dateStamp field has a default that sets it to the getdate()
> * At the end of each day at 12:01AM there is a simple query that runs and
> does a group by to count the number of requests from each IP in the given
> date range (past 24 hours). This query works great and takes only 2
minutes
> to run.
> Is there a better way to accomplish this without having to do INSERTS into
> the LogTable1 for each request?
> It would not work to have the ASP.NET program execute an UPDATE each time
to
> increment the total number of request, since this would cause LOTSSS of
> locking in the database layer.
> Thanks in advance.
> Arsen
>|||Hi,
What about using the IIS log file?
you could set it in the way you need it, basically the client IP and maybe
the time, if you configure it to update daily all you have to do at 12:01
is run a process that read the file generated and do what you need.
Cheers,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Arsen V." <arsen.NoSpamPlease@.emergency24.com> wrote in message
news:emdbHKo6DHA.2412@.TK2MSFTNGP09.phx.gbl...
> Hello,
> What is the best way to accomplish the following.
> 1) An ASP.NET program (consiting of one file somepage.aspx) receives about
> 25,000,000 requests pay day.
> 2) The requests come from a limited set of IP addresses.
> 3) How to count the total number of request from each IP address per day.
> SQL Server 2000 is used on the backend.
> Currently we used the following architecture:
> * Each request to somepage.aspx generates an INSERT into a LogTable1
> * There is a clustered index on the LogTable1 on the dateStamp field which
> is of the type smalldatetime
> * The dateStamp field has a default that sets it to the getdate()
> * At the end of each day at 12:01AM there is a simple query that runs and
> does a group by to count the number of requests from each IP in the given
> date range (past 24 hours). This query works great and takes only 2
minutes
> to run.
> Is there a better way to accomplish this without having to do INSERTS into
> the LogTable1 for each request?
> It would not work to have the ASP.NET program execute an UPDATE each time
to
> increment the total number of request, since this would cause LOTSSS of
> locking in the database layer.
> Thanks in advance.
> Arsen
>|||Hi Kevin,
Do you suggest storing the TOTALs in the Cache?
Or storing the actual requests: date and ip
Would there be a locking problem?
How to do the "periodic updates" to the database from the Cache?
Thanks,
Arsen
"Kevin Spencer" <kevin@.takempis.com> wrote in message
news:ezSYvso6DHA.1936@.TK2MSFTNGP12.phx.gbl...
> You could store the data in your Application Cache, and update it
> periodically to the database.
> --
> HTH,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> Big things are made up
> of lots of little things.
> "Arsen V." <arsen.NoSpamPlease@.emergency24.com> wrote in message
> news:emdbHKo6DHA.2412@.TK2MSFTNGP09.phx.gbl...
> > Hello,
> >
> > What is the best way to accomplish the following.
> >
> > 1) An ASP.NET program (consiting of one file somepage.aspx) receives
about
> > 25,000,000 requests pay day.
> >
> > 2) The requests come from a limited set of IP addresses.
> >
> > 3) How to count the total number of request from each IP address per
day.
> >
> > SQL Server 2000 is used on the backend.
> >
> > Currently we used the following architecture:
> >
> > * Each request to somepage.aspx generates an INSERT into a LogTable1
> > * There is a clustered index on the LogTable1 on the dateStamp field
which
> > is of the type smalldatetime
> > * The dateStamp field has a default that sets it to the getdate()
> > * At the end of each day at 12:01AM there is a simple query that runs
and
> > does a group by to count the number of requests from each IP in the
given
> > date range (past 24 hours). This query works great and takes only 2
> minutes
> > to run.
> >
> > Is there a better way to accomplish this without having to do INSERTS
into
> > the LogTable1 for each request?
> >
> > It would not work to have the ASP.NET program execute an UPDATE each
time
> to
> > increment the total number of request, since this would cause LOTSSS of
> > locking in the database layer.
> >
> > Thanks in advance.
> >
> > Arsen
> >
> >
>|||Hi Arsen,
You could put a DataTable in the Application Cache, and add records to it
with each Request. As for periodic updating, you could put a routine in the
Session_OnStart Sub that checks an Application DateTime variable, and at
certain intervals, inserts all the records from the DataTable into the
database and clears out the DataTable.
To be safe, you would want to add code to your Application_OnEnd sub to
update the database if the Application stops or times out; however, with 25M
requests per day, that might not be necessary.
--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"Arsen V." <arsen.NoSpamPlease@.emergency24.com> wrote in message
news:#daQL6o6DHA.2908@.tk2msftngp13.phx.gbl...
> Hi Kevin,
> Do you suggest storing the TOTALs in the Cache?
> Or storing the actual requests: date and ip
> Would there be a locking problem?
> How to do the "periodic updates" to the database from the Cache?
> Thanks,
> Arsen
> "Kevin Spencer" <kevin@.takempis.com> wrote in message
> news:ezSYvso6DHA.1936@.TK2MSFTNGP12.phx.gbl...
> > You could store the data in your Application Cache, and update it
> > periodically to the database.
> >
> > --
> > HTH,
> > Kevin Spencer
> > .Net Developer
> > Microsoft MVP
> > Big things are made up
> > of lots of little things.
> >
> > "Arsen V." <arsen.NoSpamPlease@.emergency24.com> wrote in message
> > news:emdbHKo6DHA.2412@.TK2MSFTNGP09.phx.gbl...
> > > Hello,
> > >
> > > What is the best way to accomplish the following.
> > >
> > > 1) An ASP.NET program (consiting of one file somepage.aspx) receives
> about
> > > 25,000,000 requests pay day.
> > >
> > > 2) The requests come from a limited set of IP addresses.
> > >
> > > 3) How to count the total number of request from each IP address per
> day.
> > >
> > > SQL Server 2000 is used on the backend.
> > >
> > > Currently we used the following architecture:
> > >
> > > * Each request to somepage.aspx generates an INSERT into a LogTable1
> > > * There is a clustered index on the LogTable1 on the dateStamp field
> which
> > > is of the type smalldatetime
> > > * The dateStamp field has a default that sets it to the getdate()
> > > * At the end of each day at 12:01AM there is a simple query that runs
> and
> > > does a group by to count the number of requests from each IP in the
> given
> > > date range (past 24 hours). This query works great and takes only 2
> > minutes
> > > to run.
> > >
> > > Is there a better way to accomplish this without having to do INSERTS
> into
> > > the LogTable1 for each request?
> > >
> > > It would not work to have the ASP.NET program execute an UPDATE each
> time
> > to
> > > increment the total number of request, since this would cause LOTSSS
of
> > > locking in the database layer.
> > >
> > > Thanks in advance.
> > >
> > > Arsen
> > >
> > >
> >
> >
>|||what i have done is cache the last 15 minutes. the cache has the ipaddress,
the start of the 15 min interval, pagename, and number of hits during the
interval. as most users cluster their hits, this cuts down the number of
inserts.
i flush the cache every 15 minutes of when too large.
you can then get daily or hourly stats from the db with simple queries.
-- bruce (sqlwork.com)
"Arsen V." <arsen.NoSpamPlease@.emergency24.com> wrote in message
news:emdbHKo6DHA.2412@.TK2MSFTNGP09.phx.gbl...
> Hello,
> What is the best way to accomplish the following.
> 1) An ASP.NET program (consiting of one file somepage.aspx) receives about
> 25,000,000 requests pay day.
> 2) The requests come from a limited set of IP addresses.
> 3) How to count the total number of request from each IP address per day.
> SQL Server 2000 is used on the backend.
> Currently we used the following architecture:
> * Each request to somepage.aspx generates an INSERT into a LogTable1
> * There is a clustered index on the LogTable1 on the dateStamp field which
> is of the type smalldatetime
> * The dateStamp field has a default that sets it to the getdate()
> * At the end of each day at 12:01AM there is a simple query that runs and
> does a group by to count the number of requests from each IP in the given
> date range (past 24 hours). This query works great and takes only 2
minutes
> to run.
> Is there a better way to accomplish this without having to do INSERTS into
> the LogTable1 for each request?
> It would not work to have the ASP.NET program execute an UPDATE each time
to
> increment the total number of request, since this would cause LOTSSS of
> locking in the database layer.
> Thanks in advance.
> Arsen
>

Sunday, February 19, 2012

How to copy record from a table in a server to a diffrent server.

Hi all,

I have server1 and server2 having the same tables. I wanna copy tbl1 records in server1 to tbl1 table in server2. How can I accomplish this task?

Thank you in advance,

Use a query. This assumes you have permissions to both servers.


Code Snippet

INSERT INTO tbl1
SELECT
Col1,
Col2,
Col3,
etc
FROM Server2.MyDatabase.dbo.tbl1
WHERE {criteria}