When using query analyzer i need to know what database the scripts is
running on and store that name into a variable. is there a global database
name variable? I know about @.@.servername but no @.@.databasename :(DB_NAME()
David Portas
SQL Server MVP
--
"eg" <emil@.dbworks.com> wrote in message
news:u$CXluRnFHA.3960@.TK2MSFTNGP12.phx.gbl...
> When using query analyzer i need to know what database the scripts is
> running on and store that name into a variable. is there a global database
> name variable? I know about @.@.servername but no @.@.databasename :(
>|||select db_name()
"eg" wrote:
> When using query analyzer i need to know what database the scripts is
> running on and store that name into a variable. is there a global database
> name variable? I know about @.@.servername but no @.@.databasename :(
>
>|||ty
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:roqdnX7ixsVdlGTfRVn-1A@.giganews.com...
> DB_NAME()
> --
> David Portas
> SQL Server MVP
> --
> "eg" <emil@.dbworks.com> wrote in message
> news:u$CXluRnFHA.3960@.TK2MSFTNGP12.phx.gbl...
>
Showing posts with label scripts. Show all posts
Showing posts with label scripts. Show all posts
Thursday, March 29, 2012
Wednesday, March 7, 2012
Database maintenance on replicated database
Hi,
I have transactional replication set up on a DB and run database maintenance scripts (index defrag, update stats, etc) on this DB daily.
Will the maintenance job/scripts also be propagated to the replica (subscriber) causing these maintenance operations to be performed on the replica OR do I need to create separate jobs on the replica DB (subscriber) also? I'm guessing the latter but wanted to verify to make sure I wasn't missing something. Thanks!
You need to run separate job on the replica DB. The only operations that are replicated are: DML (insert/update/delete) and certain DDL (ALTER table/proc/function).
Peng
|||Thanks Peng.
Labels:
database,
defrag,
index,
maintenance,
microsoft,
mysql,
oracle,
replicated,
replication,
run,
scripts,
server,
sql,
stats,
transactional,
update
Subscribe to:
Posts (Atom)