Determining Is A Database Is A Subscriber

Feb 1, 2006

Hi,



can anyone tell me if there is a way to determine with SMO or RMO if a database is a subscriber when using merge replication. If only have the Server and database at this point too!!

I want to provide a small app that creates a merge publication but only if the database isn't a subscriber.

Thanks for your help

Graham

View 3 Replies


ADVERTISEMENT

Determining Database Size

Oct 31, 2001

Is there a system stored procedure that I can execute that will return the actual size of the database you are working with? Any information is appreciated.

View 1 Replies View Related

Determining Database Size

May 9, 2008

Forgive the easy question but I'm afraid it might be also a trick question and I'd like to hear the experts' opinion. I am using SQL Server 2005 Express edition and I know the limitation is 4GB per database. So far none of my users is anywhere near the limit but I have to be prepared for when that day finally comes. As it stands, they use a single database through a program so I have full control over it. There are no fancy backup programs on the system so no fancy recovery models and automatic shrinking can be done - data is only inserted in that database.

My question is simply how can I determine programmatically (I use ADO.Net but it can execute SQL commands just fine) the size of the database as it relates to the limitation? That is, I don't know whether it is the amount of data stored - with or without overhead, or it is simply the size of the *.mdf file (maybe together with the *.ldf file), or whether the 4GB is 4 billion bytes or 2^32 bytes - I just want the same method that the SQL Server is using so that, for example, I can bring up a warning at 90% full and lock out the user at 99% full.

I'd appreciate any insights.

Kamen

View 3 Replies View Related

Determining Database Role Of Querying User

Dec 7, 2007

I know that I can use:

IS_MEMBER('MyRoleName') = 1

to determine if a user is a member of a predetermined role, but how do I ask what the role name of the querying user is instead? Basically I want to do something like:

SELECT * FROM CityTable WHERE City IN (SELECT City FROM CitySecurity WHERE SelectGroup = ROLE_NAME)

I'm doing this because the "CitySecurity" table contains security information from another system that has been imported into SQL Server, where the 'SelectGroup', as part of process, will be named the same as the SQL Server role.

Thanks,
Kayda

View 4 Replies View Related

Determining The Number Of Active Users Logged Into A SQL Server Database

Apr 20, 2006

How does one Determine the number of Active users logged into a SQL Server Database?

I want to use the info to control concurrent licensing for my Application

View 6 Replies View Related

Restoring A Backup Of A Subscriber Database To A New Database

Dec 1, 2006

I have a Subscriber database updated using transactional
replication and want to create a copy for development & testing. The Distribution database is running on the
same 2005 instance as the Subscriber and the Publication database on another
server running SQL Server 2005.



If I use a TSQL script to run the restore, the database is
restored to a usable state but I get the following messages:









Msg 15247, Level 16, State 1, Procedure
sp_MSrepl_check_job_access, Line 112
User does not have permission to perform this action.
The replication agent job [job name] was not removed because
it has a non-standard name; manually remove the job when it is no longer in use.
(I€™ve removed the job name from the message)
RESTORE DATABASE successfully processed 46219 pages in
935.413 seconds (0.404 MB/sec).



It looks like an attempt is being made to restore
replication information too. I note that
the RESTORE statement has a KEEP_REPLICATION options which implies (I would have
thought) that by default the replication information is not be restored.



Incidentally, before implementing replication, backing up
the live database and restoring the backup to a new database took < 7
minutes but running the same process with a Subscriber database backup takes
about 15 minutes.



I€™d be interested to know if anyone has any idea what I€™m
overlooking or doing wrong.



ThanksTim

View 7 Replies View Related

