Showing posts with label address. Show all posts
Showing posts with label address. Show all posts

Wednesday, March 28, 2012

merge history ip address

Hi again,

Is there a way I can find out the ip address of the subscriber machine
in a replication? I can't seem to find it in any of the tables under
the distribution database.

Thanks,
Haroldsp_helpmergesubscription should give you the server name, but you'll
probably need to use an external script (or perhaps xp_cmdshell) to
look up the IP address. There might be a better way, though, so you
might want to post in microsoft.public.sqlserver.replication

Simon

Friday, March 23, 2012

Mental Block on SQL query. Joining one to many with one of the many

Sorry for the akward title, not sure how to say this. I have a Person table and a addresses table. Each person may have many address records as shown below:

Person

--

PersonID | AutoNum

fName | varchar

lName | varchar

...etc

Addresses

addressID | AutoNum

personID | int (FK)

address1 | varchar

city | varchar

state | varchar

isPrimary | bit

...etc

What I'm trying to do is select all from Person and the city and state of each person's primary address. A little voice keeps saying subquery...but I can't figure it out. So far I have the SQL below, but if there is no address or no address where isPrimary = 1, it fails to return the person record. I need the person record regardless of if they have a primary address. Does that make sense?

Doesn't return all Person records:

SELECT Person.*, Address.City, Address.State

FROM Person LEFT OUTER JOIN Address

ON Person.PersonID = Address.PersonID
WHERE (Address.isPrimary= 1)
ORDER BY Person.lName, Person.fName

Try:

Code Snippet

SELECT Person.*, Address.City, Address.State, Address.isPrimary

FROM Person LEFT OUTER JOIN Address

ON Person.PersonID = Address.PersonID
AND (Address.isPrimary= 1)
ORDER BY Person.lName, Person.fName

|||Perfect, thank you.

Friday, February 24, 2012

memory portion tied to -g switch of sqlservr

I want to know what this is virtual memory address space is . Where can i
understand more about this particular allocation and why just 256MB is given
for it ?
Just a bit confused
Bunch of good articles here:
http://blogs.msdn.com/slavao/
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Hassan" <hassanboy@.hotmail.com> wrote in message news:eW40%23lP4FHA.2640@.TK2MSFTNGP09.phx.gbl...
>I want to know what this is virtual memory address space is . Where can i understand more about
>this particular allocation and why just 256MB is given for it ?
> Just a bit confused
>

memory portion tied to -g switch of sqlservr

I want to know what this is virtual memory address space is . Where can i
understand more about this particular allocation and why just 256MB is given
for it ?
Just a bit confusedBunch of good articles here:
http://blogs.msdn.com/slavao/
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Hassan" <hassanboy@.hotmail.com> wrote in message news:eW40%23lP4FHA.2640@.TK2MSFTNGP09.phx.g
bl...
>I want to know what this is virtual memory address space is . Where can i u
nderstand more about
>this particular allocation and why just 256MB is given for it ?
> Just a bit confused
>

memory portion tied to -g switch of sqlservr

I want to know what this is virtual memory address space is . Where can i
understand more about this particular allocation and why just 256MB is given
for it ?
Just a bit confusedBunch of good articles here:
http://blogs.msdn.com/slavao/
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Hassan" <hassanboy@.hotmail.com> wrote in message news:eW40%23lP4FHA.2640@.TK2MSFTNGP09.phx.gbl...
>I want to know what this is virtual memory address space is . Where can i understand more about
>this particular allocation and why just 256MB is given for it ?
> Just a bit confused
>