Showing posts with label location. Show all posts
Showing posts with label location. Show all posts

Thursday, March 8, 2012

Adding one more subscriber

Hi All
I have a transactional replication with one publisher/distributor and one
subscriber. I want to add one more subscriber for another location. What is
the best method to add one more subscriber? Expect expert's suggestions.
Regards,
Aris
Make sure the new subscriber is enabled (use Tools, Replication, Configure
Distributor, Publishers and Subscribers).
If it is indistinguishable from the other subscriber simple script out your
publication, note the sp_addsubscription statement at the bottom, copy this
and paste it into your publication database on your publisher. Edit this
statement for the new subscriber.
Run the script.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Aris" <Aris@.discussions.microsoft.com> wrote in message
news:86D98B89-5F43-42F1-BF4B-BE9422F8827C@.microsoft.com...
> Hi All
> I have a transactional replication with one publisher/distributor and one
> subscriber. I want to add one more subscriber for another location. What
> is
> the best method to add one more subscriber? Expect expert's suggestions.
> Regards,
> Aris
>

Saturday, February 25, 2012

Adding locationID's to detail records using SQL syntax

SQLserver 2K
Table A (Customer Master)
CustID
CustName
Table B (Customer Location)
CustID
LocationID
LocationOrderID
LocationName
What's the syntax to automatically add LocationOrderID in increment of 1 for
table B where B.CustID = A.CustID ?
For example,
A.CustID = 100
and there are 5 B records having B.CustID = 100
I need to insert LocationOrderID starting with 1 to B.LocationOrderID based
on the order of B.LocationName
Any help is greatly appreciated.
BillTry,
update tableB
set LocationOrderID = (select count(*) from tableB as a where a.CustID =
tableB.CustID and a.LocationName <= tableB.LocationName)
go
AMB
"Bill Nguyen" wrote:

> SQLserver 2K
> Table A (Customer Master)
> CustID
> CustName
> Table B (Customer Location)
> CustID
> LocationID
> LocationOrderID
> LocationName
> What's the syntax to automatically add LocationOrderID in increment of 1 f
or
> table B where B.CustID = A.CustID ?
> For example,
> A.CustID = 100
> and there are 5 B records having B.CustID = 100
> I need to insert LocationOrderID starting with 1 to B.LocationOrderID base
d
> on the order of B.LocationName
>
> Any help is greatly appreciated.
> Bill
>
>|||Alejandro;
This works great!
Thanks
Bill
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
news:9E0D3718-1900-409C-BAFB-885F32212EB9@.microsoft.com...
> Try,
> update tableB
> set LocationOrderID = (select count(*) from tableB as a where a.CustID =
> tableB.CustID and a.LocationName <= tableB.LocationName)
> go
>
> AMB
> "Bill Nguyen" wrote:
>

Sunday, February 19, 2012

adding DB from another computer

Hi!
I have copied from other computer, from location "C:\Program Files\Microsoft
SQL Server\MSSQL.2\MSSQL\Data" files my_db.mdf and md_db_log.ldf to other
computer to the same location, and I can't see this DB. How can I import DB
using files above?
Regards,
AreqYOu will either have to attach the database using the GUI commands for that
(Right Click on the server, either in EM or SSMS) and select attach
database, then select the appropiate database files, or use the TSQL command
sp_attachdb to attach the files. See more details about the TSQL command in
the BOL (SQL Server Help files).
Jens K. Suessmeyer.
--
http://www.sqlserver2005.de
--
"Areq" <areq@.op.com> wrote in message
news:eu1h3n$kqe$1@.nemesis.news.tpi.pl...
> Hi!
> I have copied from other computer, from location "C:\Program
> Files\Microsoft SQL Server\MSSQL.2\MSSQL\Data" files my_db.mdf and
> md_db_log.ldf to other computer to the same location, and I can't see this
> DB. How can I import DB using files above?
> Regards,
> Areq
>|||Areq,
Check BOL for sp_attach_db. That is probably what you need.
-- Bill
"Areq" <areq@.op.com> wrote in message
news:eu1h3n$kqe$1@.nemesis.news.tpi.pl...
> Hi!
> I have copied from other computer, from location "C:\Program
> Files\Microsoft SQL Server\MSSQL.2\MSSQL\Data" files my_db.mdf and
> md_db_log.ldf to other computer to the same location, and I can't see this
> DB. How can I import DB using files above?
> Regards,
> Areq
>|||Use sp_attach_db
Here is an example from BOL
EXEC sp_attach_db @.dbname = N'pubs',
@.filename1 = N'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\pubs.mdf',
@.filename2 = N'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\pubs_log.ldf'
Jack Vamvas
___________________________________
Advertise your IT vacancies for free at - http://www.ITjobfeed.com
"Areq" <areq@.op.com> wrote in message
news:eu1h3n$kqe$1@.nemesis.news.tpi.pl...
> Hi!
> I have copied from other computer, from location "C:\Program
> Files\Microsoft SQL Server\MSSQL.2\MSSQL\Data" files my_db.mdf and
> md_db_log.ldf to other computer to the same location, and I can't see this
> DB. How can I import DB using files above?
> Regards,
> Areq
>

adding DB from another computer

Hi!
I have copied from other computer, from location "C:\Program Files\Microsoft
SQL Server\MSSQL.2\MSSQL\Data" files my_db.mdf and md_db_log.ldf to other
computer to the same location, and I can't see this DB. How can I import DB
using files above?
Regards,
AreqYOu will either have to attach the database using the GUI commands for that
(Right Click on the server, either in EM or SSMS) and select attach
database, then select the appropiate database files, or use the TSQL command
sp_attachdb to attach the files. See more details about the TSQL command in
the BOL (SQL Server Help files).
Jens K. Suessmeyer.
http://www.sqlserver2005.de
--
"Areq" <areq@.op.com> wrote in message
news:eu1h3n$kqe$1@.nemesis.news.tpi.pl...
> Hi!
> I have copied from other computer, from location "C:\Program
> Files\Microsoft SQL Server\MSSQL.2\MSSQL\Data" files my_db.mdf and
> md_db_log.ldf to other computer to the same location, and I can't see this
> DB. How can I import DB using files above?
> Regards,
> Areq
>|||Areq,
Check BOL for sp_attach_db. That is probably what you need.
-- Bill
"Areq" <areq@.op.com> wrote in message
news:eu1h3n$kqe$1@.nemesis.news.tpi.pl...
> Hi!
> I have copied from other computer, from location "C:\Program
> Files\Microsoft SQL Server\MSSQL.2\MSSQL\Data" files my_db.mdf and
> md_db_log.ldf to other computer to the same location, and I can't see this
> DB. How can I import DB using files above?
> Regards,
> Areq
>|||Use sp_attach_db
Here is an example from BOL
EXEC sp_attach_db @.dbname = N'pubs',
@.filename1 = N'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\pubs.mdf',
@.filename2 = N'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\pubs_log.ldf'
Jack Vamvas
___________________________________
Advertise your IT vacancies for free at - http://www.ITjobfeed.com
"Areq" <areq@.op.com> wrote in message
news:eu1h3n$kqe$1@.nemesis.news.tpi.pl...
> Hi!
> I have copied from other computer, from location "C:\Program
> Files\Microsoft SQL Server\MSSQL.2\MSSQL\Data" files my_db.mdf and
> md_db_log.ldf to other computer to the same location, and I can't see this
> DB. How can I import DB using files above?
> Regards,
> Areq
>