Add Subscriber In Publication Database`

Feb 21, 2006

Hi ...i am new to sql server replication, im using the sql server 2005.

I was configure the replication n publish a database , i wanna add a new subscription, but i am facing the follow error

You have selected the Publisher as a Subscriber and entered a subscription database that is the same as the publishing database. Select another subscription database.

How do i add another subscription database,since in my sql server has only 1 subscriber?

View 4 Replies View Related

Mssql 6.5 Database As Publisher And Subscriber?

Feb 9, 2000

Hello:

I am running an application on mssql 6.5, sp4.

We are working on using a database as a publisher and a remote database as a subscriber for one replication in Canada.

WE havw just been told that another application on a different server(publisher/ distribution) wants to replication to our database as a subscriber.

We also will need(as a publisher/distribution) to replication to a second subscriber database after we completely test the first replication to Canada.

Therefore my questions are:

1) Can a database on a local database -- our database -- on one server be a publisher and subscriber to ther different databases?

2)has any one been involved with replication on a database used both as a publisher and subscriber to different replications requirements?

What are the pitfalls aside from the scheduling conflicts?

3) In terms of database space requirements, how much disk space extra do we need? What guidelines should we use? For each table as an article, assuming we are doing the full table, do we add 100% more space or what?

4) Any other pitfalls we should be aware of?

Thanks.

David Spaisman

View 1 Replies View Related

ERR: Table 'xxx' Does Not Exist In The Subscriber Database.

Feb 12, 2004

I have 1 table to be merge replicated to 2 other servers (DATA5 and DATA5R). Whichever server I push a subscription to first works just fine. The second server get the following error.

Table 'UPDATE_LOG' does not exist in the Subscriber database.
(Source: DATA5R (Data source); Error number: 21078)
---------------------------------------------------------------------------------------------------------------
'. Check sysobjects.
(Source: DATA5R (Data source); Error number: 2501)
---------------------------------------------------------------------------------------------------------------
The process could not deliver the snapshot to the Subscriber.
(Source: Merge Replication Provider (Agent); Error number: -2147201001)
---------------------------------------------------------------------------------------------------------------

I'm not sure why it expect the table to be there already. It doesn't on the first server. Am I missing something. If I create the substription for DATA5R first then it works and DATA5 fails.

What am I missing?

View 2 Replies View Related

Replication Multiple Subscriber Database

Nov 28, 2007

I have a central server (CS1) with database CDB and a branch server (BR1)
Inside the branch server, there are two database DB1 and DB2.
CDB contains data for DB1 and DB2

I made a subscription in the brancserver named BR1:DB1(this will replicate the data from CDB to DB1)
I also made a subscription for DB2 named BR1:DB2(this will replicate the data from CDB to DB2)

Unfortunately, upon starting the synchronization for BR1:DB1, the data replicated into DB1 also contains data for DB2. same happens with the BR1:DB2..

How do I filter the data that will be replicate per database..Example:only data for DB1 coming from CDB should be replicated into DB1 if that specific subscription(BR1:DB1) is synchronized.

Thank you

View 1 Replies View Related

Subscriber Database MUCH Larger Than Publisher

Dec 7, 2006

I have replication setup between our main site and a remote one, and have recently noticed that the database at the remote site's .MDF file is about 3 times as large as the main site's. This doesn't seem to make sense since essentially all of our data is replicated between the two servers. Can anyone suggest why this might be happening and what is safe to do to shrink the remote file?

TIA

Ron L

View 8 Replies View Related

Replication :: Publish Database On Subscriber

Aug 13, 2015

I have database (DB) on the server SQL1. This database (DB) is published on SQL1 server for SQL2 server. So, SQL1 is publisher and SQL2 is subscriber for (DB). Can I publish database (DB) on the server SQL2 for the server SQL3? I would like to implement this scheme of Publication/Subscription:

<o:p></o:p>
SQL1 -> SQL2 ->SQL3..

I know, that it is simpler just to publish DB for SQL2 and SQL3 from SQL1, but, because of network connectivity, I can't do that...

View 3 Replies View Related

New Column Added In Subscriber Database Tables

Jun 24, 2008

Dear All,
i dont know the exact reson why, but i'm guessing the reason for each table had a new guid column is because of transactional replication with update subscribers. actually i dont need this.
can i change this to transactional replication? or i need to drop the column in each table? please guide me

Arnav
Even you learn 1%, Learn it with 100% confidence.

View 6 Replies View Related

Replication :: Subscriber Database Having Missing Index

Jul 22, 2015

At my subscriber database I found some missing Indexes if I update all the missing Indexes on subscriber DB, does it impact at on publisher side?

View 2 Replies View Related

SQL Server 2008 :: Indexes On Subscriber Database With Replication?

Jul 15, 2015

When creating the snapshot I didn't choose the option copy non-clustered indexes. I created some indexes manually on subscriber database. Replication failed later with some issue.

so reinitialized with new snapshot but all the indexes are gone from the subscriber database.

How to keep the indexes without dropping from subscriber database whenever we reinitialized with snapshot

View 5 Replies View Related

Viewing Change To The Subscriber Database While Replication Is Running

Oct 18, 2007

I am doing replication through C#.net after creating the publication in server and subscription in client. But i want to know how can we view the transactions that are happening to the both databases through the C#.net code...If anybody knows please help me....

View 1 Replies View Related

Distributing Subscriber Database On Multiple Machine - Install

Dec 9, 2005

Hi,

View 4 Replies View Related

DB Engine :: Removing Unused NC Indexes From Subscriber Database

Nov 13, 2015

We have transaction replication set up on one of our servers whose replicated DB is used for reporting purpose:

Now, the replicated database "D" of size 350 GB has mainly grown huge as compared to Published DB (200 GB) because of the index sizes at subscribed DB. Therefore:

I have found that Database D has one table of data size 15 GB, with rows 8349533 and index size 28 GB the biggest in the database. And adding have total of 109 Non clustered indexes:

On using SP_blitzindex i have found approx 50 NC indexes unused with below usage:

Reads: 0 Writes:273,243 and total size of indexes being 18 GB

Last User Seek
Last User Scan

Last User Lookup all '0' 
0 singleton lookups; 0 scans/seeks; 0 deletes; 0 updates; 
except for few 3 or 4 where updates are more than 4000.

Is this sufficient enough to delete all the above 49 unused NC indexes? And Can i create Missing index on Subscriber database?

View 2 Replies View Related

SQL 2012 :: Manually Refreshing Subscriber Database In Transactional Replication

Dec 22, 2014

We have a database which is (a subset of tables are) replicated to another via transactional replication. Whilst most changes made at the published database reach the subscriber within a matter of seconds, we have a SQL Agent job which performs a calculation in the published database and then immediately exports data from the subscriber using log shipping. The result is that the calculated changes do not make it through to the exported transaction logs in time.

Is there a way to manually "refresh" the subscriber databases using T-SQL?

View 3 Replies View Related

Replication :: Drop One Of Larger Table Indices On Subscriber Database

Jul 31, 2015

We have a database we are replicating to about 8 SQL Express subscribers from a SQL 2012 SP2 publisher.  The size of the database grew too large for the 10GB license limit for SQL Express and now replication refuses to replicate any of our deletions on the publisher to reduce the size of the database.  I've come up with a few options below.

1) Drop one of the larger table indices on the subscriber database to get below the size restriction. Permit the replication to replicate the deleted records and then rebuild the index.  (I'm not sure how important an index is to this table.  Is it merely performance related?)

2) "Upsize" SQL Express to SQL Standard on the affected boxes.  Allow the deletes to replicate.  Backup the database, downgrade to SQL Express and restore the database back to SQL a new SQL express instance.  This would involve a lot of work on each box. I'd like to avoid it if possible.

View 2 Replies View Related

Determining If A Server Is 32 Bit Vs 64

Jun 11, 2007



Is there a quick and easy way to figure out if a server is 64 bit or 32 bit? I have been looking and cannot figure out an easy way. If there is a script that will figure it out could you please tell me. I am a DBA and manage over 100 servers and need a fast and easy way to figure this out. I need to know this to pick the correct upgrade version.

-Kyle

View 1 Replies View Related

Determining If A Server Is 32 Bit Vs 64

Jun 11, 2007

Is there a quick and easy way to figure out if a server is 64 bit or 32 bit? I have been looking and cannot figure out an easy way. If there is a script that will figure it out could you please tell me. I am a DBA and manage over 100 servers and need a fast and easy way to figure this out.

-Kyle

View 4 Replies View Related

Determining What To Input As Server

Jun 9, 2006

I'm trying to connect to a sql database, but I don't know what myserver is in the following code.Dim strConn As String = "server=myserver;database=Northwind"I can't get the code to link up with my Northwind database.I'm running everything locally if that helps.Thanks!Jon

View 2 Replies View Related

Determining If A Table Exists

May 2, 2000

How do I find out if a temporary table named '##test' exists? I have a stored
procedure that creates this table and if it exists another stored procedure
should do one thing, if it does not exist I want the SP to do something else.
Any help as to how I can determine if this table exists at the current time
would be greatly appreciated.

Thanks in advance for you help,
Jon

View 6 Replies View Related

Determining DB Type/Character Set

Feb 26, 2002

Can anyone tell me what command/utility i can use to determine the database type (non-unicode or unicode) as well as the supported character set?
Any help will be greatly appreciated. Thanks a lot!!

View 1 Replies View Related

Determining Last DBCC Procedure

Mar 7, 1999

Hi,
Is it possible to determine when last a DBCC statement was run on a database & what that DBCC was.

TIA
Shaun Tinline
Database Administrator
Alcatel Altech Telecoms

View 1 Replies View Related

Determining Unique Children

Nov 17, 2005

Hi,

I need to be able to identify if a parent has the same child names as another parent.

Have a look at my data (in pic)

Can you think of a SELECT that will count for each parent, the number of other parents including themselves with all the same children's names?

So you would get something like:

Bob | 2
Bill | 1
Glen | 2

thanks,
david.

View 7 Replies View Related

Determining A Range Of Values

Mar 29, 2012

suppose you have a large table with 2 columns

create table tick
(
ID bigint identity (1,1) primary key not null
, price money not null
)

and I want to know 3 things

Starting with ID = 1 through ID = (last)
give me the low and high price (that satisfies the below WHERE clause), and the last ID
WHERE high price - low price = 0.10
and the last ID (last) is the minimum ID to satisfy: high price - low price = 0.10

So the last ID will coincide with the record containing either the low or high price, the problem is you don't know which record in that range has the corresponding high/low price, it could be the first record or the 10,000th record.

I am thinking I need to create two summary tables, maybe calculate the min(ID) that goes down 0.01 then the min(ID) that goes down 0.02, etc...
Then calculate the min(ID) that goes up 0.01 then up 0.02, etc..finally join against these two summary tables to figure out which combination of downSummary and upSummary have a difference of 0.10.

View 2 Replies View Related

Determining If SQL Statement Is A Query

Jul 27, 2007

Hi,

I have a C# server application which clients can send arbitrary SQL statements to. These can be absolutely anything - creating tables/views, selecting from tables/views, inserts, updates, deletes, you name it.

There are two return parameters from the server method which executes the SQL - a results set containing the data, and a count of the rows that were updated - (either one or the other should be populated depending on the type of command sent to it). To deal with this, what I planned on doing was (pseudocode follows..):

try
{
reader = OpenReaderCursor(statement)
}
catch
{
updatedCount = ExecuteNonQueryCommand(statement)
}

Unfortunately this doesn't really work, as OpenReaderCursor is able to execute Non Queries (eg. UPDATE/INSERT/DELETEs etc) but doesn't give me a row count, and trying the other way round, ExecuteNonQueryCommand is happy to execute SELECT statements, but I can't then of course return a results set as I don't have access to it.

My question then, if you will excuse the waffle above, is "Is there a simple way of determining if a string containing an SQL statement is a query?" - or will I have to come up with some way of dealing with this in my application code?

Please don't slate the design (ideally I would have two methods on the server, one for queries which returns results and the other for nonqueries which returns an updatecount) but there's nothing I can do, this is how it must be done (the interface was defined long long ago)

Thanks for your time, all ideas appreciated

Jim

View 1 Replies View Related

Determining What Columns Are All Null

Jul 6, 2006

Does anyone have a suggestion for how to efficiently determine what columns in a table are NULL for all rows? - Shean

View 5 Replies View Related

Determining Last Entry ID In Table

Nov 17, 2006

Not sure if this is the right place to post this but hopefully someone can help me. I would like to determine what the last automatically incremented ID is in a table I need to return it as a variable to a VB.NET program but I'm not sure what the SELECT statement would look like for this. Any help would be greatly appreciated.

View 4 Replies View Related

Determining Which Version Of SQL Is Running

Apr 12, 2007

hi peter... i have a question about, how i can see if my sql server is the version 2005 sp2 and, what is the diference with server and server agent... i've checked the updates and the machine says i have up to date... but i dont know witch is.

thank you for your help

View 1 Replies View Related

Determining The OS Version That SQL Is Running On

Apr 30, 2007

I am writing a client application that offers an UI that allows an administrator to remotely add/delete/update user accounts accross many different SQL Servers running on XP and up.



When the operating system is W2K3 or higher I want to take advantage of the "check_expiration, check_policy, must_change' arguments to create login and exclude those features when the host OS does not support them.



Is there an easy way to determine if those arguments are supported?



Thanks

Mark

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved