Friday, March 23, 2012
Propagate NEW Table to Anon Merge Replicas
Add, Update, Delete Triggers?
I created a new Table (by running a SQL Script created on a Developer
machine) on a Remote SBS 2003 Server (SQL 2K). It Propagated to Subscribers,
OK. But it is useless, because is missing the Triggers: dbo.ins_ ... ,
dbo.upd_ ... , dbo.del_ ...
What did I miss, and Where? when I created the Prototype?
Aubrey Kelley
It sounds like merge replication has not placed all of the object it
requires on the subscriber. Are all objects owned by dbo? There were some
problems on pre SP 4 service packs with this.
How did you create the new table and add it to the merge publication? How
did you deploy it to your subscribers?
The best way to fix this is to reinitialize, generate a new snapshot and
send it to the subscribers. Any other approach may fix this particular
problem but there could be further missing objects and the merge replication
metadata may be in an inconsistent state.
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
"Aubrey" <miscuates@.online.nospam> wrote in message
news:B1E8B402-7B5B-4DD3-8389-9BBC7D99F109@.microsoft.com...
> How do I get a New Table to propagate to Anonymous Merge Subscribers, WITH
> Add, Update, Delete Triggers?
> I created a new Table (by running a SQL Script created on a Developer
> machine) on a Remote SBS 2003 Server (SQL 2K). It Propagated to
> Subscribers,
> OK. But it is useless, because is missing the Triggers: dbo.ins_ ... ,
> dbo.upd_ ... , dbo.del_ ...
> What did I miss, and Where? when I created the Prototype?
> --
> Aubrey Kelley
Wednesday, March 21, 2012
Prompt for a database name
Is there a way to prompt someone to enter a database name in a script? For
example, I have a script where I need to update a table to set a column with
a value found in another table in another database. We don't know exactly
what the actual db name is of where to find the table and we would like, in
the script, to be able to allow the user enter the db name so that we can do
the update correctly. We don't want to have the user to manually update
script to specify the db name in the update statement, but rather prompt them
for the name so that we can do the update for them.
Thanks in advance,
DeeSQL Server cannot prompt, it is a service running on a server machine. The client app can. What
app/tool are you using? SQLCMD, OSQL, SSMS, QA, something else?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"bpdee" <bpdee@.discussions.microsoft.com> wrote in message
news:130AABB7-8F8B-4F47-8A27-119F022F49F3@.microsoft.com...
> Hi,
> Is there a way to prompt someone to enter a database name in a script? For
> example, I have a script where I need to update a table to set a column with
> a value found in another table in another database. We don't know exactly
> what the actual db name is of where to find the table and we would like, in
> the script, to be able to allow the user enter the db name so that we can do
> the update correctly. We don't want to have the user to manually update
> script to specify the db name in the update statement, but rather prompt them
> for the name so that we can do the update for them.
> Thanks in advance,
> Dee|||Hi Tibor,
We're using Query Analyzer. When we upgrade a customer's database for db
changes, we actually create a script where we have them run it manually via
Query Analyzer.
Thanks!
Dee
"Tibor Karaszi" wrote:
> SQL Server cannot prompt, it is a service running on a server machine. The client app can. What
> app/tool are you using? SQLCMD, OSQL, SSMS, QA, something else?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "bpdee" <bpdee@.discussions.microsoft.com> wrote in message
> news:130AABB7-8F8B-4F47-8A27-119F022F49F3@.microsoft.com...
> > Hi,
> >
> > Is there a way to prompt someone to enter a database name in a script? For
> > example, I have a script where I need to update a table to set a column with
> > a value found in another table in another database. We don't know exactly
> > what the actual db name is of where to find the table and we would like, in
> > the script, to be able to allow the user enter the db name so that we can do
> > the update correctly. We don't want to have the user to manually update
> > script to specify the db name in the update statement, but rather prompt them
> > for the name so that we can do the update for them.
> >
> > Thanks in advance,
> > Dee
>|||I see. QA has no prompting abilities. In fact, none of the tools that comes with SQL Server has
such. SQLCMD (comes with 2005, you can also download it), has a command-line option for specifying
values for variables (defined inside the script file). Check out -v and $(varname). If you need true
prompting, you have to write some app that pops up the prompt and runs what you have in the script
file.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"bpdee" <bpdee@.discussions.microsoft.com> wrote in message
news:E6CD55B3-3550-4B9E-B45B-3BE7A81132BD@.microsoft.com...
> Hi Tibor,
> We're using Query Analyzer. When we upgrade a customer's database for db
> changes, we actually create a script where we have them run it manually via
> Query Analyzer.
> Thanks!
> Dee
> "Tibor Karaszi" wrote:
>> SQL Server cannot prompt, it is a service running on a server machine. The client app can. What
>> app/tool are you using? SQLCMD, OSQL, SSMS, QA, something else?
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> "bpdee" <bpdee@.discussions.microsoft.com> wrote in message
>> news:130AABB7-8F8B-4F47-8A27-119F022F49F3@.microsoft.com...
>> > Hi,
>> >
>> > Is there a way to prompt someone to enter a database name in a script? For
>> > example, I have a script where I need to update a table to set a column with
>> > a value found in another table in another database. We don't know exactly
>> > what the actual db name is of where to find the table and we would like, in
>> > the script, to be able to allow the user enter the db name so that we can do
>> > the update correctly. We don't want to have the user to manually update
>> > script to specify the db name in the update statement, but rather prompt them
>> > for the name so that we can do the update for them.
>> >
>> > Thanks in advance,
>> > Dee
>>
Prompt for a database name
Is there a way to prompt someone to enter a database name in a script? For
example, I have a script where I need to update a table to set a column with
a value found in another table in another database. We don't know exactly
what the actual db name is of where to find the table and we would like, in
the script, to be able to allow the user enter the db name so that we can do
the update correctly. We don't want to have the user to manually update
script to specify the db name in the update statement, but rather prompt the
m
for the name so that we can do the update for them.
Thanks in advance,
DeeSQL Server cannot prompt, it is a service running on a server machine. The c
lient app can. What
app/tool are you using? SQLCMD, OSQL, SSMS, QA, something else?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"bpdee" <bpdee@.discussions.microsoft.com> wrote in message
news:130AABB7-8F8B-4F47-8A27-119F022F49F3@.microsoft.com...
> Hi,
> Is there a way to prompt someone to enter a database name in a script? Fo
r
> example, I have a script where I need to update a table to set a column wi
th
> a value found in another table in another database. We don't know exactly
> what the actual db name is of where to find the table and we would like, i
n
> the script, to be able to allow the user enter the db name so that we can
do
> the update correctly. We don't want to have the user to manually update
> script to specify the db name in the update statement, but rather prompt t
hem
> for the name so that we can do the update for them.
> Thanks in advance,
> Dee|||Hi Tibor,
We're using Query Analyzer. When we upgrade a customer's database for db
changes, we actually create a script where we have them run it manually via
Query Analyzer.
Thanks!
Dee
"Tibor Karaszi" wrote:
> SQL Server cannot prompt, it is a service running on a server machine. The
client app can. What
> app/tool are you using? SQLCMD, OSQL, SSMS, QA, something else?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "bpdee" <bpdee@.discussions.microsoft.com> wrote in message
> news:130AABB7-8F8B-4F47-8A27-119F022F49F3@.microsoft.com...
>|||I see. QA has no prompting abilities. In fact, none of the tools that comes
with SQL Server has
such. SQLCMD (comes with 2005, you can also download it), has a command-line
option for specifying
values for variables (defined inside the script file). Check out -v and $(va
rname). If you need true
prompting, you have to write some app that pops up the prompt and runs what
you have in the script
file.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"bpdee" <bpdee@.discussions.microsoft.com> wrote in message
news:E6CD55B3-3550-4B9E-B45B-3BE7A81132BD@.microsoft.com...[vbcol=seagreen]
> Hi Tibor,
> We're using Query Analyzer. When we upgrade a customer's database for db
> changes, we actually create a script where we have them run it manually vi
a
> Query Analyzer.
> Thanks!
> Dee
> "Tibor Karaszi" wrote:
>|||555
Prompt for a database name
Is there a way to prompt someone to enter a database name in a script? For
example, I have a script where I need to update a table to set a column with
a value found in another table in another database. We don't know exactly
what the actual db name is of where to find the table and we would like, in
the script, to be able to allow the user enter the db name so that we can do
the update correctly. We don't want to have the user to manually update
script to specify the db name in the update statement, but rather prompt them
for the name so that we can do the update for them.
Thanks in advance,
Dee
Hi Tibor,
We're using Query Analyzer. When we upgrade a customer's database for db
changes, we actually create a script where we have them run it manually via
Query Analyzer.
Thanks!
Dee
"Tibor Karaszi" wrote:
> SQL Server cannot prompt, it is a service running on a server machine. The client app can. What
> app/tool are you using? SQLCMD, OSQL, SSMS, QA, something else?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "bpdee" <bpdee@.discussions.microsoft.com> wrote in message
> news:130AABB7-8F8B-4F47-8A27-119F022F49F3@.microsoft.com...
>
Project Server DB
I have a problem here, i want to update the DraftDB in Project Server from an exteral DB (which is not within the Project Server architecture). How can go about doing this?
-the exteral DB would have similiar Tables with the DraftDB such as having a Table call Sponsor
-if i add a new record, edit a record, or delete a record on Table Sponsor on the exteral DB, the update would reflect to the DraftDB in Project Server?
Is there any PSI calls that capable of achieving this? Any ideas? (If you couldn't help, would you have any suggestions of who/where i should turn to?)
Thanks a lot
Michael
This seems like a job for SQL Server Agent. You should be able to do your cross-db queries and inserts through the agent.
http://technet.microsoft.com/en-us/library/ms187061.aspx
Hope this helps,
John
|||Hi,i don't really get it.
Thanks
Michael