Showing posts with label exchange. Show all posts
Showing posts with label exchange. Show all posts

Monday, March 19, 2012

Exchanging message between two servers

If i want to exchange message between two different instances (or) databases in two different servers, then I have to enable the transport protocol which wil be disabled by default in service broker.I read in some article that some registry settings has to be changed.So can someone suggest on the same.

"Connection attempt failed with error: '10061(No connection could be made because the target machine actively refused it.)'."Im getting this error in the initiating database.The message that i sent still exists in thr Transmission queue fo initiating database.

It will be better if someone sends a sample or the steps to follow to communicate between databases in two different servers.So that i can cross check with mine.

here is a pretty good article on writing distributed service broker applications:

http://www.sqlservercentral.com/columnists/sindukuri/2797.asp

Exchanging message between two servers

If i want to exchange message between two different instances (or) databases in two different servers, then I have to enable the transport protocol which wil be disabled by default in service broker.I read in some article that some registry settings has to be changed.So can someone suggest on the same.

"Connection attempt failed with error: '10061(No connection could be made because the target machine actively refused it.)'." Im getting this error in the initiating database.The message that i sent still exists in thr Transmission queue fo initiating database.

It will be better if someone sends a sample or the steps to follow to communicate between databases in two different servers.So that i can cross check with mine.

here is a pretty good article on writing distributed service broker applications:

http://www.sqlservercentral.com/columnists/sindukuri/2797.asp

Exchanging a "?" with NULL value

Hi SQL Champs!

I have a text file source where some data are an question mark (?). Importing this to SQL serever, I want to exchange these (?) with an NULL -value.

How do I do this most easy? Do I need a another tmptable first?

Many thaks

kurlan

While importing this you can use the replace function to replace these values on the fly.

HTH, jens Suessmeyer.

http://www.sqlserver2005.de

|||

Rule!

Thanks

Exchange-SQL server connectivity

I am fairly new to both the technologies.
Scenario:
I have an Exchange server on one machine, with Outlook. I
am looking for a way to get the information from Exchange
servers (mainly public folders) to SQL-server that is
located on a different machine.
My problem is as follows:
a. I need to get data from Exchange to SQL-server, real
time.
I am going through a round-about way of getting this
information. I have created Linked tables in an Access
Database that exports the data to the SQL-server (on the
same machine). It is not real time.
I can not seem to see the Linked tables from Access
when I use DTS.
There has to be a better way to do this.
Please advise.
Deven
for real time, open the outlook to the mailbox, using Outlook VBA NewMessage
write code to the sql server. Just leave the outlook open.
"deven" <anonymous@.discussions.microsoft.com> wrote in message
news:7cfa01c43149$c84894b0$a001280a@.phx.gbl...
> I am fairly new to both the technologies.
> Scenario:
> I have an Exchange server on one machine, with Outlook. I
> am looking for a way to get the information from Exchange
> servers (mainly public folders) to SQL-server that is
> located on a different machine.
> My problem is as follows:
> a. I need to get data from Exchange to SQL-server, real
> time.
> I am going through a round-about way of getting this
> information. I have created Linked tables in an Access
> Database that exports the data to the SQL-server (on the
> same machine). It is not real time.
> I can not seem to see the Linked tables from Access
> when I use DTS.
> There has to be a better way to do this.
> Please advise.
> Deven
>

Exchange-SQL server connectivity

I am fairly new to both the technologies.
Scenario:
I have an Exchange server on one machine, with Outlook. I
am looking for a way to get the information from Exchange
servers (mainly public folders) to SQL-server that is
located on a different machine.
My problem is as follows:
a. I need to get data from Exchange to SQL-server, real
time.
I am going through a round-about way of getting this
information. I have created Linked tables in an Access
Database that exports the data to the SQL-server (on the
same machine). It is not real time.
I can not seem to see the Linked tables from Access
when I use DTS.
There has to be a better way to do this.
Please advise.
Devenfor real time, open the outlook to the mailbox, using Outlook VBA NewMessage
write code to the sql server. Just leave the outlook open.
"deven" <anonymous@.discussions.microsoft.com> wrote in message
news:7cfa01c43149$c84894b0$a001280a@.phx.gbl...
> I am fairly new to both the technologies.
> Scenario:
> I have an Exchange server on one machine, with Outlook. I
> am looking for a way to get the information from Exchange
> servers (mainly public folders) to SQL-server that is
> located on a different machine.
> My problem is as follows:
> a. I need to get data from Exchange to SQL-server, real
> time.
> I am going through a round-about way of getting this
> information. I have created Linked tables in an Access
> Database that exports the data to the SQL-server (on the
> same machine). It is not real time.
> I can not seem to see the Linked tables from Access
> when I use DTS.
> There has to be a better way to do this.
> Please advise.
> Deven
>

Exchange/SQL/VB/Outlook (and possibly a little DDE for good measur

Hi Peoples,
- This is also logged in Exchange server Development Thread -
First let me start by saying I'm not sure if this is in the correct thread -
so a million apologies if it is a little of topic (and for the duplication).
Now...
I have a Windows Server 2003 environment with the following config:
- 2003 Server Enterprise (SP1)
- SQL Server 2000 (SP3)
- Exchange 2003 Enterprise (SP1)
- Outlook 2003 (Office 2003 SP1)
- 3rd Party Help Desk Software with SQL backend (and DDE engine if relevant)
The situation is this - If an email (with a specially formatted Subject
probably) is sent into my environment I would like (either via DDE, SMTP
Event Sink or VBScript) to have the data, subject and sender address of the
email (not taking into consideration any error handling at this stage)
dropped into SQL databases(s). Basically auto-generating a Helpdesk Job with
the emailed data.
I've tried tinkering with DDE - but on the whole have had limited to no
success with it, even at the most simple level. Correct me if I'm wrong, but
it (DDE) is painful, yeah? :)
I'm not clear whether this can be achieved through SMTP Event Sinks (though
I assume it can), or if this is really the most suitable solution.
I'm quietly confident that VBScript running on an XP box with Outlook 2003
with some simple "Rules" in place this could be achieved, but this is ugly
and a bit of a hack solution.
I have the site replicated in a Dev environment so I am in a position where
testing and so forth is feasible for a while.
If someone could shed a little light on the situation, and possibly offer
some direction/ideas that would be fantastic.
Thanking you in advance..
Matt.Hi
You may want to check out SQL Mail and the documentation in books online
regarding
xp_findnextmsg and xp_readmail
John
"Matty B" <MattyB@.discussions.microsoft.com> wrote in message
news:A1C3547E-0C2C-4765-ABD4-81610A9AB047@.microsoft.com...
> Hi Peoples,
> - This is also logged in Exchange server Development Thread -
> First let me start by saying I'm not sure if this is in the correct
> thread -
> so a million apologies if it is a little of topic (and for the
> duplication).
> Now...
> I have a Windows Server 2003 environment with the following config:
> - 2003 Server Enterprise (SP1)
> - SQL Server 2000 (SP3)
> - Exchange 2003 Enterprise (SP1)
> - Outlook 2003 (Office 2003 SP1)
> - 3rd Party Help Desk Software with SQL backend (and DDE engine if
> relevant)
> The situation is this - If an email (with a specially formatted Subject
> probably) is sent into my environment I would like (either via DDE, SMTP
> Event Sink or VBScript) to have the data, subject and sender address of
> the
> email (not taking into consideration any error handling at this stage)
> dropped into SQL databases(s). Basically auto-generating a Helpdesk Job
> with
> the emailed data.
> I've tried tinkering with DDE - but on the whole have had limited to no
> success with it, even at the most simple level. Correct me if I'm wrong,
> but
> it (DDE) is painful, yeah? :)
> I'm not clear whether this can be achieved through SMTP Event Sinks
> (though
> I assume it can), or if this is really the most suitable solution.
> I'm quietly confident that VBScript running on an XP box with Outlook 2003
> with some simple "Rules" in place this could be achieved, but this is ugly
> and a bit of a hack solution.
> I have the site replicated in a Dev environment so I am in a position
> where
> testing and so forth is feasible for a while.
> If someone could shed a little light on the situation, and possibly offer
> some direction/ideas that would be fantastic.
> Thanking you in advance..
> Matt.
>

Exchange Server or NS filtering email addresses?

My Notification Services (NS 2.0 SP1) application works fine, except one big problem:

I am using a built-in SMTP provider, and notifications are delivered ONLY to those subscribers who have email addresses within our company's domain.

That is, all subscribers with addresses like someone@.ourcompany.com always get their notifications, whereas any other email addresses do not work. I tried my gmail.com, aim.com, and optonline.net email addresses, and none of them ever received a notification, not even once.

As soon as I change a particular subscriber's email address from whatever to anybody@.ourcompany.com (whether I do it via SMI or directly in the NS subscribers table, does not matter), it works again.

So, something is filtering emails based on the recipients' addresses.
I do not know for sure whether it's done by NS or by the SMTP server, but the situation is the same regardless of whether I use my local machine's SMTP server or our company's MS Exchange Server 5.5 (I specify it only in the InstanceConfiguration.xml file).

Could someone point me in the right direction as to where to look for what's causing this kind of filtering, please?

Thank you very much!Answering my own question...
Here's what the Exchange Server 5.5 returns in an exception message:
The server rejected one or more recipient addresses. The server response was: 550 Relaying is prohibited.
It's a spam-filtering -related feature.

Exchange Server as a LINKED SERVER

I have successfuly link Exchange to my sql server...what i
am trying to do is fetch all the data of the Exchange and
archive it to an SQL database... my question is it
possible when i got all the information from exchange and
archive it... i can use that archive to restore my
exchange mailboxes or something similar? any suggestions
is highly appreciated...
I don't think so as it's not in the same format needed by Exchange.
You'd want to look at just backing up Exchange. For individual
mailboxes, you could look at brick level backup/restore.
-Sue
On Thu, 9 Sep 2004 01:51:13 -0700, "perry" <kenzai_chuz@.yahoo.com>
wrote:

>I have successfuly link Exchange to my sql server...what i
>am trying to do is fetch all the data of the Exchange and
>archive it to an SQL database... my question is it
>possible when i got all the information from exchange and
>archive it... i can use that archive to restore my
>exchange mailboxes or something similar? any suggestions
>is highly appreciated...
|||Yeah, I think you're right. But my problem is this. If i
use the ExMerge Utility of microsoft, it only permits me
to backup not more that 2gb of file? I am using E2K
server...any suggestions? Because our mails are larger
than 2GB because of the attachments and one more thing...
will ExMerge backup or archive the attachments?
|||No suggestions on the ExMerge issues. You'd probably be
better off posting questions on ExMerge in one of the
Exchange newsgroups. Try:
microsoft.public.exchange2000.admin
-Sue
On Sun, 12 Sep 2004 17:55:14 -0700,
<anonymous@.discussions.microsoft.com> wrote:

>Yeah, I think you're right. But my problem is this. If i
>use the ExMerge Utility of microsoft, it only permits me
>to backup not more that 2gb of file? I am using E2K
>server...any suggestions? Because our mails are larger
>than 2GB because of the attachments and one more thing...
>will ExMerge backup or archive the attachments?

Exchange server

a little problem
I dont know why, but it is impossible to send mail bigger than 4MB
outside my company. We are using MS Exchange 2000. I have set up the
limit for sending and receving for 20MB. It is strange because inside
the company it is OK, mails bigger then 5MB am able to send. But
outside'?Sure you are in the right group ?
But a limit can be declareated for in and outside the company, check the
default setitings of
your organsation settings.
HTH
"Jan West" <jan.west@.cz.liteonpi.com> schrieb im Newsbeitrag
news:#YLicqCtDHA.2492@.TK2MSFTNGP12.phx.gbl...
> a little problem
> I dont know why, but it is impossible to send mail bigger than 4MB
> outside my company. We are using MS Exchange 2000. I have set up the
> limit for sending and receving for 20MB. It is strange because inside
> the company it is OK, mails bigger then 5MB am able to send. But
> outside'?
>|||Thanks and sorry I have just subscribed the right group
Jens napsal(a):
> Sure you are in the right group ?
> But a limit can be declareated for in and outside the company, check the
> default setitings of
> your organsation settings.
> HTH
>
> "Jan West" <jan.west@.cz.liteonpi.com> schrieb im Newsbeitrag
> news:#YLicqCtDHA.2492@.TK2MSFTNGP12.phx.gbl...
>>a little problem
>>I dont know why, but it is impossible to send mail bigger than 4MB
>>outside my company. We are using MS Exchange 2000. I have set up the
>>limit for sending and receving for 20MB. It is strange because inside
>>the company it is OK, mails bigger then 5MB am able to send. But
>>outside'?
>
>

Exchange Reporting Pack

Has anyone been able to successfully install the Exchange reporting pack
without also having Visual Studio .Net installed? I've tried but receive the
following error: "Object Reference not set to an instance of object" and the
install fails.I have the same problem and would really like to find out if it is possible
to install without VS.Net. I've tried installing not only the Exchange
reporting pack but also the Financial which is what I'm really interested in
now.
"Tony G" wrote:
> Has anyone been able to successfully install the Exchange reporting pack
> without also having Visual Studio .Net installed? I've tried but receive the
> following error: "Object Reference not set to an instance of object" and the
> install fails.

Exchange Report Pack

We have a Two Server Deployment: CRM, Reporting Services and IIS on
one Server and our SQL Server 2000 Backend on another Server - which
happends to be a Named Instance.
Because we have a Named Instance as our SQL Server backend......In
order to get Reporting Services to work correctly, we had temporarily
disable the EDW (Environmental Diagnostics Wizard) in CRM using a
registry key change in order for the the 'canned' CRM Reports to work
against our SQL Named Instance (see this link for more info on this
http://blogs.msdn.com/ukcrm/archive/2006/08/17/704229.aspx)
Well... now I am attempting to get the reports in the Exchange Report
Pack for Reporting Servives to work. What I did so far was: Turned off
EDW in the registry on the CRM Server, installed the Exchange Report
Pack, attached the Sample Databases to my CRM named Instance, created
an ODBC connection to the sample Exchange database, and uiploaded the
Reports from the Report Pack and configured them to use the ODBC
connection to the Sample database. Now when I try and run any of the
Exchange Reports, I get this error:
An error has occurred during report processing. (rsProcessingAborted)
Get Online Help
Cannot create a connection to data source 'SSW Exchange Reporter'.
(rsErrorOpeningConnection) Get Online Help
Login failed for user '(null)'. Reason: Not associated with a trusted
SQL Server connection.
Has anyone gotten this to work or can anyone help'?Are you sure that this isn't a simple double-hop problem?
We should ask our Active Directory Wizards what they know about
double-hop and then run this by them if they look at us with a blank
stare
http://blogs.msdn.com/sql_protocols/archive/2006/08/10/694657.aspx
(4) The user's domain account must NOT select "Account is
sensitive and cannot be delegated" in its Active Directory properties
of domain D. Please refer to [1] on how to configure this on Active
Directory machine.
(5) The service account under which the SQL instance is running must
be "trusted for delegation", configured in Active Directory. If the
service is running as "NT AUTHORITY\SYSTEM" or "NT
AUTHORITY\NETWORK SERVICE", the computer must be "trusted for
delegation". Please refer to [1] on how to configure this on Active
Directory Machine. You need to have domain admin privilege to do/verify
so.
Also; I think that we may need to run 'setspn' with the service account
for the sql box in order to allow it to participate in a double-hop
authentication..
Janice wrote:
> We have a Two Server Deployment: CRM, Reporting Services and IIS on
> one Server and our SQL Server 2000 Backend on another Server - which
> happends to be a Named Instance.
> Because we have a Named Instance as our SQL Server backend......In
> order to get Reporting Services to work correctly, we had temporarily
> disable the EDW (Environmental Diagnostics Wizard) in CRM using a
> registry key change in order for the the 'canned' CRM Reports to work
> against our SQL Named Instance (see this link for more info on this
> http://blogs.msdn.com/ukcrm/archive/2006/08/17/704229.aspx)
> Well... now I am attempting to get the reports in the Exchange Report
> Pack for Reporting Servives to work. What I did so far was: Turned off
> EDW in the registry on the CRM Server, installed the Exchange Report
> Pack, attached the Sample Databases to my CRM named Instance, created
> an ODBC connection to the sample Exchange database, and uiploaded the
> Reports from the Report Pack and configured them to use the ODBC
> connection to the Sample database. Now when I try and run any of the
> Exchange Reports, I get this error:
> An error has occurred during report processing. (rsProcessingAborted)
> Get Online Help
> Cannot create a connection to data source 'SSW Exchange Reporter'.
> (rsErrorOpeningConnection) Get Online Help
> Login failed for user '(null)'. Reason: Not associated with a trusted
> SQL Server connection.
> Has anyone gotten this to work or can anyone help'?

Exchange Pack for Reporting Services

Has anyone successfully installed the Exchange Pack for Reporting Services?
I've attempted a couple of times and continue to get "Object Reference not
set to an instance of object", which causes the install to rollback.
Does anyone know how to correct this problem?
Thanks.Several others are having the same problem. I haven't found a fix yet.
It seems the version available on SSW's site is different and
time-limited.|||Any updates on this that you know of? I am seeing the same issue.
"bret@.fishbrains.com" wrote:
> Several others are having the same problem. I haven't found a fix yet.
> It seems the version available on SSW's site is different and
> time-limited.
>

Exchange Pack for Reporting Services

Is there any way to get data from a real install of Exchange into the
database for the Exchange Pack for Reporting Services, or is it just to look
at pretty reports that mean nothing to us?
Am I missing something here?
MichaelThe goal of the report packs is to show reports one might write using
reporting services. It is not necessarily to ship solutions that monitor
the specified application. This particular report pack contains a reference
to a tool from SSW for a product they support for extracting data about
exchange. This could be a start. Alternatively, you can use an ETL tool
such as DTS to do so, though I'm sure tools such as SSW Exchange Extraction
Service provide additional analytics.
-Lukasz
This posting is provided "AS IS" with no warranties, and confers no rights.
<michael@.civis.com> wrote in message
news:OUTh16MBFHA.1392@.tk2msftngp13.phx.gbl...
> Is there any way to get data from a real install of Exchange into the
> database for the Exchange Pack for Reporting Services, or is it just to
> look
> at pretty reports that mean nothing to us?
> Am I missing something here?
> Michael
>

Exchange of login for database user

I have a database with 2 users - 'dbo' and 'user1'.

Currently:
=> 'dbo' is tied to login - 'login1'
=> 'user1' is not tied to any login.

I want to change the login tied to the database users to:
=> 'dbo' tied to no login
=> 'user1' tied to 'login1'

I try to use:
sp_change_users_login 'Update_One', 'user1', 'login1'
But it give me an error said 'login1' is already tied to a user.

Then I try to remove the login tied to 'dbo' with this:
sp_change_users_login 'Update_One', 'dbo', ''
Then I get another error said that 'dbo' is a forbidden value for the
login name parameter.

--

Previously, all the while 'dbo' is not tied to any login and 'user1' is
tied to 'login1', but yesterday I restore the DB from the backup file
bring back from customer side, then I saw the login changed to the one
I mention above, I'm not sure whether is the DBA from customer side
change it or what, but is there any way for me to change the login back
to the state I want?

Thanks.

Peter CCHPeter CCH (petercch.wodoy@.gmail.com) writes:
> I have a database with 2 users - 'dbo' and 'user1'.
> Currently:
>=> 'dbo' is tied to login - 'login1'
>=> 'user1' is not tied to any login.
> I want to change the login tied to the database users to:
>=> 'dbo' tied to no login
>=> 'user1' tied to 'login1'

dbo is always tied to a login, since dbo is the database owner. But
you can change database owner with sp_changedbowner. Once you've done
that, you can connect user1 to login1.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||I tried in this sequence:
1. sp_changedbowner 'user1'
2. sp_change_users_login 'Update_One', 'user1', 'login1'

But "2" still give me the same error:
----------
Server: Msg 15063, Level 16, State 1, Procedure sp_change_users_login,
Line 104
The login already has an account under a different user name.
----------

This is the view in database tree in Enterprise Manager when I click on
the user section (Databases > dataBaseName > Users), there's 2 users in
list.

Name Login Name Database Access
-----------------------
user1 Permit
dbo login1 Permit

Previously, for so many times I restore the backup DB obtained from
customer site to my server, it have this view

Name Login Name Database Access
-----------------------
user1 login1 Permit
dbo Permit

But yesterday once I restore it, the login1 is not tied to user1
anymore, instead, it tied to dbo.

Peter CCH|||Peter CCH (petercch.wodoy@.gmail.com) writes:
> I tried in this sequence:
> 1. sp_changedbowner 'user1'
> 2. sp_change_users_login 'Update_One', 'user1', 'login1'
> But "2" still give me the same error:
> ----------
> Server: Msg 15063, Level 16, State 1, Procedure sp_change_users_login,
> Line 104
> The login already has an account under a different user name.
> ----------

Of course. Since login1 owns the database, login1 maps to the user
dbo, and cannot map to the user user1. You need to change to a different
owner, for instance sa.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||You mean change the DB owner to 'sa', then only maps 'login1' to
'user1'?
I don't really understand what you mean.

Like this?
1. sp_changedbowner 'sa'
2. sp_changeuserslogin 'Update_One', 'user1', 'login1'

Please correct me if I'm wrong.

Thanks a lot.

Peter CCH|||Peter CCH (petercch.wodoy@.gmail.com) writes:
> You mean change the DB owner to 'sa', then only maps 'login1' to
> 'user1'?
> I don't really understand what you mean.

Yes. If you want login1 to map to user1 in the database, then someone
else must own the database than login1. The database owner always maps
to dbo.

> Like this?
> 1. sp_changedbowner 'sa'
> 2. sp_changeuserslogin 'Update_One', 'user1', 'login1'

Yes.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||I tried the code, it still give me the same error.
I just notice there's something different for current state and before
the problem exist state:

I expand the SQL Server tree node, Security > Logins
Then I open the properties page of "login1" and go to "Database Access"
tab.

This is what it looks now:

Permit Database User
---------------
(checked) DB1 user1
(checked) DB2 user1
(checked) DB3 dbo

All that 3 database have "public" and "db_owner" role checked.

Before the problem occured, it looks like this:

Permit Database User
---------------
(checked) DB1 user1
(checked) DB2 user1
(checked) DB3 user1

For "DB 3" ... last time "User" column is "user1", but now it had
changed to "dbo".

QUESTION: Is there any way for me to change the "dbo" at column "User"
back to "user1"?

By the way, I login to the SQL Server with "login1".

Thanks.

Peter CCH|||Peter CCH (petercch.wodoy@.gmail.com) writes:
> I tried the code, it still give me the same error.
> I just notice there's something different for current state and before
> the problem exist state:
> I expand the SQL Server tree node, Security > Logins
> Then I open the properties page of "login1" and go to "Database Access"
> tab.
> This is what it looks now:
> Permit Database User
> ---------------
> (checked) DB1 user1
> (checked) DB2 user1
> (checked) DB3 dbo

Thus login1 is still the owner of DB3. Did you run sp_changedbowner in
DB3?

What does sp_helpdb say?

What does DB3..sp_helpuser say when run it in DB3?

> QUESTION: Is there any way for me to change the "dbo" at column "User"
> back to "user1"?

Yes, change the database owner of the database to anyone else by user1.
Then use sp_change_users_login, or simply drop and re-add user.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||OK, got you. Tested and working.

Now "user1" is tied to "login1".
But the user "dbo" still tied to a login, is this a must?
Cause last time the user "dbo" is not tied to any login.

Expanding SQL Server tree node, Database > (database name) > Users

Here is what it looks like now:

Name Login Name Database Access
-----------------------
user1 login1 Permit
dbo sa Permit

Last time, it is shown like below:

Name Login Name Database Access
-----------------------
user1 login1 Permit
dbo Permit

I try to use:
sp_change_users_login 'Update_One', 'dbo', ''
thinking of making the "dbo" have no login tie to it, but I got the
following error message:
================================
Server: Msg 15287, Level 16, State 1, Procedure sp_change_users_login,
Line 39
Terminating this procedure. 'dbo' is a forbidden value for the login
name parameter in this procedure.
================================

QUESTION: Is it possible to make the "dbo" have no login tie to it?

Thanks.

Peter CCH|||Peter CCH (petercch.wodoy@.gmail.com) writes:
> Now "user1" is tied to "login1".
> But the user "dbo" still tied to a login, is this a must?

Yes. A database must be owned by someone.

> Cause last time the user "dbo" is not tied to any login.

You get some funny things going when you move a database from one server
to another, but this is anomaly that should be corrected.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Thanks for the info.
But I'm curious on one thing, since a database must be own by a user,
how come when I try to create a new database, the "dbo" user is not
tied to any login?

I tried create a new database, then expand the tree node and look at
the "Users" section, then I saw this:

Name Login Name Database Access
----------------------
dbo Permit

Above is the "Users" section of a newly created database on my PC, for
the purpose of to confirm whether a user must tied to a login, I just
wondering why the "dbo" is not tied to any login.

Any reason in behind?

Thanks.

Peter CCH|||Peter CCH (petercch.wodoy@.gmail.com) writes:
> But I'm curious on one thing, since a database must be own by a user,
> how come when I try to create a new database, the "dbo" user is not
> tied to any login?
> I tried create a new database, then expand the tree node and look at
> the "Users" section, then I saw this:
> Name Login Name Database Access
> ----------------------
> dbo Permit
> Above is the "Users" section of a newly created database on my PC, for
> the purpose of to confirm whether a user must tied to a login, I just
> wondering why the "dbo" is not tied to any login.

It appears that you only see a login name, if this is an SQL Server
login. So if the database is owned by a Windows login, you don't see
this. The same thing happens if you say "sp_grantdbaccess DOMAIN\user"
to permit access for a windows login, the LoginName column is NULL.

But that is only the trick of the eye. If you would try to add the
Windows user that owns the database, you would be told that is is
already there.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Exchange Linked Server

I'm trying to run a view that calls a table in a linked server (linked to
Exchange on an SBS 03 box)
The linked server shows the correct tables in the Exchange public folders.
The query is;
CREATE VIEW dbo.vw_Exchange_Contacts
AS
SELECT CONVERT(nvarchar(50), [DAV:id]) AS DAVUID, CONVERT(nvarchar(50),
[urn:schemas:Customers:title]) AS Title, CONVERT(nvarchar(50),
[urn:schemas:Customers:sn]) AS Surname,
CONVERT(nvarchar(50), [urn:schemas:Customers:o]) AS Company,
CONVERT(nvarchar(50),
[urn:schemas:Customers:mailingstreet]) AS
Mailing_Street, CONVERT(nvarchar(25), [urn:schemas:Customers:mailingstate])
AS Mailing_State,
CONVERT(nvarchar(25),
[urn:schemas:Customers:mailingpostalcode]) AS Mailing_Postal_Code,
CONVERT(nvarchar(50),
[urn:schemas:Customers:mailingpostaladdress]) AS
Mailing_Postal_Address, CONVERT(nvarchar(50),
[urn:schemas:Customers:mailingcity])
AS Mailing_City, CONVERT(nvarchar(50),
[urn:schemas:Customers:fileas]) AS FileAS, CONVERT(nvarchar(50),
[urn:schemas:Customers:telephoneNumber]) AS Tel,
CONVERT(nvarchar(50), [urn:schemas:Customers:givenName]) AS FirstName
FROM OPENQUERY(Exchange,
'SELECT
"DAV:id","urn:schemas:Customers:title","urn:schema s:Customers:sn","urn:schemas:Customers:o","urn:sch emas:Customers:mailingstreet","urn:schemas:Custome rs:mailingstate","urn:schemas:Customers:mailingpos talcode","urn:schemas:Customers:mailingpostaladdre ss","
urn:schemas:Customers:mailingcity","urn:schemas:Cu stomers:fileas"
,"urn:schemas:Customers:telephoneNumber" ,"urn:schemas:Customers:givenName"
FROM "http://vj-sbs/public/Customers"')
Rowset_2
The problem is that the only field that is returned correctly is the DAV:ID
field; the rest are returned as NULL.
I've run the same sort of view on another SBS 2000 box correctly.
Any thoughts?
I should have added that if there is a better way to achieve the same thing,
i.e. bringing in the contacts from an exchange public folder then I'd also
love to hear about it.
Thanks in advance,
Mike
OnSite Applications.
"Mike" <yada@.yada.com> wrote in message news:42bf610c$1@.quokka.wn.com.au...
> I'm trying to run a view that calls a table in a linked server (linked to
> Exchange on an SBS 03 box)
> The linked server shows the correct tables in the Exchange public folders.
> The query is;
> CREATE VIEW dbo.vw_Exchange_Contacts
> AS
> SELECT CONVERT(nvarchar(50), [DAV:id]) AS DAVUID,
> CONVERT(nvarchar(50), [urn:schemas:Customers:title]) AS Title,
> CONVERT(nvarchar(50),
> [urn:schemas:Customers:sn]) AS Surname,
> CONVERT(nvarchar(50), [urn:schemas:Customers:o]) AS Company,
> CONVERT(nvarchar(50),
> [urn:schemas:Customers:mailingstreet]) AS
> Mailing_Street, CONVERT(nvarchar(25),
> [urn:schemas:Customers:mailingstate]) AS Mailing_State,
> CONVERT(nvarchar(25),
> [urn:schemas:Customers:mailingpostalcode]) AS Mailing_Postal_Code,
> CONVERT(nvarchar(50),
> [urn:schemas:Customers:mailingpostaladdress]) AS
> Mailing_Postal_Address, CONVERT(nvarchar(50),
> [urn:schemas:Customers:mailingcity])
> AS Mailing_City, CONVERT(nvarchar(50),
> [urn:schemas:Customers:fileas]) AS FileAS, CONVERT(nvarchar(50),
> [urn:schemas:Customers:telephoneNumber]) AS Tel,
> CONVERT(nvarchar(50), [urn:schemas:Customers:givenName]) AS FirstName
> FROM OPENQUERY(Exchange,
> 'SELECT
> "DAV:id","urn:schemas:Customers:title","urn:schema s:Customers:sn","urn:schemas:Customers:o","urn:sch emas:Customers:mailingstreet","urn:schemas:Custome rs:mailingstate","urn:schemas:Customers:mailingpos talcode","urn:schemas:Customers:mailingpostaladdre ss"
,"urn:schemas:Customers:mailingcity","urn:schemas: Customers:fileas"
> ,"urn:schemas:Customers:telephoneNumber"
> ,"urn:schemas:Customers:givenName" FROM "http://vj-sbs/public/Customers"')
> Rowset_2
> The problem is that the only field that is returned correctly is the
> DAV:ID field; the rest are returned as NULL.
> I've run the same sort of view on another SBS 2000 box correctly.
> Any thoughts?
>

Exchange Linked Server

I'm trying to run a view that calls a table in a linked server (linked to
Exchange on an SBS 03 box)
The linked server shows the correct tables in the Exchange public folders.
The query is;
CREATE VIEW dbo.vw_Exchange_Contacts
AS
SELECT CONVERT(nvarchar(50), [DAV:id]) AS DAVUID, CONVERT(nvarchar(5
0),
[urn:schemas:Customers:title]) AS Title, CONVERT(nvarchar(50),
[urn:schemas:Customers:sn]) AS Surname,
CONVERT(nvarchar(50), [urn:schemas:Customers:o]) AS Company,
CONVERT(nvarchar(50),
& #91;urn:schemas:Customers:mailingstreet]
) AS
Mailing_Street, CONVERT(nvarchar(25), [urn:schemas:Customers:mailingstat
e])
AS Mailing_State,
CONVERT(nvarchar(25),
& #91;urn:schemas:Customers:mailingpostalc
ode]) AS Mailing_Postal_Code,
CONVERT(nvarchar(50),
& #91;urn:schemas:Customers:mailingpostala
ddress]) AS
Mailing_Postal_Address, CONVERT(nvarchar(50),
[urn:schemas:Customers:mailingcity])
AS Mailing_City, CONVERT(nvarchar(50),
[urn:schemas:Customers:fileas]) AS FileAS, CONVERT(nvarchar(50),
& #91;urn:schemas:Customers:telephoneNumbe
r]) AS Tel,
CONVERT(nvarchar(50), [urn:schemas:Customers:givenName]) AS FirstName
FROM OPENQUERY(Exchange,
'SELECT
"DAV:id","urn:schemas:Customers:title","urn:schemas:Customers:sn","urn:schem
as:Customers:o","urn:schemas:Customers:mailingstreet","urn:schemas:Customers
:mailingstate","urn:schemas:Customers:mailingpostalcode","urn:schemas:Custom
ers:mailingpostaladdress","
urn:schemas:Customers:mailingcity","urn:schemas:Customers:fileas"
,"urn:schemas:Customers:telephoneNumber" ,"urn:schemas:Customers:givenName"
FROM "http://vj-sbs/public/Customers"')
Rowset_2
The problem is that the only field that is returned correctly is the DAV:ID
field; the rest are returned as NULL.
I've run the same sort of view on another SBS 2000 box correctly.
Any thoughts?I should have added that if there is a better way to achieve the same thing,
i.e. bringing in the contacts from an exchange public folder then I'd also
love to hear about it.
Thanks in advance,
Mike
OnSite Applications.
"Mike" <yada@.yada.com> wrote in message news:42bf610c$1@.quokka.wn.com.au...
> I'm trying to run a view that calls a table in a linked server (linked to
> Exchange on an SBS 03 box)
> The linked server shows the correct tables in the Exchange public folders.
> The query is;
> CREATE VIEW dbo.vw_Exchange_Contacts
> AS
> SELECT CONVERT(nvarchar(50), [DAV:id]) AS DAVUID,
> CONVERT(nvarchar(50), [urn:schemas:Customers:title]) AS Title,
> CONVERT(nvarchar(50),
> [urn:schemas:Customers:sn]) AS Surname,
> CONVERT(nvarchar(50), [urn:schemas:Customers:o]) AS Company,
> CONVERT(nvarchar(50),
> & #91;urn:schemas:Customers:mailingstreet]
) AS
> Mailing_Street, CONVERT(nvarchar(25),
> & #91;urn:schemas:Customers:mailingstate])
AS Mailing_State,
> CONVERT(nvarchar(25),
> & #91;urn:schemas:Customers:mailingpostalc
ode]) AS Mailing_Postal_Code,
> CONVERT(nvarchar(50),
> & #91;urn:schemas:Customers:mailingpostala
ddress]) AS
> Mailing_Postal_Address, CONVERT(nvarchar(50),
> [urn:schemas:Customers:mailingcity])
> AS Mailing_City, CONVERT(nvarchar(50),
> [urn:schemas:Customers:fileas]) AS FileAS, CONVERT(nvarchar(50),
> & #91;urn:schemas:Customers:telephoneNumbe
r]) AS Tel,
> CONVERT(nvarchar(50), [urn:schemas:Customers:givenName]) AS FirstName
> FROM OPENQUERY(Exchange,
> 'SELECT
> "DAV:id","urn:schemas:Customers:title","urn:schemas:Customers:sn","urn:schemas:Cus
tomers:o","urn:schemas:Customers:mailingstreet","urn:schemas:Customers:mailingstate"
,"urn:schemas:Customers:mailingpostalcode"," urn:schemas:Customers:mailingpostaladdre
ss"
,"urn:schemas:Customers:mailingcity","urn:schemas:Customers:fileas"
> ,"urn:schemas:Customers:telephoneNumber"
> ,"urn:schemas:Customers:givenName" FROM "http://vj-sbs/public/Customers"')
> Rowset_2
> The problem is that the only field that is returned correctly is the
> DAV:ID field; the rest are returned as NULL.
> I've run the same sort of view on another SBS 2000 box correctly.
> Any thoughts?
>

Exchange data between databases on two servers?

Dear all

I have tow server on the same intranet. One server has a sql server 2000 database and the other one has SQL server 2005 databse.

The sql 2000 database has a table called employee. When ever a new employee is inserted in the database i would like the same values to be sent to the sql 2005 database. But this cant be done on the application level. It has to be done in the database. The application level can not be changed.

I was thinking a trigger but how to achieve the writing from one database to another. If they were on the same server then it would be easier but because they are on different servers i dont know how to do it.

Has anyone had similar issue before?

Any help is apreciated.

Sincerely

Dan

First make sure 2 server are trusted.

Then link 2 servers using:EXEC sp_addlinkedserver 'server2'.

Quantifier of the table is: [server2].dbo.[db].[table], 'dbo' is the default security schema, use a proper schema name if it's different.

If you used trigger on the table, and the transaction failed, you may want to read this discussion: http://forums.databasejournal.com/showthread.php?t=6701

|||

Thank you for the response.

For everyone else that might come across this post the way to go is using linked servers.

Once you create the linked server (as a security Object in SQL05) you can use 4 part naming. In a normal scenario only 3 part naming is suported. The forth part is the linked servr name.

Please make sure that the DTC service is turned on. Check for proxies and firewals becasue if you have those they will have to be configured properly or othervise it will not work.

Last thing you should check is that you are running the latest version of the MDAC's. I belive at the time i make this post the most current version is 2.8. This will ensure that you have all the latest providers.

Cheers

Dan

Exchange data

Hi,
Is there a wahy to get AD user info in a SP?
I need a list of AD users with name, login name and email.
Thanks.
George.Hi.
I think there is not a function or something like that in SQL2005 that
retrieve all user from you Active Domain Controler (I'm not quiet sure about
that).
You can only get information abour your principals:
SELECT * FROM sys.server_principals
SELECT suser_name()
For advanced solution you must use CLR to get information about Active
Domain users.
Mladen.
"Microsoft" <g2@.bla.cl> wrote in message
news:OzjHniWOHHA.3668@.TK2MSFTNGP02.phx.gbl...
> Hi,
> Is there a wahy to get AD user info in a SP?
> I need a list of AD users with name, login name and email.
> Thanks.
> George.
>|||Microsoft wrote:
> Hi,
> Is there a wahy to get AD user info in a SP?
> I need a list of AD users with name, login name and email.
Getting the name and login name is possible. But since email is a
multivalued field, it can't be done out of the box.
http://articles.techrepublic.com.co...11-5259887.html|||Hi.
EXEC sp_addlinkedserver 'ADSI', 'Active Directory Services 2.5',
'ADSDSOObject', 'adsdatasource'
SELECT *
FROM OPENQUERY (ADSI, 'SELECT givenName, sn FROM ''LDAP://
DC=DOMAIN,DC=COM''
where objectcategory=''User''')
After time of trying to do best thing in my query (and I succed), i found
this one (this is very useful):
http://www.atlantamdf.com/presentat...01_examples.txt
Second solution is, as I say earlier, to do some code in C# and call it from
SQL as assembly (try to modify this as you wish):
string rootQuery = LDAP://DC=DOMAINNAME, DC=COM;
DirectoryEntry root = new DirectoryEntry(rootQuery);
DirectorySearcher dirSearch = new DirectorySearcher(root);
//dirSearch.Filter = String.Format("(cn={0})",
"Administrators");
dirSearch.Filter = String.Format("(objectClass=user)");
SearchResultCollection results = dirSearch.FindAll();
ArrayList userNames = new ArrayList();
if (results != null)
{
foreach (SearchResult result in results)
{
for (int i = 0; i < result.Properties["name"].Count;
i++)
{
string user = (string)result.Properties["name"][i];
Console.WriteLine(user);
}
}
}
Console.ReadLine();
Mladen.
"Microsoft" <g2@.bla.cl> wrote in message
news:OzjHniWOHHA.3668@.TK2MSFTNGP02.phx.gbl...
> Hi,
> Is there a wahy to get AD user info in a SP?
> I need a list of AD users with name, login name and email.
> Thanks.
> George.
>

Exchange data

Hi,
Is there a wahy to get AD user info in a SP?
I need a list of AD users with name, login name and email.
Thanks.
George.
Microsoft wrote:
> Hi,
> Is there a wahy to get AD user info in a SP?
> I need a list of AD users with name, login name and email.
Getting the name and login name is possible. But since email is a
multivalued field, it can't be done out of the box.
http://articles.techrepublic.com.com/5100-6345_11-5259887.html

Exchange data

Hi,
Is there a wahy to get AD user info in a SP?
I need a list of AD users with name, login name and email.
Thanks.
George.Hi.
I think there is not a function or something like that in SQL2005 that
retrieve all user from you Active Domain Controler (I'm not quiet sure about
that).
You can only get information abour your principals:
SELECT * FROM sys.server_principals
SELECT suser_name()
For advanced solution you must use CLR to get information about Active
Domain users.
Mladen.
"Microsoft" <g2@.bla.cl> wrote in message
news:OzjHniWOHHA.3668@.TK2MSFTNGP02.phx.gbl...
> Hi,
> Is there a wahy to get AD user info in a SP?
> I need a list of AD users with name, login name and email.
> Thanks.
> George.
>|||Microsoft wrote:
> Hi,
> Is there a wahy to get AD user info in a SP?
> I need a list of AD users with name, login name and email.
Getting the name and login name is possible. But since email is a
multivalued field, it can't be done out of the box.
http://articles.techrepublic.com.com/5100-6345_11-5259887.html|||Hi.
EXEC sp_addlinkedserver 'ADSI', 'Active Directory Services 2.5',
'ADSDSOObject', 'adsdatasource'
SELECT *
FROM OPENQUERY (ADSI, 'SELECT givenName, sn FROM ''LDAP://
DC=DOMAIN,DC=COM''
where objectcategory=''User''')
After time of trying to do best thing in my query (and I succed), i found
this one (this is very useful):
http://www.atlantamdf.com/presentations/AtlantaMDF_111201_examples.txt
Second solution is, as I say earlier, to do some code in C# and call it from
SQL as assembly (try to modify this as you wish):
string rootQuery = LDAP://DC=DOMAINNAME, DC=COM;
DirectoryEntry root = new DirectoryEntry(rootQuery);
DirectorySearcher dirSearch = new DirectorySearcher(root);
//dirSearch.Filter = String.Format("(cn={0})",
"Administrators");
dirSearch.Filter = String.Format("(objectClass=user)");
SearchResultCollection results = dirSearch.FindAll();
ArrayList userNames = new ArrayList();
if (results != null)
{
foreach (SearchResult result in results)
{
for (int i = 0; i < result.Properties["name"].Count;
i++)
{
string user = (string)result.Properties["name"][i];
Console.WriteLine(user);
}
}
}
Console.ReadLine();
Mladen.
"Microsoft" <g2@.bla.cl> wrote in message
news:OzjHniWOHHA.3668@.TK2MSFTNGP02.phx.gbl...
> Hi,
> Is there a wahy to get AD user info in a SP?
> I need a list of AD users with name, login name and email.
> Thanks.
> George.
>