Showing posts with label running. Show all posts
Showing posts with label running. Show all posts

Sunday, March 25, 2012

Comparing msde with sql server 2005 express.

Hi, we have some applications running on a msde 2000. We are evaluating
to change it to sql express 2005. Do you know if this new version
support more concurrent conections than msde?
Thanks a lot for your help.
*** Sent via Developersdex http://www.codecomments.com ***
Express doesn't have the throttler (which added a wait for each I/O when you had more than 8
concurrently executing queries). So the answer is:
Most probably yes.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"MariaGuzman" <marisa@.devdex.com> wrote in message news:%23ZqFCqJDGHA.1180@.TK2MSFTNGP09.phx.gbl...
> Hi, we have some applications running on a msde 2000. We are evaluating
> to change it to sql express 2005. Do you know if this new version
> support more concurrent conections than msde?
> Thanks a lot for your help.
>
> *** Sent via Developersdex http://www.codecomments.com ***
|||MSDE had an internal governor that scaled back performance based on an
algorithm that involved several pieces. Most people believed there was a
limit to the number of users but that was not true, it just seemed that way.
SQLExpress does not have this governor and does not have any limits on the
number of users. But that said there are other aspects of Express that may
impact performance or the ability to support many connections. Hardware
plays a factor as well. See here for details on what Express supports and
what it does not.
http://www.microsoft.com/sql/edition...s/default.mspx
Andrew J. Kelly SQL MVP
"MariaGuzman" <marisa@.devdex.com> wrote in message
news:%23ZqFCqJDGHA.1180@.TK2MSFTNGP09.phx.gbl...
> Hi, we have some applications running on a msde 2000. We are evaluating
> to change it to sql express 2005. Do you know if this new version
> support more concurrent conections than msde?
> Thanks a lot for your help.
>
> *** Sent via Developersdex http://www.codecomments.com ***

Comparing msde with sql server 2005 express.

Hi, we have some applications running on a msde 2000. We are evaluating
to change it to sql express 2005. Do you know if this new version
support more concurrent conections than msde'
Thanks a lot for your help.
*** Sent via Developersdex http://www.developersdex.com ***Express doesn't have the throttler (which added a wait for each I/O when you had more than 8
concurrently executing queries). So the answer is:
Most probably yes.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"MariaGuzman" <marisa@.devdex.com> wrote in message news:%23ZqFCqJDGHA.1180@.TK2MSFTNGP09.phx.gbl...
> Hi, we have some applications running on a msde 2000. We are evaluating
> to change it to sql express 2005. Do you know if this new version
> support more concurrent conections than msde'
> Thanks a lot for your help.
>
> *** Sent via Developersdex http://www.developersdex.com ***|||MSDE had an internal governor that scaled back performance based on an
algorithm that involved several pieces. Most people believed there was a
limit to the number of users but that was not true, it just seemed that way.
SQLExpress does not have this governor and does not have any limits on the
number of users. But that said there are other aspects of Express that may
impact performance or the ability to support many connections. Hardware
plays a factor as well. See here for details on what Express supports and
what it does not.
http://www.microsoft.com/sql/editions/express/default.mspx
--
Andrew J. Kelly SQL MVP
"MariaGuzman" <marisa@.devdex.com> wrote in message
news:%23ZqFCqJDGHA.1180@.TK2MSFTNGP09.phx.gbl...
> Hi, we have some applications running on a msde 2000. We are evaluating
> to change it to sql express 2005. Do you know if this new version
> support more concurrent conections than msde'
> Thanks a lot for your help.
>
> *** Sent via Developersdex http://www.developersdex.com ***

Comparing msde with sql server 2005 express.

Hi, we have some applications running on a msde 2000. We are evaluating
to change it to sql express 2005. Do you know if this new version
support more concurrent conections than msde'
Thanks a lot for your help.
*** Sent via Developersdex http://www.codecomments.com ***Express doesn't have the throttler (which added a wait for each I/O when you
had more than 8
concurrently executing queries). So the answer is:
Most probably yes.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"MariaGuzman" <marisa@.devdex.com> wrote in message news:%23ZqFCqJDGHA.1180@.TK2MSFTNGP09.phx.
gbl...
> Hi, we have some applications running on a msde 2000. We are evaluating
> to change it to sql express 2005. Do you know if this new version
> support more concurrent conections than msde'
> Thanks a lot for your help.
>
> *** Sent via Developersdex http://www.codecomments.com ***|||MSDE had an internal governor that scaled back performance based on an
algorithm that involved several pieces. Most people believed there was a
limit to the number of users but that was not true, it just seemed that way.
SQLExpress does not have this governor and does not have any limits on the
number of users. But that said there are other aspects of Express that may
impact performance or the ability to support many connections. Hardware
plays a factor as well. See here for details on what Express supports and
what it does not.
http://www.microsoft.com/sql/editio...ss/default.mspx
Andrew J. Kelly SQL MVP
"MariaGuzman" <marisa@.devdex.com> wrote in message
news:%23ZqFCqJDGHA.1180@.TK2MSFTNGP09.phx.gbl...
> Hi, we have some applications running on a msde 2000. We are evaluating
> to change it to sql express 2005. Do you know if this new version
> support more concurrent conections than msde'
> Thanks a lot for your help.
>
> *** Sent via Developersdex http://www.codecomments.com ***sqlsql

Monday, March 19, 2012

compare string to hash value

Ok, here is what i'm trying to do and its driving me nuts.

ok,

1) I have a proc that runs and needs to validate the user prior to running - this proc is called from an hand held device

2) the id and password are being passed as "clear text" but the password is stored in the database table hashed.

Is there anything on the db side that can get the hash value from the password column of the aspnet_membership table and compare it to the password being passed in to this proc? I have suggested several options to the handheld developer but nothing. This has to be done on the database side.

so,

username and password are passed to proc from handheld.

proc needs to validate ther user in the aspnet_membership table

if user id and password are valid execute the stored procedure

is this possible? if so can ANYONE point me to some examples of this being done?

You should post in the SQL Server Compact forum as not all features available in SQL Server Standard and higher are also available in Compact.

Thanks

Laurentiu

|||

This isn't related to SQL compact. I need to do this on the main database since the user is connecting to that to run this stored procedure. This isn't a hand held, SQL compact related question. Its a SQL in general related question.

|||

I see, I assumed this was related to the scenario you posted about earlier, where you mentioned the database as being SQL Server Compact Edition.

If you want to do a hash computation, you can look at using the HashBytes builtin function. It supports SHA1.

Thanks

Laurentiu

Saturday, February 25, 2012

Communication link failure

I am running an SSIS packsge across 2 servers. There at 33 Mil rows being copied over. At 5.6 mil rows I get this

[OLE DB Source [1]] Error: An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available.Source: "Microsoft SQL Native Client"Hresult: 0x80004005Description: "Protocol error in TDS stream". An OLE DB record is available.Source: "Microsoft SQL Native Client"Hresult: 0x80004005Description: "Communication link failure". An OLE DB record is available.Source: "Microsoft SQL Native Client"Hresult: 0x80004005Description: "TCP Provider: An existing connection was forcibly closed by the remote host. ". An OLE DB record is available.Source: "Microsoft SQL Native Client"Hresult: 0x80004005Description: "Communication link failure". An OLE DB record is available.Source: "Microsoft SQL Native Client"Hresult: 0x80004005Description: "TCP Provider: An existing connection was forcibly closed by the remote host. ". An OLE DB record is available.Source: "Microsoft SQL Native Client"Hresult: 0x80004005Description: "Communication link failure". An OLE DB record is available.Source: "Microsoft SQL Native Client"Hresult: 0x80004005Description: "TCP Provider: The specified network name is no longer available. ".

[DTS.Pipeline] Error: The PrimeOutput method on component "OLE DB Source" (1) returned error code 0xC0202009. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.

Is there any known cause of this?

Thanks

Looks like a connection problem and that something, somewhere starts to drop packets or even the connection. You might have to enlist the help of the network guys if such people exist where you're at.

Communication Link Failure

Since we upgraded our server running SQL Server 2000 from Windows 2000 Server to Windows 2003 Server, our clients started getting the following error when we insert a new tape into the tape drive:
ODBC error:[Microsoft][ODBC SQL Server Driver]Communication link failure
Any ideas why inserting a tape would cause an error on client applications? (Happens daily)I have encountered the same ODBC error starting early Jan 04. It happens daily as well and is causing a lot of inconvenience to our clients.
Any ideas what will cause this type of communication link failure ?

Friday, February 24, 2012

Communication link failure

I have a VB6 application running on an SQLServer database. At first, the co
nnection to the database succeeds, a number of sql subsequent statements (bo
th select and update statements) succeed and then from some point on (after
about 80 sql statements), I
get the following error message : -2147467259 : [Microsoft][ODBD SQL
Server Driver]Communication link failure.
This happens on a number of P.C.'s, however not on all of them.
Thanks,
John DesmetThis sounds like it might share a few common features with a posting I made
here on March 5, under the heading:
Re: Occasional "Timeout expired" message - on SP that should take 1 second
What do you think? This syndrome sometimes also generates the
"Communication Link Failure" message.
- ITFred|||Thank you for your reply. At the end of the day (literally), we found out t
hat the Symantic Client Firewall is causing the problem. When it is turned
off, the problem no longer occurs. Now, we have to modify a number of firew
all settings.
Thanks,
John Desmet

Communicating between 3 Service Broker instances

I have a problem.
I am trying to set up Service Broker communication between 3 machines, all running the September CTP release.

I have included the scrip (edited) that I used to setup the 3 machines.
This scrip refers mainly to what was done to server1, with comments to indicate which parts were done on the other servers (commented out the connectionstring property to indicate a change of server)
I also added comments to indicate the copying/deleting of certificates; this script is intended to recreate the three setups if necessary so there is script that checks for the existence of objects before trying to create said objects. Certificates are deleted from the harddisks (so that the backup doesnt give errors), and then, copied to where the other servers can access them.
Also, the code used to generate this script gets the service_broker_guids from each server and sticks them in the right place in the CREATE ROUTE parts.
I apologise for the length of the script, but I didnt want to edit out too much and leave anyone who wanted to or could answer without enough information:

-
-- server1 master database stuff
-

-- conection string: server=server1;Trusted_Connection=true;Application Name=DDUTest
USE [master];
IF (NOT EXISTS(SELECT * FROM sys.symmetric_keys WHERE name = '##MS_DatabaseMasterKey##'))
BEGIN
CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'DDU_MASTER_KEY';
END;
SELECT COUNT (*) FROM sys.symmetric_keys WHERE name = '##MS_DatabaseMasterKey##'


-- Deleted certificate from \\server1\server1_TS_MASTER_PUB.cer if it existed


-- conection string: server=server1;Trusted_Connection=true;Application Name=DDUTest
USE [master];
IF (NOT EXISTS(SELECT * FROM sys.certificates WHERE name = 'server1_TS_MASTER'))
BEGIN
CREATE CERTIFICATE
[server1_TS_MASTER]
AUTHORIZATION DBO
WITH
SUBJECT = 'server1_TRANSPORTSECURITY_MASTER',
START_DATE= '01/01/2005';
END;
BACKUP CERTIFICATE
[server1_TS_MASTER]
TO FILE ='\\server1\server1_TS_MASTER_PUB.cer';
SELECT COUNT(*) from sys.certificates WHERE name = 'server1_TS_MASTER';


-- conection string: server=server1;Trusted_Connection=true;Application Name=DDUTest
IF (NOT EXISTS(SELECT * FROM sys.endpoints WHERE name ='server1_Endpoint'))
BEGIN
CREATE ENDPOINT [server1_Endpoint]
STATE = STARTED
AS TCP
(
LISTENER_PORT = 4022,
LISTENER_IP = ALL
)
FOR SERVICE_BROKER
(
AUTHENTICATION = CERTIFICATE [server1_TS_MASTER],
ENCRYPTION = DISABLED
)
END;
SELECT COUNT(*) FROM sys.endpoints WHERE name = 'server1_Endpoint';

-
-- Copy \\server1\server1_TS_MASTER_PUB.cer to \\server2\server1_TS_MASTER_PUB.cer
-- Copy \\server1\server1_TS_MASTER_PUB.cer to \\server3\server1_TS_MASTER_PUB.cer
-

-- conection string: server=server1;Trusted_Connection=true;Application Name=DDUTest
USE [master];
IF( NOT EXISTS (SELECT * FROM sys.syslogins WHERE name ='DDU_MASTER_TS_LOGIN'))
BEGIN
CREATE LOGIN
[DDU_MASTER_TS_LOGIN]
WITH
PASSWORD = 'DDU_TS_LOGIN';
END;
SELECT COUNT(*) FROM sys.syslogins WHERE name = 'DDU_MASTER_TS_LOGIN';


-- conection string: server=server1;Trusted_Connection=true;Application Name=DDUTest
USE [master];
IF (NOT EXISTS(SELECT* FROM sys.sysusers WHERE name = 'DDU_MASTER_TS_USER'))
BEGIN
CREATE USER
[DDU_MASTER_TS_USER]
FROM LOGIN
[DDU_MASTER_TS_LOGIN]
END;
GRANT CONNECT ON ENDPOINT::[server1_Endpoint] TO [DDU_MASTER_TS_LOGIN];
SELECT COUNT(*) FROM sys.sysusers WHERE name ='DDU_MASTER_TS_USER';

-
-- do similar to the above on server2 and server3
-


-
-- create certificates from other servers on local server, authorized to DDU_MASTER_TS_USER
-

-- conection string: server=server2;Trusted_Connection=true;Application Name=DDUTest
USE [master];
IF (NOT EXISTS(SELECT * FROM sys.certificates WHERE name = 'server1_TS_MASTER_PUB'))
BEGIN
CREATE CERTIFICATE
[server1_TS_MASTER_PUB]
AUTHORIZATION
[DDU_MASTER_TS_USER]
FROM FILE ='\\server2\server1_TS_MASTER_PUB.cer'
END;
SELECT COUNT(*) from sys.certificates WHERE name = 'server1_TS_MASTER_PUB';


-- conection string: server=server3;Trusted_Connection=true;Application Name=DDUTest
USE [master];
IF (NOT EXISTS(SELECT * FROM sys.certificates WHERE name = 'server1_TS_MASTER_PUB'))
BEGIN
CREATE CERTIFICATE
[server1_TS_MASTER_PUB]
AUTHORIZATION
[DDU_MASTER_TS_USER]
FROM FILE ='\\server3\server1_TS_MASTER_PUB.cer'
END;
SELECT COUNT(*) from sys.certificates WHERE name = 'server1_TS_MASTER_PUB';


-- conection string: server=server1;Trusted_Connection=true;Application Name=DDUTest
USE [master];
IF (NOT EXISTS(SELECT * FROM sys.certificates WHERE name = 'server2_TS_MASTER_PUB'))
BEGIN
CREATE CERTIFICATE
[server2_TS_MASTER_PUB]
AUTHORIZATION
[DDU_MASTER_TS_USER]
FROM FILE ='\\server1\server2_TS_MASTER_PUB.cer'
END;
SELECT COUNT(*) from sys.certificates WHERE name = 'server2_TS_MASTER_PUB';


-- conection string: server=server3;Trusted_Connection=true;Application Name=DDUTest
USE [master];
IF (NOT EXISTS(SELECT * FROM sys.certificates WHERE name = 'server2_TS_MASTER_PUB'))
BEGIN
CREATE CERTIFICATE
[server2_TS_MASTER_PUB]
AUTHORIZATION
[DDU_MASTER_TS_USER]
FROM FILE ='\\server3\server2_TS_MASTER_PUB.cer'
END;
SELECT COUNT(*) from sys.certificates WHERE name = 'server2_TS_MASTER_PUB';


-- conection string: server=server1;Trusted_Connection=true;Application Name=DDUTest
USE [master];
IF (NOT EXISTS(SELECT * FROM sys.certificates WHERE name = 'server3_TS_MASTER_PUB'))
BEGIN
CREATE CERTIFICATE
[server3_TS_MASTER_PUB]
AUTHORIZATION
[DDU_MASTER_TS_USER]
FROM FILE ='\\server1\server3_TS_MASTER_PUB.cer'
END;
SELECT COUNT(*) from sys.certificates WHERE name = 'server3_TS_MASTER_PUB';


-- conection string: server=server2;Trusted_Connection=true;Application Name=DDUTest
USE [master];
IF (NOT EXISTS(SELECT * FROM sys.certificates WHERE name = 'server3_TS_MASTER_PUB'))
BEGIN
CREATE CERTIFICATE
[server3_TS_MASTER_PUB]
AUTHORIZATION
[DDU_MASTER_TS_USER]
FROM FILE ='\\server2\server3_TS_MASTER_PUB.cer'
END;
SELECT COUNT(*) from sys.certificates WHERE name = 'server3_TS_MASTER_PUB';


-
-- create database on server1
-

-- conection string: server=server1;Trusted_Connection=true;Application Name=DDUTest
use [master];
IF DB_ID (N'DDU') IS NOT NULL
BEGIN
ALTER DATABASE
[DDU]
SET TRUSTWORTHY ON;
End
ELSE
BEGIN
CREATE DATABASE
[DDU]
ON
(
Name = DDU_dat,
FILENAME = 'D:\Yukon test\data\DDU.mdf'
)
LOG ON
(
NAME = 'DDU_log',
FILENAME ='D:\Yukon test\data\DDU.ldf'
)
WITH TRUSTWORTHY ON;
End;
SELECT COUNT(*) FROM sys.databases WHERE name = 'DDU';


-- conection string: server=server1;Trusted_Connection=true;Application Name=DDUTest
USE [DDU];
IF (NOT EXISTS(SELECT * FROM sys.symmetric_keys WHERE name = '##MS_DatabaseMasterKey##'))
BEGIN
CREATE MASTER KEY
ENCRYPTION BY PASSWORD = 'DDU_LOCAL_KEY';
END;
SELECT COUNT(*) FROM sys.symmetric_keys WHERE name ='##MS_DatabaseMasterKey##';


-
-- Deleted certificate from \\server1\server1_DS_LOCAL_PUB.cer if it existed
-

-- conection string: server=server1;Trusted_Connection=true;Application Name=DDUTest
USE [DDU];
IF (NOT EXISTS(SELECT * FROM sys.certificates WHERE name ='server1_DS_LOCAL'))
BEGIN
CREATE CERTIFICATE
[server1_DS_LOCAL]
WITH
SUBJECT = 'server1_DIALOGSECURITY_LOCAL',
START_DATE = '01/01/2005'
ACTIVE FOR begin_dialog = ON;
END;
BACKUP CERTIFICATE
[server1_DS_LOCAL]
TO FILE ='\\server1\server1_DS_LOCAL_PUB.cer';
SELECT COUNT(*) FROM sys.certificates WHERE name ='server1_DS_LOCAL';


-
-- Copy \\server1\server1_DS_LOCAL_PUB.cer to \\server2\server1_DS_LOCAL_PUB.cer
-- Copy \\server1\server1_DS_LOCAL_PUB.cer to \\server3\server1_DS_LOCAL_PUB.cer
-

-- conection string: server=server1;Trusted_Connection=true;Application Name=DDUTest
USE [DDU];
IF (NOT EXISTS(SELECT * FROM sys.sysusers WHERE name ='DDU_LOCAL_DS_USER'))
BEGIN
CREATE USER
[DDU_LOCAL_DS_USER]
WITHOUT
LOGIN;
END;
SELECT COUNT (*) FROM sys.sysusers WHERE name ='DDU_LOCAL_DS_USER';


-
-- do similar local database creation on server2 and server3
-

-
-- create certificates on local server from other servers, authorized to DDU_LOCAL_DS_USER
-

-- conection string: server=server2;Trusted_Connection=true;Application Name=DDUTest
USE [DDU];
IF (NOT EXISTS(SELECT * FROM sys.certificates WHERE name = 'server1_DS_LOCAL_PUB'))
BEGIN
CREATE CERTIFICATE
[server1_DS_LOCAL_PUB]
AUTHORIZATION
[DDU_LOCAL_DS_USER]
FROM FILE ='\\server2\server1_DS_LOCAL_PUB.cer'
END;
SELECT COUNT(*) from sys.certificates WHERE name = 'server1_DS_LOCAL_PUB';


-- conection string: server=server3;Trusted_Connection=true;Application Name=DDUTest
USE [DDU];
IF (NOT EXISTS(SELECT * FROM sys.certificates WHERE name = 'server1_DS_LOCAL_PUB'))
BEGIN
CREATE CERTIFICATE
[server1_DS_LOCAL_PUB]
AUTHORIZATION
[DDU_LOCAL_DS_USER]
FROM FILE ='\\server3\server1_DS_LOCAL_PUB.cer'
END;
SELECT COUNT(*) from sys.certificates WHERE name = 'server1_DS_LOCAL_PUB';


-- conection string: server=server1;Trusted_Connection=true;Application Name=DDUTest
USE [DDU];
IF (NOT EXISTS(SELECT * FROM sys.certificates WHERE name = 'server2_DS_LOCAL_PUB'))
BEGIN
CREATE CERTIFICATE
[server2_DS_LOCAL_PUB]
AUTHORIZATION
[DDU_LOCAL_DS_USER]
FROM FILE ='\\server1\server2_DS_LOCAL_PUB.cer'
END;
SELECT COUNT(*) from sys.certificates WHERE name = 'server2_DS_LOCAL_PUB';


-- conection string: server=server3;Trusted_Connection=true;Application Name=DDUTest
USE [DDU];
IF (NOT EXISTS(SELECT * FROM sys.certificates WHERE name = 'server2_DS_LOCAL_PUB'))
BEGIN
CREATE CERTIFICATE
[server2_DS_LOCAL_PUB]
AUTHORIZATION
[DDU_LOCAL_DS_USER]
FROM FILE ='\\server3\server2_DS_LOCAL_PUB.cer'
END;
SELECT COUNT(*) from sys.certificates WHERE name = 'server2_DS_LOCAL_PUB';


-- conection string: server=server1;Trusted_Connection=true;Application Name=DDUTest
USE [DDU];
IF (NOT EXISTS(SELECT * FROM sys.certificates WHERE name = 'server3_DS_LOCAL_PUB'))
BEGIN
CREATE CERTIFICATE
[server3_DS_LOCAL_PUB]
AUTHORIZATION
[DDU_LOCAL_DS_USER]
FROM FILE ='\\server1\server3_DS_LOCAL_PUB.cer'
END;
SELECT COUNT(*) from sys.certificates WHERE name = 'server3_DS_LOCAL_PUB';


-- conection string: server=server2;Trusted_Connection=true;Application Name=DDUTest
USE [DDU];
IF (NOT EXISTS(SELECT * FROM sys.certificates WHERE name = 'server3_DS_LOCAL_PUB'))
BEGIN
CREATE CERTIFICATE
[server3_DS_LOCAL_PUB]
AUTHORIZATION
[DDU_LOCAL_DS_USER]
FROM FILE ='\\server2\server3_DS_LOCAL_PUB.cer'
END;
SELECT COUNT(*) from sys.certificates WHERE name = 'server3_DS_LOCAL_PUB';

-
-- create service broker objects on database on server1
-

-- conection string: server=server1;Trusted_Connection=true;Application Name=DDUTest
USE [DDU];
IF (NOT EXISTS(SELECT * FROM sys.service_message_types WHERE name ='DDU_Message'))
BEGIN
CREATE MESSAGE TYPE
[DDU_Message]
VALIDATION = WELL_FORMED_XML
END;
SELECT COUNT(*) FROM sys.service_message_types WHERE name ='DDU_Message';


-- conection string: server=server1;Trusted_Connection=true;Application Name=DDUTest
USE [DDU];
IF (NOT EXISTS(SELECT * FROM sys.service_queues WHERE name ='server1_ujah'))
BEGIN
CREATE QUEUE
[server1_ujah]
WITH
STATUS = ON,
RETENTION = OFF
END;
SELECT COUNT (*) FROM sys.service_queues WHERE name ='server1_ujah';


-- conection string: server=server1;Trusted_Connection=true;Application Name=DDUTest
USE [DDU];
IF (NOT EXISTS(SELECT * FROM sys.service_contracts WHERE name ='DDU_Contract'))
BEGIN
CREATE CONTRACT
[DDU_Contract]
(
DDU_Message
SENT BY ANY
);
END;
SELECT COUNT (*) FROM sys.service_contracts WHERE name ='DDU_Contract';


-- conection string: server=server1;Trusted_Connection=true;Application Name=DDUTest
USE [DDU];
IF (NOT EXISTS(SELECT * FROM sys.services WHERE name ='server1_DDU_Service'))
BEGIN
CREATE SERVICE
[server1_DDU_Service]
ON QUEUE
[server1_ujah]
(
[DDU_Contract]
);
END;
GRANT SEND ON SERVICE::[server1_DDU_Service] TO [DDU_LOCAL_DS_USER] WITH GRANT OPTION;
GRANT SEND ON SERVICE::[server1_DDU_Service] TO [public];
GRANT RECEIVE ON [server1_ujah] TO [DDU_LOCAL_DS_USER] WITH GRANT OPTION;
SELECT COUNT (*) FROM sys.services WHERE name ='server1_DDU_Service';


-- conection string: server=server1;Trusted_Connection=true;Application Name=DDUTest
USE [DDU];
IF (NOT EXISTS(SELECT * FROM sys.routes WHERE name = 'server2_Route'))
BEGIN
CREATE ROUTE
[server2_Route]
WITH
service_name = 'server2_DDU_Service',
broker_instance = 'b3a03ba8-6d21-4c46-91e9-eed4a9629c92',
address = 'tcp://server2:4022'
END;
SELECT COUNT(*) from sys.routes WHERE name = 'server2_Route';


-- conection string: server=server1;Trusted_Connection=true;Application Name=DDUTest
USE [DDU];
IF (NOT EXISTS(SELECT * FROM sys.remote_service_bindings WHERE name = 'server2_RBS'))
BEGIN
CREATE REMOTE SERVICE BINDING
[server2_RBS]
TO SERVICE
'server2_DDU_Service'
WITH
USER = [DDU_LOCAL_DS_USER],
ANONYMOUS = ON;
END;
SELECT COUNT(*) from sys.remote_service_bindings WHERE name = 'server2_RBS';


-- conection string: server=server1;Trusted_Connection=true;Application Name=DDUTest
USE [DDU];
IF (NOT EXISTS(SELECT * FROM sys.routes WHERE name = 'server3_Route'))
BEGIN
CREATE ROUTE
[server3_Route]
WITH
service_name = 'server3_DDU_Service',
broker_instance = '086bf5c1-ea08-4829-9f3d-8eb3408a647c',
address = 'tcp://server3:4022'
END;
SELECT COUNT(*) from sys.routes WHERE name = 'server3_Route';


-- conection string: server=server1;Trusted_Connection=true;Application Name=DDUTest
USE [DDU];
IF (NOT EXISTS(SELECT * FROM sys.remote_service_bindings WHERE name = 'server3_RBS'))
BEGIN
CREATE REMOTE SERVICE BINDING
[server3_RBS]
TO SERVICE
'server3_DDU_Service'
WITH
USER = [DDU_LOCAL_DS_USER],
ANONYMOUS = ON;
END;
SELECT COUNT(*) from sys.remote_service_bindings WHERE name = 'server3_RBS';

-
-- do similar to the above on server2 and server3
-

This script runs without errors, on all three servers.

The issue is this: I can communicate perfectly between server1 and server2.
However, things get wierd when i try and do anything from or to server3.
I can send stuff from server3 to server1; stuff sent from server1 to server3 gets stuck in sys.transmission_queue, with no transmission_status message.

Nothing works between server2 and server3, meaning that messages get stuck in the respective sys.transmission_queues, with no transmission_status messages.

I used Profiler to try and see what was going on. The weird thing is this:
When sending worked (from server1 to server2) I saw the following stuff in the TextData, EventClass and EventSubClass columns (I can include other columns if more data is needed) on server1:

TextData EventClass EventSubClass Broker:Conversation Group 1 - Create STARTED_OUTBOUND Broker:Conversation 11 - Begin Dialog CONVERSING Broker:Conversation 1 - Send Dialog Broker:Message Classify 2 - Remote

I see absolutely no Service Broker activity on server2, and I have all the Service Broker events and columns selected in both traces.

When sending DIDNT work (server3 to server2) this is what I saw:

TextData EventClass EventSubClass STARTED_OUTBOUND Broker:Conversation 11 - Begin Dialog CONVERSING Broker:Conversation 1 - Send Dialog Broker:Message Classify 2 - Remote


Note that missing row for EventSubClass '1 - Create' in the second table.

Here is the script I use to send messages (I change the sender and recipient services, and recipient broker guid as necessary; also, the same thing happened whether i included or omitted the broker guid, which i gather is optional):

use ddu
declare @.handle uniqueidentifier;
declare @.msg xml;

set @.msg = '<MESSAGE><SUBJECT>Message subject</SUBJECT><BODY>Message from server3 </BODY></MESSAGE>';

begin dialog conversation
@.handle
from service
[server3_DDU_Service]
to service
'server2_DDU_Service',
'B3A03BA8-6D21-4C46-91E9-EED4A9629C92'
--'server1_DDU_Service',
--'79D8B0B3-D9CA-4DC6-8AA0-4A6003971397'
on contract
[DDU_Contract]
WITH
ENCRYPTION = off,
RELATED_CONVERSATION_GROUP = '771677D3-1335-DA11-B541-00114325CBB6';

send on conversation
@.handle
Message type
[DDU_Message] (@.msg);

Select @.handle

I realise this is a lot of stuff to look at, but I am stuck.

I found out something interesting the hard way. I have access to 5 servers, three of which are running the September CTP release, two the June CTP release.
When i tried to have all 5 serves talking to each other, nothing worked, i.e., stuff got stuck on sys.transmission_queue, with no transmission_status messages.

When i got the June CTP releases to talk only to each other (wiped the databases and rebuilt with the script), everything worked; messages flowed back and forth. So, could it be that you cant mix and match releases, which is acceptable... or that two is company and 3 plus is a crowd?

If you are able to begin a dialog and send a message successfully from server1 to server2, you should certainly see some broker events in server2's trace. Could you include the full trace on both server1 and server2 during the execution of begin dialog/send?
In the second example, the reason you are probably not seeing the 'Broker:Conversation Group' 1-Create event is perhaps because the conversation group already exists. Check sys.conversation_endpoints.
Also I'm a little confused with your security setup. Particularly:

i) For the adjacent security layer on server1, why are you mapping the identities of both server2 and server3 to a single user on server1? It is cleaner to have separate users for each adjacent SQL Server instance.

ii) Similarly at the dialog security layer, you are mapping the identities of both 'server2_DDU_Service' and 'server3_DDU_Service' to the same database principle 'DDU_LOCAL_DS_USER' instead of creating users for their exported public key certificates.

iii) For the dialog security layer, I hope you do understand that the 'ENCRYPTION = OFF' is overridden when an RSB exists.

iv) If you specify ANONYMOUS = ON in your RSB, the remote target service needs to grant send to public. I think you are doing this already.
Rushi Desai [MSFT]|||

I am not sure what you mean by a full trace so I turned every column/event on except for the user configurable ones. I couldnt save anything for server2: there was nothing to see in the trace window, and profiler threw an exception when I tried to save. I dont know how to attach the trace file, so please find the trace file as XML at the end of this post. FYI the server called GHQMSGWEB2 is server1 and GHQMSGWEB1 is server2.

As for the security setup confusion you had, I guess that reflects the confusion I have. I based my script off the example that Niels posted. In that example, there was one user, created on the master database, for transport security, and another created on the user database (DDU in my case) for dialog security. To make things simpler (I thought) for me, I wanted these two users on each server to be the same, so that I dont have to figure our which userid/password combo to use to connect to a database. I am not too conversant with the requirements of identities, especially at the server level, so if this is a hinderence to getting Service Broker working on all three servers, it can be changed.

From what you said... a RSB is not necessary? Is that right? I can still communicate between servers without defining any?

I would prefer it if I didnt have to bother either with transport or dialog security; I understand the need for security, but I dont need it for my purposes and it seems to complicate things. I asked Niels if that was possible, in a private email (before I found this forum) and was told that both security layers are required for queueing between servers.

For instance, after setting up the two users on a server, who do I have to login as to send or receive a message?
I tried pasting the xml file here. I got an error when i tried to post. Can I email you the trace file?

|||

I am not sure why you are unable to see the service broker trace events in the profiler on server2. Are you connecting to the right instance on server2 (in case there are multiple instances running on that machine). Do you have the right set of permissions?

You could simplify your setup a lot. If you start from scratch and you don't care about security either at the adjacent or dialog level, all you need to do is the following on each server instance:

In master:
1. Create master key for database 'master'.
2. Create certificate for user 'dbo' in database 'master'.
3. Create service broker endpoint using certificate created above.
4. Grant connect on above endpoint to the login 'Public'.

In your database:
1. Create master key.
2. Grant send on target service to user 'public'.
3. Create routes to initiator services on other servers.
4. Create routes to target services on other servers.

Now begin dialog with encryption = off and send.

|||

Rushi, thanks for your answer
I tried what you suggested and have full duplex communication between all three servers.
This is exactly what I wanted!

I still cant see stuff being done on the reception database using sql profiler, but, thats a minor inconvenience for now.

Thanks again.

|||Can you try running the profiler on a different machine (say server1) and connect to server2?|||Not sure what you are asking me to do
I did recheck the traces while sending messages from any one server to the other servers. In all cases I only saw stuff from the sending server, not from the receiving server, until I actually did a receive on the receiving server.

I selected all events except for stuff like locks, security and user configurable events; I was really looking for only Service Broker events, but I left the others in to see if there was any sign of activity. Ileft the columns checked as they came by default.

I did this stuff from a fourth server; the three servers I described above and in previous posts dont have Management Studio installed.

This wont be a concern for me unless things start going wrong with my applicaiton. Is there some setting I need to set to see the stuff that I am assuming the receiving servers should be doing?
Is my assumption right?

Thanks again for you previous answer

Thursday, February 16, 2012

commercial SSL certificates

I am attempting to setup SSL with SQL Server 2005. I do not wish to have the domain account that is running the SQL Server Service be an administrator. What rights/permissions does this account require in order to start sql server with an SSL certificate?

I have tried putting the certificate in the local store but you need to be an admin to see it there. If I put the certificate in SQL Server Service account's personal store, I can't start sql server. "The server could not load the certificate it needs to initiate an SSL connection. It returned the following error: 0x8009030d. Check certificates to make sure they are valid." Is the error I get.

Thank you for your help.

Hi,

Try putting the cert in the SQL Server service account's local store. Upon start, SQL Server will search the machine store and then the user's store. Also, make sure that you chose a certificate through the SQL Server Configuration Manager. If it doesn't work, please provide the complete error message from the error log.

Il-Sung.

|||

Sorry not to be clear, the cert is in the SQL Server service account's local store.

2007-03-13 14:52:25.12 Server Microsoft SQL Server 2005 - 9.00.3042.00 (Intel X86)
Feb 9 2007 22:47:07
Copyright (c) 1988-2005 Microsoft Corporation
Express Edition on Windows NT 5.2 (Build 3790: Service Pack 1)

2007-03-13 14:52:25.12 Server (c) 2005 Microsoft Corporation.
2007-03-13 14:52:25.12 Server All rights reserved.
2007-03-13 14:52:25.12 Server Server process ID is 1304.
2007-03-13 14:52:25.12 Server Authentication mode is MIXED.
2007-03-13 14:52:25.12 Server Logging SQL Server messages in file 'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG'.
2007-03-13 14:52:25.12 Server This instance of SQL Server last reported using a process ID of 2000 at 3/13/2007 2:52:18 PM (local) 3/13/2007 7:52:18 PM (UTC). This is an informational message only; no user action is required.
2007-03-13 14:52:25.12 Server Registry startup parameters:
2007-03-13 14:52:25.12 Server -d c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf
2007-03-13 14:52:25.12 Server -e c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG
2007-03-13 14:52:25.12 Server -l c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf
2007-03-13 14:52:25.13 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2007-03-13 14:52:25.13 Server Detected 1 CPUs. This is an informational message; no user action is required.
2007-03-13 14:52:25.23 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.
2007-03-13 14:52:25.26 Server Database mirroring has been enabled on this instance of SQL Server.
2007-03-13 14:52:25.26 spid5s Starting up database 'master'.
2007-03-13 14:52:25.67 spid5s Recovery is writing a checkpoint in database 'master' (1). This is an informational message only. No user action is required.
2007-03-13 14:52:25.84 spid5s SQL Trace ID 1 was started by login "sa".
2007-03-13 14:52:25.88 spid5s Starting up database 'mssqlsystemresource'.
2007-03-13 14:52:25.93 spid5s The resource database build version is 9.00.3042. This is an informational message only. No user action is required.
2007-03-13 14:52:26.46 spid5s Server name is 'VMLWDAW02APP02\SQLEXPRESS'. This is an informational message only. No user action is required.
2007-03-13 14:52:26.46 spid8s Starting up database 'model'.
2007-03-13 14:52:26.46 spid5s Starting up database 'msdb'.
2007-03-13 14:52:26.88 spid8s Clearing tempdb database.
2007-03-13 14:52:27.40 spid8s Starting up database 'tempdb'.
2007-03-13 14:52:27.70 spid5s Recovery is complete. This is an informational message only. No user action is required.
2007-03-13 14:52:27.70 spid11s The Service Broker protocol transport is disabled or not configured.
2007-03-13 14:52:27.70 spid11s The Database Mirroring protocol transport is disabled or not configured.
2007-03-13 14:52:27.73 spid11s Service Broker manager has started.
2007-03-13 14:52:33.10 Server The server could not load the certificate it needs to initiate an SSL connection. It returned the following error: 0x8009030d. Check certificates to make sure they are valid.
2007-03-13 14:52:33.10 Server Error: 26014, Severity: 16, State: 1.
2007-03-13 14:52:33.10 Server Unable to load user-specified certificate. The server will not accept a connection. You should verify that the certificate is correctly installed. See "Configuring Certificate for Use by SSL" in Books Online.
2007-03-13 14:52:33.10 Server Error: 17182, Severity: 16, State: 1.
2007-03-13 14:52:33.10 Server TDSSNIClient initialization failed with error 0x80092004, status code 0x80.
2007-03-13 14:52:33.10 Server Error: 17182, Severity: 16, State: 1.
2007-03-13 14:52:33.10 Server TDSSNIClient initialization failed with error 0x80092004, status code 0x1.
2007-03-13 14:52:33.10 Server Error: 17826, Severity: 18, State: 3.
2007-03-13 14:52:33.10 Server Could not start the network library because of an internal error in the network library. To determine the cause, review the errors immediately preceding this one in the error log.
2007-03-13 14:52:33.10 Server Error: 17120, Severity: 16, State: 1.
2007-03-13 14:52:33.10 Server SQL Server could not spawn FRunCM thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.

|||

I am also having the same problem. I have followed every documentation source mentioned in these forums, MSDN, KB articles and BOL. Is SQL Server not compatible with commercial certificates, and requires MS Certificate Services? VeriSign support has assured me they have no knowledge of using their certificates with SQL Server. By chance, is there something missing in documentation regarding "master service key"? Or administrator permissions for the service account? Please don't limit responses to just these questions- I'm insterested in getting SSL to work no matter the reason. Just trying to get creative juices flowing.

I am using a VeriSign trial certificate. It has not expired. I have installed the CA certificates to trusted store, and they all verify properly using certutil.exe -verify. They are below, but you can download them from their site.

Root trial certificate:

--BEGIN CERTIFICATE--
MIICmDCCAgECECCol67bggLewTagTia9h3MwDQYJKoZIhvcNAQECBQAwgYwxCzAJ
BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEwMC4GA1UECxMnRm9y
IFRlc3QgUHVycG9zZXMgT25seS4gIE5vIGFzc3VyYW5jZXMuMTIwMAYDVQQDEylW
ZXJpU2lnbiBUcmlhbCBTZWN1cmUgU2VydmVyIFRlc3QgUm9vdCBDQTAeFw0wNTAy
MDkwMDAwMDBaFw0yNTAyMDgyMzU5NTlaMIGMMQswCQYDVQQGEwJVUzEXMBUGA1UE
ChMOVmVyaVNpZ24sIEluYy4xMDAuBgNVBAsTJ0ZvciBUZXN0IFB1cnBvc2VzIE9u
bHkuICBObyBhc3N1cmFuY2VzLjEyMDAGA1UEAxMpVmVyaVNpZ24gVHJpYWwgU2Vj
dXJlIFNlcnZlciBUZXN0IFJvb3QgQ0EwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJ
AoGBAJ8h98U7klaZH5cEn6CSEKmGWVBsTwHIaMAAVqGqCUn7Q9C10sEOIHBznyLy
eSDjMs5M1nC/iAA7KCASf/yHz0AdlU+1IRSijwHTF/2dYSoTTxP2GCmtL1Ga4i7+
zDDo086V7+NiFAGJj+CYey47ue4Xa33o/4YOA9PGL87oqFe7AgMBAAEwDQYJKoZI
hvcNAQECBQADgYEAOq447rP5EDqFEl3vhLhgTbnyaskNYwPvxk+0grnQyDA4sF/q
gK8nFlnvLmAOF3DmfuqW6WSr4zqTYzpwmJlsn48Om/yWirL8GuWRftit2POxTfHS
B8VmR+PZx2k24UgWUZyojDGxJtiHd3tjCdqFgTit4NK429cWOcZrh47xeOI=
--END CERTIFICATE--

Intermediate certificate:

--BEGIN CERTIFICATE--
MIIEnDCCBAWgAwIBAgIQdTN9mrDhIzuuLX3kRpFi1DANBgkqhkiG9w0BAQUFADBf
MQswCQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xNzA1BgNVBAsT
LkNsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkw
HhcNMDUwMTE5MDAwMDAwWhcNMTUwMTE4MjM1OTU5WjCBsDELMAkGA1UEBhMCVVMx
FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz
dCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2UgYXQgaHR0cHM6Ly93d3cu
dmVyaXNpZ24uY29tL3JwYSAoYykwNTEqMCgGA1UEAxMhVmVyaVNpZ24gQ2xhc3Mg
MyBTZWN1cmUgU2VydmVyIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
AQEAlcMhEo5AxQ0BX3ZeZpTZcyxYGSK4yfx6OZAqd3J8HT732FXjr0LLhzAC3Fus
cOa4RLQrNeuT0hcFfstG1lxToDJRnXRkWPkMmgDqXkRJZHL0zRDihQr5NO6ziGap
paRa0A6Yf1gNK1K7hql+LvqySHyN2y1fAXWijQY7i7RhB8m+Ipn4G9G1V2YETTX0
kXGWtZkIJZuXyDrzILHdnpgMSmO3ps6wAc74k2rzDG6fsemEe4GYQeaB3D0s57Rr
4578CBbXs9W5ZhKZfG1xyE2+xw/j+zet1XWHIWuG0EQUWlR5OZZpVsm5Mc2JYVjh
2XYFBa33uQKvp/1HkaIiNFox0QIDAQABo4IBgTCCAX0wEgYDVR0TAQH/BAgwBgEB
/wIBADBEBgNVHSAEPTA7MDkGC2CGSAGG+EUBBxcDMCowKAYIKwYBBQUHAgEWHGh0
dHBzOi8vd3d3LnZlcmlzaWduLmNvbS9ycGEwMQYDVR0fBCowKDAmoCSgIoYgaHR0
cDovL2NybC52ZXJpc2lnbi5jb20vcGNhMy5jcmwwDgYDVR0PAQH/BAQDAgEGMBEG
CWCGSAGG+EIBAQQEAwIBBjApBgNVHREEIjAgpB4wHDEaMBgGA1UEAxMRQ2xhc3Mz
Q0EyMDQ4LTEtNDUwHQYDVR0OBBYEFG/sr6DdiqTv9SoQZy0/VYK81+8lMIGABgNV
HSMEeTB3oWOkYTBfMQswCQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIElu
Yy4xNzA1BgNVBAsTLkNsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlv
biBBdXRob3JpdHmCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQEFBQADgYEA
w34IRl2RNs9n3Nenr6+4IsOLBHTTsWC85v63RBKBWzFzFGNWxnIu0RoDQ1w4ClBK
Tc3athmo9JkNr+P32PF1KGX2av6b9L1S2T/L2hbLpZ4ujmZSeD0m+v6UNohKlV4q
TBnvbvqCPy0D79YoszcYz0KyNCFkR9MgazpM3OYDkAw=
--END CERTIFICATE--

I generated the certificate requests using "certreq.exe -new config.inf", and have tried in both the service account personal store (by loggin in as the service account) and the computer store (MachineKeySet = TRUE in the .inf file). I used certreq.exe -accept and the issued certificate installs, and appears under proper store in each case (certificates mmc snap-in). Below is the inf file contents (commented-out machinekeyset for this particular instance, which was intended for the service account store):

[NewRequest]
Subject = "CN=name1.internaldomain.int;OU=SSL_Test1;O=Some Company Name;L=Eden Prairie;S=Minnesota;C=US"
KeySpec = 1
KeyUsage = 0x20
;MachineKeySet = TRUE


[EnhancedKeyUsageExtension]
OID = 1.3.6.1.5.5.7.3.1

I configured the server certificate using the configuration manager. Upon restart, I get the exact same message in SQL error logs.

2007-07-02 13:08:54.72 Server The server could not load the certificate it needs to initiate an SSL connection. It returned the following error: 0x8009030d. Check certificates to make sure they are valid.
2007-07-02 13:08:54.72 Server Error: 26014, Severity: 16, State: 1.
2007-07-02 13:08:54.72 Server Unable to load user-specified certificate. The server will not accept a connection. You should verify that the certificate is correctly installed. See "Configuring Certificate for Use by SSL" in Books Online.
2007-07-02 13:08:54.74 Server Error: 17182, Severity: 16, State: 1.
2007-07-02 13:08:54.74 Server TDSSNIClient initialization failed with error 0x80092004, status code 0x80.
2007-07-02 13:08:54.74 Server Error: 17182, Severity: 16, State: 1.
2007-07-02 13:08:54.74 Server TDSSNIClient initialization failed with error 0x80092004, status code 0x1.
2007-07-02 13:08:54.74 Server Error: 17826, Severity: 18, State: 3.
2007-07-02 13:08:54.74 Server Could not start the network library because of an internal error in the network library. To determine the cause, review the errors immediately preceding this one in the error log.
2007-07-02 13:08:54.74 Server Error: 17120, Severity: 16, State: 1.
2007-07-02 13:08:54.74 Server SQL Server could not spawn FRunCM thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.

I have also tried to use certutil.exe -verify on the server certificate issued by VeriSign. I get the following error ::

402.203.0: 0x80070057 (WIN32: 87): ..CertCli Version
LoadCert(Cert) returned ASN1 bad tag value met. 0x8009310b (ASN: 267)
CertUtil: -verify command FAILED: 0x8009310b (ASN: 267)
CertUtil: ASN1 bad tag value met.
301.3128.0: 0x8009310b (ASN: 267)

PLEASE PLEASE HELP.

|||

As far as I understand, error code 0x8009030d should be related to an access error to the certificate store, typically caused by using a Windows account that doesn’t have privileges to access the certificate.

Just to double check, make sure you imported the certificate using the same account used for SQL Server Service. Also consider that you need to use a domain or local Windows account instead of system accounts such as local system or network service.

Regarding error 0x8009310b, this one seems to be a parsing error, “ASN.1 bad tag value met”, unfortunately I am not sure about this particular one. I would guess that if Verisign is using this tag and the certificate is valid, it is probably an optional tag that is restricted by default on Windows and probably there is a work around to lift the tag value restriction, but I am not sure about it. I would suggest consulting this one on the Windows (or probably a crypto) forum.

Regarding the question on SSL and the service master key (SMK); the SMK and SSL configuration are completely orthogonal. The SSL certificate will only be used for the communication channel (data in transit protection), while the SMK is used for data at rest protection. Please, if you have any question on the SMK that is not in BOL or in the forums let us know; the information could either be misplaced, be a bug in our documentation, or simply a specific area that we didn’t think about documenting. We will really appreciate your feedback on our documentation.

I hope this information helps.

-Raul Garcia

SDE/T

SQL Server Engine

|||

I have it working!!! Thank you! I hope the following helps someone else out there!

This is meant to outline HOW TO request, install, and configure an SSL certificate without IIS or MS Certficate Services. If you have IIS installed, or Certificate Services - not sure if this How To will help you. There are certificate requirements such as key usage, key spec, and enhanced key usage mentioned in BOL - I'm not sure if IIS/CS request mechanisms address these requirements.

Useful utilities to have before you get started. These are found in three places, Windows Server 2003 Resource Kit, Windows Server 2003 admin pak, and Windows Server 2003 support utilities. All these are available for download, and I highly suggest downloading and installing the most recent versions.

certreq.exe - used to generate a certificate request without IIS or MS Certificate Services.

certutil.exe - used to obtain critical certificate information (hash) and verify installed certificates (i.e., root and intermediate CA certs).

httpcfg.exe - obscure mention in BOL/MSDN2; bind SSL certficate to IPStick out tongueort via http.sys mechanism -- BOL should clearly state this is required, I missed it completely thinking it dealt only with HTTP endpoints. If it applies to HTTP(S) endpoints as well (as I suspect), this should be clearly documented under "CREATE ENDPOINT" topic in BOL.

winhttpcertcfg.exe - used to assign permissions to certificate store private keys if needed.

Let's get started!

Path 1. Service account certificate store.

I. a. Create the policy input file for certreq.exe. Paste the following into a text file, and save as ANSI encoding. Be sure to edit the subject line, and make sure that the CN= part is the fully qualified domain name found in "my computer | properties | name tab"; detailed syntax for certreq.exe is available on TechNet. Note that OU= and beyond is required by commercial CAs, and the syntax is burried in MSDN/Technet online somewhere. Search for "SSL"

[NewRequest]
Subject = "CN=name1.internaldomain.int;OU=SSL_SQL_001;O=Some Company Name;L=City Name;S=Minnesota;C=US"
KeySpec = 1
KeyUsage = 0x20

[EnhancedKeyUsageExtension]
OID = 1.3.6.1.5.5.7.3.1

b. Log in to the server using the service account credentials.

c. From command line, execute with your file names:

certreq.exe -new policyfile outputfile

d. Open outputfile in notepad; copy-paste the exact contents into the CA application form. I understand that some vendors require the request file be emailed to them.

II. Install any root and/or intermediary certificates from the CA, if not already present (most commercial CAs are already there). You can use the certificates mmc snap-in to view and import certificates. These are readily available from the CA web site, and should be saved to a text file (.cer extension is customary). Important: do not add any spaces or extra lines. Paste only the part from --BEGIN CERTIFICATE-- through --END CERTIFICATE-- inclusive (this was not obvious to me, so I hope this helps someone else out there). If you are using VeriSign, at least their trial certificate, I know you will need the "test root ca" and "test intermediate ca" certificates. Note, I installed these root certs into the machine store, logged into the server as an administrator, since SQL service account is not an admin.

III. You will receive a text file or block of text in the body of an email from the CA. Save as text file to the server. Log in as the service account, and execute certreq.exe again:

certreq.exe -accept certfile

This installs the certficate and binds the certificate private key - public key pair. According to the certreq.exe documentation, you must install the certificate using this executable not the certificates mmc snap-in.

IV. Back to BOL documentation, "Configuring Certificate for Use by SSL". Still logged in as the service account, execute certutil.exe to obtain the newly installed certificate's hash (certutil.exe -store -user "MY"); note that you can also obtain the hash using the mmc snap-in. The hash will display with spaces, remove the spaces for the purposes of the next command, httpcfg.exe. You will also need a guid value for the SQL Server instance; personally, I use 'zero' for the default instance and increment by 1 for each named instance. [00000000-0000-0000-0000-000000000000 ... 00000000-0000-0000-0000-000000000001 ... etc.] Note "best practices" may be to truely generate a unique guid for each and every instance, or there may in fact be a real GUID for the instance, however, any GUID seems to work. Finally, you need the IP address and port the instance uses - not any special https port, but the actual IPStick out tongueort used. Execute, substituting your actual values:

httpcfg.exe set ssl /i 10.0.0.1:1433 /h 892ce19ec79e9d1108f2f370a2aac581f7de807b /g "{00000000-0000-0000-0000-000000000000}"

V. Run SQL Server Configuration Manager, per BOL instructions. The Protocols for <instance name> properties | certificate tab; the certificate should appear in the drop down box. The certificate name will be the CN name, unless you assign a friendly name using the mmc snap-in.

VI. Restart the SQL Server service(s). If starts, you are most likely successful. To confirm encrypted connection is working, connect via management studio specifying "encrypt connection" in the options. To double check, query encrypt_option, and auth_scheme from sys.dm_exec_connections. You should get "TRUE" and "KERBEROS" values.

Part 2. Machine Certificate Store.

Same as above, with following changes. This is useful if your SQL instance runs under builtin accounts, or if you prefer to keep the certificate stored service account independent.

Login as an administrator where above mentions "as service account" credentials.

The policy input file should consist of:

[NewRequest]
Subject = "CN=name1.internaldomain.int;OU=SSL_SQL_001;O=Some Company Name;L=City Name;S=Minnesota;C=US"
KeySpec = 1
KeyUsage = 0x20

MachineKeySet = TRUE

[EnhancedKeyUsageExtension]
OID = 1.3.6.1.5.5.7.3.1

To obtain the hash of the accepted/installed certificate, the certutil.exe syntax is slightly different:

certutil.exe -store "MY"

Before restarting the SQL Server service(s), you will need to use winhttpcertcfg.exe to grant permissions to the service account for the certificate's private key in the machine store location. Of course, this assumes that the account is not a system administrator, which probably would not require this step. The complete syntax is available on MSDN2, and this utility is located in the windows resource kit. Replace the -a and -s argument values with appropriate account and subject substring values:

winhttpcertcfg.exe -g -c LOCAL_MACHINE\MY -a "LocalHostName\NetworkService" -s name1

Now restart SQL, and that should do the trick.

***************************

Further helpful documentation from Microsoft... would be (1) how to implement a "selfssl" certificate, and configure clients to trust that certificate. This would be very helpful to those of us that do not have the infrastructure resources for certificate services, and may just want to encrypt limited internal database traffic (like an internal accounting/payroll department). (2) detailed instructions on how to renew the certificate.

Dear Microsoft: It would also be nice to add information regarding IIS and Certificate Services, and offer guidance for Windows 2000. Then, please have a developer "wizard-ize" all this. It certainly couldn't take more than a week to have a utility posted under the feature pack heading- perhaps something that simply wrappers calls to these utilities. Of course, please don't hold up any development effort on SIMILAR TO or OVERLAPS predicates.

***************************

|||

Additional information -- how to get around certficiate FQDN subject being different from the "public persona"... ran into this since the internal domain/FQND is not the same as what we needed to register with the certificate authority. Note thumbprint = hash.

Open the registry editor and add the thumbprint WITHOUT SPACE of the certificate into the following string key “Certificate” under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.x\MSSQLServer\SuperSocketNetLib”

(mssql.x is your instance)

If you don't do this, SQL Server will look in the certificate stores for something matching the FQDN. Since it won't match the FQDN, it won't find anything and won't work.

mpls_mike/MichaelSmith

comments in subscriptions

I have several comments in a subscription. The comments are running together. I put a break in when I format the comments but they still run together.

Has anyone else seen this occur? Does anyone have an idea of what I am doing wrong or a work-a-round?

RS 2005.

How about this one? Is it possible to change the text that is inserted along with the link? Currently the text below is inserted aling with the link to the report:

The report is accessible at the following address:

Commenets on Running Citrix on SQL Server? Anyone doing this?

Our work is currently looking at getting a dual processor machine with 4GB
Ram to run SQL Server 2000 and as a Citrix server?
Is this possible? What gotcha's should I be looking out for?
Any comments appreciated...
Thanks,
Rog
I am pretty sure you need to run them on seperate servers, or else, use a VM
solution such as VMware to run two seperate VM servers on your dual proc 4GB
server.
Sam
"Roger" wrote:

> Our work is currently looking at getting a dual processor machine with 4GB
> Ram to run SQL Server 2000 and as a Citrix server?
> Is this possible? What gotcha's should I be looking out for?
> Any comments appreciated...
>
> Thanks,
> Rog
>
>
|||Well it certainly can be done, I run a SQL server on a Citrix box to host
the Citrix database.
Whether you'd want to do it for performance reasons is another matter, you'd
certainly want to limit the memory SQL will use.
Peter Lawton
"Roger" <davisro@.netins.net> wrote in message
news:uQ1CEizVFHA.3184@.TK2MSFTNGP15.phx.gbl...
> Our work is currently looking at getting a dual processor machine with 4GB
> Ram to run SQL Server 2000 and as a Citrix server?
> Is this possible? What gotcha's should I be looking out for?
> Any comments appreciated...
>
> Thanks,
> Rog
>
|||As the others says, it's possible to run both on the same server. If it's a
good idea or not is hard to say when you don't say anythnig about database
sizes, number of users etc. Keep in mind that SQL server will grab a lot of
memory and so will Citrix. Citrix will allocate memory for every user
connected to the server and depending on what application the client is
running it will also try to grab more and more memory.
Regards
Steen
Roger wrote:
> Our work is currently looking at getting a dual processor machine
> with 4GB Ram to run SQL Server 2000 and as a Citrix server?
> Is this possible? What gotcha's should I be looking out for?
> Any comments appreciated...
>
> Thanks,
> Rog

Commenets on Running Citrix on SQL Server? Anyone doing this?

Our work is currently looking at getting a dual processor machine with 4GB
Ram to run SQL Server 2000 and as a Citrix server?
Is this possible? What gotcha's should I be looking out for?
Any comments appreciated...
Thanks,
RogI am pretty sure you need to run them on seperate servers, or else, use a VM
solution such as VMware to run two seperate VM servers on your dual proc 4GB
server.
Sam
"Roger" wrote:
> Our work is currently looking at getting a dual processor machine with 4GB
> Ram to run SQL Server 2000 and as a Citrix server?
> Is this possible? What gotcha's should I be looking out for?
> Any comments appreciated...
>
> Thanks,
> Rog
>
>|||Well it certainly can be done, I run a SQL server on a Citrix box to host
the Citrix database.
Whether you'd want to do it for performance reasons is another matter, you'd
certainly want to limit the memory SQL will use.
Peter Lawton
"Roger" <davisro@.netins.net> wrote in message
news:uQ1CEizVFHA.3184@.TK2MSFTNGP15.phx.gbl...
> Our work is currently looking at getting a dual processor machine with 4GB
> Ram to run SQL Server 2000 and as a Citrix server?
> Is this possible? What gotcha's should I be looking out for?
> Any comments appreciated...
>
> Thanks,
> Rog
>|||As the others says, it's possible to run both on the same server. If it's a
good idea or not is hard to say when you don't say anythnig about database
sizes, number of users etc. Keep in mind that SQL server will grab a lot of
memory and so will Citrix. Citrix will allocate memory for every user
connected to the server and depending on what application the client is
running it will also try to grab more and more memory.
Regards
Steen
Roger wrote:
> Our work is currently looking at getting a dual processor machine
> with 4GB Ram to run SQL Server 2000 and as a Citrix server?
> Is this possible? What gotcha's should I be looking out for?
> Any comments appreciated...
>
> Thanks,
> Rog

Commenets on Running Citrix on SQL Server? Anyone doing this?

Our work is currently looking at getting a dual processor machine with 4GB
Ram to run SQL Server 2000 and as a Citrix server?
Is this possible? What gotcha's should I be looking out for?
Any comments appreciated...
Thanks,
RogI am pretty sure you need to run them on seperate servers, or else, use a VM
solution such as VMware to run two seperate VM servers on your dual proc 4GB
server.
Sam
"Roger" wrote:

> Our work is currently looking at getting a dual processor machine with 4GB
> Ram to run SQL Server 2000 and as a Citrix server?
> Is this possible? What gotcha's should I be looking out for?
> Any comments appreciated...
>
> Thanks,
> Rog
>
>|||Well it certainly can be done, I run a SQL server on a Citrix box to host
the Citrix database.
Whether you'd want to do it for performance reasons is another matter, you'd
certainly want to limit the memory SQL will use.
Peter Lawton
"Roger" <davisro@.netins.net> wrote in message
news:uQ1CEizVFHA.3184@.TK2MSFTNGP15.phx.gbl...
> Our work is currently looking at getting a dual processor machine with 4GB
> Ram to run SQL Server 2000 and as a Citrix server?
> Is this possible? What gotcha's should I be looking out for?
> Any comments appreciated...
>
> Thanks,
> Rog
>|||As the others says, it's possible to run both on the same server. If it's a
good idea or not is hard to say when you don't say anythnig about database
sizes, number of users etc. Keep in mind that SQL server will grab a lot of
memory and so will Citrix. Citrix will allocate memory for every user
connected to the server and depending on what application the client is
running it will also try to grab more and more memory.
Regards
Steen
Roger wrote:
> Our work is currently looking at getting a dual processor machine
> with 4GB Ram to run SQL Server 2000 and as a Citrix server?
> Is this possible? What gotcha's should I be looking out for?
> Any comments appreciated...
>
> Thanks,
> Rog

Friday, February 10, 2012

COMException when creating SSIS Package / DataSource

I'm running sql2000 and 2005 (RTM) side by side (and vs2003 and 2005 RTM). I want
to create a IntegrationServices project.
When i want to create a DataSource, i can specify the connection, but
when i click on finish the screen is not closed whatever info/name/etc.
i fill in. I can only cancel the dialog box.
When i add a new SSIS package i get this exception:
===================================
Error creating package (Microsoft Visual Studio)
===================================
Exception of type 'System.Runtime.InteropServices.COMException' was
thrown. (Microsoft.DataWarehouse.VsIntegration)

Program Location:
at
Microsoft.DataWarehouse.VsIntegration.Shell.Project.FileProjectHierarchy
.OnHierarchyNodeAppending(IHierarchyNode node, IHierarchyNode
parentNode)
at
Microsoft.DataWarehouse.VsIntegration.Hierarchy.Hierarchy.Add(IHierarchy
Node node, IHierarchyNode parentNode)
at
Microsoft.DataWarehouse.VsIntegration.Shell.Project.FileProjectHierarchy
.AddExistingFileToProject(IFileProjectNode& parentNode, String name,
String fullPath, VSADDITEMOPERATION dwAddItemOperation)
at
Microsoft.DataWarehouse.VsIntegration.Shell.Project.FileProjectHierarchy
.AddNewFileToProject(IFileProjectNode& parentNode, String name, String
sourceFullPath, VSADDITEMOPERATION dwAddItemOperation)
at
Microsoft.DataWarehouse.VsIntegration.Shell.Project.Extensibility.Projec
tItemsExt.AddFromTemplate(String FileName, String Name)
at
Microsoft.DataTransformationServices.Wizards.WizardUtils.AddProjectItemF
romTemplate(WizardInputs wizardInputs, String path, String itemName,
Boolean activateWindow)
at
Microsoft.DataTransformationServices.Wizards.Dts90WizardSaveNewTask.AddP
ackageToProject(Package package, String itemName)
at
Microsoft.DataTransformationServices.Wizards.Dts90WizardSaveNewTask.Crea
teAndAddPackageToProject()
at
Microsoft.DataTransformationServices.Wizards.Dts90WizardSaveNewTask.Exec
ute(WizardInputs wizardInputs)
Any idea what's causing this? ( i reinstalled SQL 2005/SSIS several
times)
Thanks
Marco
Do you use any third-party add-ins for Visual Studio?
Do you use source control integration with Visual Studio,
if yes - which source control provider?|||Yes. i'm using DevExpress CodeRush/Refactor... no source control integration.

Thanks

Marco|||Could you please try removing the DevExpress add-in and see if this fixes the situation? Looking at our code - we are simply notifying environment about new file, and some external code subscribed to this event reports failure, thus cancelling adding a new file. Since it does not happen normally, I suspect the DevExpress add-in causes this.

I'll try to get my hands on the DevExpress CodeRush/Refactor to check what's going on.|||Thanks!

Disabling fixed the problem.. I will send my errorreport also to DevExpress.

Marco