Showing posts with label installed. Show all posts
Showing posts with label installed. Show all posts

Wednesday, March 28, 2012

Proplem with SQL 2005

Hi
I have a problem with SQL 2005.

I had installed in my PC SQL Express and it with working fine with my Windows XP SP2 and VWD untill one day with I tried to lunch ASP.NET Configuration and clicked on Security , and then it showed me message " Unable to connect to SQL Server database." , i don't know what happend!!!
Here's link to screen shot about the message...
http://www.unlimitednetwork.net/data/screen_shot_1.JPG

After 2 days i Installed SQL 2005 Standerd , I said my be there's something wrong with Express version. After installed SQL Standerd still the same problem.

When i lunch Microsoft SQL Server Mangement Studio it's working fine.

And when I go to my Computer and Right Click and chose Mange it showed me that SQL 2005 working fine beside SQL 2000, but still show me message that it's not working, i don't know why!!!
Here's link to screen shot about the message...
http://www.unlimitednetwork.net/data/screen_shot_2.JPG

It's big and serious problem for me, i can't do anything, I have web site i have to finsh it soon.!!

So do you know where it can be the problem and how to solve it?!!...

another screen shot about my Computer Management to show my SQL how it's connect normaly..
http://www.unlimitednetwork.net/data/screen_shot_3.JPG

PS..
My Computer Name is AHMED
My SQL Server 2005 Name is NADA2005
My SQL Server 2000 Name is NADA or local ( it's working with both )

Thanks alot

Ahmed

Make sure that the instancename is specified in the connectionstring for the ASP application. if SQL Server Browser Server is no longer running start it (to let is redirect the application to the appropiate port, as I assume, Port 1433 is already occupied by the 2k instance) or specify the port number after the instancename with the syntax as:

ServerName\InstanceName,portnumber

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

Wednesday, March 21, 2012

Promelm with SQL 2005

Hi
I have a problem with SQL 2005.

I had installed in my PC SQL Express and it with working fine with my Windows XP SP2 and VWD untill one day with I tried to lunch ASP.NET Configuration and clicked on Security , and then it showed me message " Unable to connect to SQL Server database." , i don't know what happend!!!
Here's link to screen shot about the message...
http://www.unlimitednetwork.net/data/screen_shot_1.JPG

After 2 days i Installed SQL 2005 Standerd , I said my be there's something wrong with Express version. After installed SQL Standerd still the same problem.

When i lunch Microsoft SQL Server Mangement Studio it's working fine.

And when I go to my Computer and Right Click and chose Mange it showed me that SQL 2005 working fine beside SQL 2000, but still show me message that it's not working, i don't know why!!!
Here's link to screen shot about the message...
http://www.unlimitednetwork.net/data/screen_shot_2.JPG

It's big and serious problem for me, i can't do anything, I have web site i have to finsh it soon.!!

So do you know where it can be the problem and how to solve it?!!...

another screen shot about my Computer Management to show my SQL how it's connect normaly..
http://www.unlimitednetwork.net/data/screen_shot_3.JPG

PS..
My Computer Name is AHMED
My SQL Server 2005 Name is NADA2005
My SQL Server 2000 Name is NADA or local ( it's working with both )

Thanks alot

Ahmed

Make sure that the instancename is specified in the connectionstring for the ASP application. if SQL Server Browser Server is no longer running start it (to let is redirect the application to the appropiate port, as I assume, Port 1433 is already occupied by the 2k instance) or specify the port number after the instancename with the syntax as:

ServerName\InstanceName,portnumber

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

sql

prolem with "create login from asymmetric key"

Greetings...

I'm trying to create assembly with "PERMISSION_SET = UNSAFE".
For that I've signed assembly's .dll and installed root certificate to “Trusted Root Certificate Authority.”: http://www.sqljunkies.com/WebLog/ktegels/articles/SigningSQLCLRAssemblies.aspx
now I'm trying to create login from asymmetric key:

USE master
GO

CREATE ASYMMETRIC KEY SQLCLRTestKey
FROM EXECUTABLE FILE = 'C:\Documents and Settings\All Users\Documents\hunter\StoredProcedures.dll'
CREATE LOGIN SQLCLRTestLogin
FROM ASYMMETRIC KEY SQLCLRTestKey

but I'm receiving error: "Cannot find the asymmetric key 'SQLCLRTestKey', because it does not exist or you do not have permission."

What's wrong?

Best regards...

I recommend you take a look at a sample like the AdventureWorks CLR sample which demostrates all the steps necessary in signing, registering the asymmetric key, registering the login, and finally registering the unsafe assembly. You can find the Yukon SP2 samples here: http://www.microsoft.com/downloads/details.aspx?familyid=e719ecf7-9f46-4312-af89-6ad8702e4e6e&displaylang=en. Once you've installed the code samples, by default you will find the AdventureWorks CLR sample here: SystemDrive:\Program Files\Microsoft SQL Server\90\Samples\Engine\Programmability\CLR\AdventureWorks. The readme file for the sample will walk you through each step of the process. You don't need to install any root certificates to use asymmetic keys.

--Bonnie [MSFT]

|||? I'm not a big fan of those instructions. A much, much easier method: First, read this: http://www.sommarskog.se/grantperm.html#certandbulkcopy Follow the instructions therein for setting up a certificate, creating a login using the certificate, etc. But instead of granting bulk copy permissions to the login, grant EXTERNAL ACCESS ASSEMBLY permissions. Backup the certificate and restore it into the database in which you want to create the assembly. Create and catalog the assembly -- no strong name needed (unless you want to use one). Sign your assembly with the same certificate you created in the master DB, and you're good to go. -- Adam MachanicPro SQL Server 2005, available nowhttp://www..apress.com/book/bookDisplay.html?bID=457-- ""_hunter"@.discussions..microsoft.com" <"=?UTF-8?B?X2h1bnRlcg==?="@.discussions.microsoft.com> wrote in message news:e74340fa-4ba8-406e-94f4-51698ba38574@.discussions.microsoft.com...Greetings...I'm trying to create assembly with "PERMISSION_SET = UNSAFE".For that I've signed assembly's .dll and installed root certificate to “Trusted Root Certificate Authority.”: http://www.sqljunkies.com/WebLog/ktegels/articles/SigningSQLCLRAssemblies..aspxnow I'm trying to create login from asymmetric key:USE master GO CREATE ASYMMETRIC KEY SQLCLRTestKeyFROM EXECUTABLE FILE = 'C:\Documents and Settings\All Users\Documents\hunter\StoredProcedures.dll'CREATE LOGIN SQLCLRTestLoginFROM ASYMMETRIC KEY SQLCLRTestKeybut I'm receiving error: "Cannot find the asymmetric key 'SQLCLRTestKey', because it does not exist or you do not have permission."What's wrong?Best regards...|||

BonnieFe, can You be more specific? Ideally just piont on my mistakes...

I've created key by "sn -k SampleKey.snk"

Then in my project's properties i've selected it in Signing->Sign the assembly->Choose a strong name &key file:-><Browse...>

Build->Rebuild Solution

Then in "SQL Server Management Studio":

EXEC('CREATE ASYMMETRIC KEY UnsafeSample_Key FROM EXECUTABLE FILE = ''C:\\StoredProcedures.dll'';');

CREATE LOGIN UnsafeSample_Login FROM ASYMMETRIC KEY UnsafeSample_Key
and I'm reciving the same error: "Cannot find the asymmetric key 'UnsafeSample_Key', because it does not exist or you do not have permission."

|||

NNTP User, I'm trying such:

USE master

GO

CREATE CERTIFICATE UnsafeSample_Certificate

ENCRYPTION BY PASSWORD = 'All you need is love'

WITH SUBJECT = 'Certificate for example_sp',

START_DATE = '20070201', EXPIRY_DATE = '21000101'

GO

BACKUP CERTIFICATE UnsafeSample_Certificate TO FILE = 'C:\Documents and Settings\All Users\Documents\hunter\SampleCert.cer'

WITH PRIVATE KEY (FILE = 'C:\Documents and Settings\All Users\Documents\hunter\SampleCert.pvk' ,

ENCRYPTION BY PASSWORD = 'Tomorrow never knows',

DECRYPTION BY PASSWORD = 'All you need is love')

GO

CREATE USER UnsafeSample_Login

FROM CERTIFICATE UnsafeSample_Certificate

GO

GRANT EXTERNAL ACCESS ASSEMBLY

TO UnsafeSample_Login

GO

code, but I'm reciving an error "Cannot find the login 'UnsafeSample_Login', because it does not exist or you do not have permission." on GRANT-command.

|||? Look at your code again -- you've created a USER, rather than a LOGIN -- you need to create the login first, then create a user based on the login, in your database (but not in master). -- Adam MachanicPro SQL Server 2005, available nowhttp://www..apress.com/book/bookDisplay.html?bID=457-- ""_hunter"@.discussions..microsoft.com" <"=?UTF-8?B?X2h1bnRlcg==?="@.discussions.microsoft.com> wrote in message news:46c433b9-51c8-4343-95b2-925ce937dbf4_WBRev1_@.discussions..microsoft.com...This post has been edited either by the author or a moderator in the Microsoft Forums: http://forums.microsoft.com NNTP User, I'm trying such: USE master GO CREATE CERTIFICATE UnsafeSample_Certificate ENCRYPTION BY PASSWORD = 'All you need is love' WITH SUBJECT = 'Certificate for example_sp', START_DATE = '20070201', EXPIRY_DATE = '21000101' GO BACKUP CERTIFICATE UnsafeSample_Certificate TO FILE = 'C:\Documents and Settings\All Users\Documents\hunter\SampleCert.cer' WITH PRIVATE KEY (FILE = 'C:\Documents and Settings\All Users\Documents\hunter\SampleCert.pvk' , ENCRYPTION BY PASSWORD = 'Tomorrow never knows', DECRYPTION BY PASSWORD = 'All you need is love') GO CREATE USER UnsafeSample_Login FROM CERTIFICATE UnsafeSample_Certificate GO GRANT EXTERNAL ACCESS ASSEMBLY TO UnsafeSample_Login GO code, but I'm reciving an error "Cannot find the login 'UnsafeSample_Login', because it does not exist or you do not have permission." on GRANT-command.

prolem with "create login from asymmetric key"

Greetings...

I'm trying to create assembly with "PERMISSION_SET = UNSAFE".
For that I've signed assembly's .dll and installed root certificate to “Trusted Root Certificate Authority.”: http://www.sqljunkies.com/WebLog/ktegels/articles/SigningSQLCLRAssemblies.aspx
now I'm trying to create login from asymmetric key:

USE master
GO

CREATE ASYMMETRIC KEY SQLCLRTestKey
FROM EXECUTABLE FILE = 'C:\Documents and Settings\All Users\Documents\hunter\StoredProcedures.dll'
CREATE LOGIN SQLCLRTestLogin
FROM ASYMMETRIC KEY SQLCLRTestKey

but I'm receiving error: "Cannot find the asymmetric key 'SQLCLRTestKey', because it does not exist or you do not have permission."

What's wrong?

Best regards...

I recommend you take a look at a sample like the AdventureWorks CLR sample which demostrates all the steps necessary in signing, registering the asymmetric key, registering the login, and finally registering the unsafe assembly. You can find the Yukon SP2 samples here: http://www.microsoft.com/downloads/details.aspx?familyid=e719ecf7-9f46-4312-af89-6ad8702e4e6e&displaylang=en. Once you've installed the code samples, by default you will find the AdventureWorks CLR sample here: SystemDrive:\Program Files\Microsoft SQL Server\90\Samples\Engine\Programmability\CLR\AdventureWorks. The readme file for the sample will walk you through each step of the process. You don't need to install any root certificates to use asymmetic keys.

--Bonnie [MSFT]

|||? I'm not a big fan of those instructions. A much, much easier method: First, read this: http://www.sommarskog.se/grantperm.html#certandbulkcopy Follow the instructions therein for setting up a certificate, creating a login using the certificate, etc. But instead of granting bulk copy permissions to the login, grant EXTERNAL ACCESS ASSEMBLY permissions. Backup the certificate and restore it into the database in which you want to create the assembly. Create and catalog the assembly -- no strong name needed (unless you want to use one). Sign your assembly with the same certificate you created in the master DB, and you're good to go. -- Adam MachanicPro SQL Server 2005, available nowhttp://www..apress.com/book/bookDisplay.html?bID=457-- ""_hunter"@.discussions..microsoft.com" <"=?UTF-8?B?X2h1bnRlcg==?="@.discussions.microsoft.com> wrote in message news:e74340fa-4ba8-406e-94f4-51698ba38574@.discussions.microsoft.com...Greetings...I'm trying to create assembly with "PERMISSION_SET = UNSAFE".For that I've signed assembly's .dll and installed root certificate to “Trusted Root Certificate Authority.”: http://www.sqljunkies.com/WebLog/ktegels/articles/SigningSQLCLRAssemblies..aspxnow I'm trying to create login from asymmetric key:USE master GO CREATE ASYMMETRIC KEY SQLCLRTestKeyFROM EXECUTABLE FILE = 'C:\Documents and Settings\All Users\Documents\hunter\StoredProcedures.dll'CREATE LOGIN SQLCLRTestLoginFROM ASYMMETRIC KEY SQLCLRTestKeybut I'm receiving error: "Cannot find the asymmetric key 'SQLCLRTestKey', because it does not exist or you do not have permission."What's wrong?Best regards...|||

BonnieFe, can You be more specific? Ideally just piont on my mistakes...

I've created key by "sn -k SampleKey.snk"

Then in my project's properties i've selected it in Signing->Sign the assembly->Choose a strong name &key file:-><Browse...>

Build->Rebuild Solution

Then in "SQL Server Management Studio":

EXEC('CREATE ASYMMETRIC KEY UnsafeSample_Key FROM EXECUTABLE FILE = ''C:\\StoredProcedures.dll'';');

CREATE LOGIN UnsafeSample_Login FROM ASYMMETRIC KEY UnsafeSample_Key
and I'm reciving the same error: "Cannot find the asymmetric key 'UnsafeSample_Key', because it does not exist or you do not have permission."

|||

NNTP User, I'm trying such:

USE master

GO

CREATE CERTIFICATE UnsafeSample_Certificate

ENCRYPTION BY PASSWORD = 'All you need is love'

WITH SUBJECT = 'Certificate for example_sp',

START_DATE = '20070201', EXPIRY_DATE = '21000101'

GO

BACKUP CERTIFICATE UnsafeSample_Certificate TO FILE = 'C:\Documents and Settings\All Users\Documents\hunter\SampleCert.cer'

WITH PRIVATE KEY (FILE = 'C:\Documents and Settings\All Users\Documents\hunter\SampleCert.pvk' ,

ENCRYPTION BY PASSWORD = 'Tomorrow never knows',

DECRYPTION BY PASSWORD = 'All you need is love')

GO

CREATE USER UnsafeSample_Login

FROM CERTIFICATE UnsafeSample_Certificate

GO

GRANT EXTERNAL ACCESS ASSEMBLY

TO UnsafeSample_Login

GO

code, but I'm reciving an error "Cannot find the login 'UnsafeSample_Login', because it does not exist or you do not have permission." on GRANT-command.

|||? Look at your code again -- you've created a USER, rather than a LOGIN -- you need to create the login first, then create a user based on the login, in your database (but not in master). -- Adam MachanicPro SQL Server 2005, available nowhttp://www..apress.com/book/bookDisplay.html?bID=457-- ""_hunter"@.discussions..microsoft.com" <"=?UTF-8?B?X2h1bnRlcg==?="@.discussions.microsoft.com> wrote in message news:46c433b9-51c8-4343-95b2-925ce937dbf4_WBRev1_@.discussions..microsoft.com...This post has been edited either by the author or a moderator in the Microsoft Forums: http://forums.microsoft.com NNTP User, I'm trying such: USE master GO CREATE CERTIFICATE UnsafeSample_Certificate ENCRYPTION BY PASSWORD = 'All you need is love' WITH SUBJECT = 'Certificate for example_sp', START_DATE = '20070201', EXPIRY_DATE = '21000101' GO BACKUP CERTIFICATE UnsafeSample_Certificate TO FILE = 'C:\Documents and Settings\All Users\Documents\hunter\SampleCert.cer' WITH PRIVATE KEY (FILE = 'C:\Documents and Settings\All Users\Documents\hunter\SampleCert.pvk' , ENCRYPTION BY PASSWORD = 'Tomorrow never knows', DECRYPTION BY PASSWORD = 'All you need is love') GO CREATE USER UnsafeSample_Login FROM CERTIFICATE UnsafeSample_Certificate GO GRANT EXTERNAL ACCESS ASSEMBLY TO UnsafeSample_Login GO code, but I'm reciving an error "Cannot find the login 'UnsafeSample_Login', because it does not exist or you do not have permission." on GRANT-command.

prolem with &quot;create login from asymmetric key&quot;

Greetings...

I'm trying to create assembly with "PERMISSION_SET = UNSAFE".
For that I've signed assembly's .dll and installed root certificate to “Trusted Root Certificate Authority.”: http://www.sqljunkies.com/WebLog/ktegels/articles/SigningSQLCLRAssemblies.aspx
now I'm trying to create login from asymmetric key:

USE master
GO

CREATE ASYMMETRIC KEY SQLCLRTestKey
FROM EXECUTABLE FILE = 'C:\Documents and Settings\All Users\Documents\hunter\StoredProcedures.dll'
CREATE LOGIN SQLCLRTestLogin
FROM ASYMMETRIC KEY SQLCLRTestKey

but I'm receiving error: "Cannot find the asymmetric key 'SQLCLRTestKey', because it does not exist or you do not have permission."

What's wrong?

Best regards...

I recommend you take a look at a sample like the AdventureWorks CLR sample which demostrates all the steps necessary in signing, registering the asymmetric key, registering the login, and finally registering the unsafe assembly. You can find the Yukon SP2 samples here: http://www.microsoft.com/downloads/details.aspx?familyid=e719ecf7-9f46-4312-af89-6ad8702e4e6e&displaylang=en. Once you've installed the code samples, by default you will find the AdventureWorks CLR sample here: SystemDrive:\Program Files\Microsoft SQL Server\90\Samples\Engine\Programmability\CLR\AdventureWorks. The readme file for the sample will walk you through each step of the process. You don't need to install any root certificates to use asymmetic keys.

--Bonnie [MSFT]

|||? I'm not a big fan of those instructions. A much, much easier method: First, read this: http://www.sommarskog.se/grantperm.html#certandbulkcopy Follow the instructions therein for setting up a certificate, creating a login using the certificate, etc. But instead of granting bulk copy permissions to the login, grant EXTERNAL ACCESS ASSEMBLY permissions. Backup the certificate and restore it into the database in which you want to create the assembly. Create and catalog the assembly -- no strong name needed (unless you want to use one). Sign your assembly with the same certificate you created in the master DB, and you're good to go. -- Adam MachanicPro SQL Server 2005, available nowhttp://www..apress.com/book/bookDisplay.html?bID=457-- ""_hunter"@.discussions..microsoft.com" <"=?UTF-8?B?X2h1bnRlcg==?="@.discussions.microsoft.com> wrote in message news:e74340fa-4ba8-406e-94f4-51698ba38574@.discussions.microsoft.com...Greetings...I'm trying to create assembly with "PERMISSION_SET = UNSAFE".For that I've signed assembly's .dll and installed root certificate to “Trusted Root Certificate Authority.”: http://www.sqljunkies.com/WebLog/ktegels/articles/SigningSQLCLRAssemblies..aspxnow I'm trying to create login from asymmetric key:USE master GO CREATE ASYMMETRIC KEY SQLCLRTestKeyFROM EXECUTABLE FILE = 'C:\Documents and Settings\All Users\Documents\hunter\StoredProcedures.dll'CREATE LOGIN SQLCLRTestLoginFROM ASYMMETRIC KEY SQLCLRTestKeybut I'm receiving error: "Cannot find the asymmetric key 'SQLCLRTestKey', because it does not exist or you do not have permission."What's wrong?Best regards...|||

BonnieFe, can You be more specific? Ideally just piont on my mistakes...

I've created key by "sn -k SampleKey.snk"

Then in my project's properties i've selected it in Signing->Sign the assembly->Choose a strong name &key file:-><Browse...>

Build->Rebuild Solution

Then in "SQL Server Management Studio":

EXEC('CREATE ASYMMETRIC KEY UnsafeSample_Key FROM EXECUTABLE FILE = ''C:\\StoredProcedures.dll'';');

CREATE LOGIN UnsafeSample_Login FROM ASYMMETRIC KEY UnsafeSample_Key
and I'm reciving the same error: "Cannot find the asymmetric key 'UnsafeSample_Key', because it does not exist or you do not have permission."

|||

NNTP User, I'm trying such:

USE master

GO

CREATE CERTIFICATE UnsafeSample_Certificate

ENCRYPTION BY PASSWORD = 'All you need is love'

WITH SUBJECT = 'Certificate for example_sp',

START_DATE = '20070201', EXPIRY_DATE = '21000101'

GO

BACKUP CERTIFICATE UnsafeSample_Certificate TO FILE = 'C:\Documents and Settings\All Users\Documents\hunter\SampleCert.cer'

WITH PRIVATE KEY (FILE = 'C:\Documents and Settings\All Users\Documents\hunter\SampleCert.pvk' ,

ENCRYPTION BY PASSWORD = 'Tomorrow never knows',

DECRYPTION BY PASSWORD = 'All you need is love')

GO

CREATE USER UnsafeSample_Login

FROM CERTIFICATE UnsafeSample_Certificate

GO

GRANT EXTERNAL ACCESS ASSEMBLY

TO UnsafeSample_Login

GO

code, but I'm reciving an error "Cannot find the login 'UnsafeSample_Login', because it does not exist or you do not have permission." on GRANT-command.

|||? Look at your code again -- you've created a USER, rather than a LOGIN -- you need to create the login first, then create a user based on the login, in your database (but not in master). -- Adam MachanicPro SQL Server 2005, available nowhttp://www..apress.com/book/bookDisplay.html?bID=457-- ""_hunter"@.discussions..microsoft.com" <"=?UTF-8?B?X2h1bnRlcg==?="@.discussions.microsoft.com> wrote in message news:46c433b9-51c8-4343-95b2-925ce937dbf4_WBRev1_@.discussions..microsoft.com...This post has been edited either by the author or a moderator in the Microsoft Forums: http://forums.microsoft.com NNTP User, I'm trying such: USE master GO CREATE CERTIFICATE UnsafeSample_Certificate ENCRYPTION BY PASSWORD = 'All you need is love' WITH SUBJECT = 'Certificate for example_sp', START_DATE = '20070201', EXPIRY_DATE = '21000101' GO BACKUP CERTIFICATE UnsafeSample_Certificate TO FILE = 'C:\Documents and Settings\All Users\Documents\hunter\SampleCert.cer' WITH PRIVATE KEY (FILE = 'C:\Documents and Settings\All Users\Documents\hunter\SampleCert.pvk' , ENCRYPTION BY PASSWORD = 'Tomorrow never knows', DECRYPTION BY PASSWORD = 'All you need is love') GO CREATE USER UnsafeSample_Login FROM CERTIFICATE UnsafeSample_Certificate GO GRANT EXTERNAL ACCESS ASSEMBLY TO UnsafeSample_Login GO code, but I'm reciving an error "Cannot find the login 'UnsafeSample_Login', because it does not exist or you do not have permission." on GRANT-command.

prolem with &amp;quot;create login from asymmetric key&amp;quot;

Greetings...

I'm trying to create assembly with "PERMISSION_SET = UNSAFE".
For that I've signed assembly's .dll and installed root certificate to “Trusted Root Certificate Authority.”: http://www.sqljunkies.com/WebLog/ktegels/articles/SigningSQLCLRAssemblies.aspx
now I'm trying to create login from asymmetric key:

USE master
GO

CREATE ASYMMETRIC KEY SQLCLRTestKey
FROM EXECUTABLE FILE = 'C:\Documents and Settings\All Users\Documents\hunter\StoredProcedures.dll'
CREATE LOGIN SQLCLRTestLogin
FROM ASYMMETRIC KEY SQLCLRTestKey

but I'm receiving error: "Cannot find the asymmetric key 'SQLCLRTestKey', because it does not exist or you do not have permission."

What's wrong?

Best regards...

I recommend you take a look at a sample like the AdventureWorks CLR sample which demostrates all the steps necessary in signing, registering the asymmetric key, registering the login, and finally registering the unsafe assembly. You can find the Yukon SP2 samples here: http://www.microsoft.com/downloads/details.aspx?familyid=e719ecf7-9f46-4312-af89-6ad8702e4e6e&displaylang=en. Once you've installed the code samples, by default you will find the AdventureWorks CLR sample here: SystemDrive:\Program Files\Microsoft SQL Server\90\Samples\Engine\Programmability\CLR\AdventureWorks. The readme file for the sample will walk you through each step of the process. You don't need to install any root certificates to use asymmetic keys.

--Bonnie [MSFT]

|||? I'm not a big fan of those instructions. A much, much easier method: First, read this: http://www.sommarskog.se/grantperm.html#certandbulkcopy Follow the instructions therein for setting up a certificate, creating a login using the certificate, etc. But instead of granting bulk copy permissions to the login, grant EXTERNAL ACCESS ASSEMBLY permissions. Backup the certificate and restore it into the database in which you want to create the assembly. Create and catalog the assembly -- no strong name needed (unless you want to use one). Sign your assembly with the same certificate you created in the master DB, and you're good to go. -- Adam MachanicPro SQL Server 2005, available nowhttp://www..apress.com/book/bookDisplay.html?bID=457-- ""_hunter"@.discussions..microsoft.com" <"=?UTF-8?B?X2h1bnRlcg==?="@.discussions.microsoft.com> wrote in message news:e74340fa-4ba8-406e-94f4-51698ba38574@.discussions.microsoft.com...Greetings...I'm trying to create assembly with "PERMISSION_SET = UNSAFE".For that I've signed assembly's .dll and installed root certificate to “Trusted Root Certificate Authority.”: http://www.sqljunkies.com/WebLog/ktegels/articles/SigningSQLCLRAssemblies..aspxnow I'm trying to create login from asymmetric key:USE master GO CREATE ASYMMETRIC KEY SQLCLRTestKeyFROM EXECUTABLE FILE = 'C:\Documents and Settings\All Users\Documents\hunter\StoredProcedures.dll'CREATE LOGIN SQLCLRTestLoginFROM ASYMMETRIC KEY SQLCLRTestKeybut I'm receiving error: "Cannot find the asymmetric key 'SQLCLRTestKey', because it does not exist or you do not have permission."What's wrong?Best regards...|||

BonnieFe, can You be more specific? Ideally just piont on my mistakes...

I've created key by "sn -k SampleKey.snk"

Then in my project's properties i've selected it in Signing->Sign the assembly->Choose a strong name &key file:-><Browse...>

Build->Rebuild Solution

Then in "SQL Server Management Studio":

EXEC('CREATE ASYMMETRIC KEY UnsafeSample_Key FROM EXECUTABLE FILE = ''C:\\StoredProcedures.dll'';');

CREATE LOGIN UnsafeSample_Login FROM ASYMMETRIC KEY UnsafeSample_Key
and I'm reciving the same error: "Cannot find the asymmetric key 'UnsafeSample_Key', because it does not exist or you do not have permission."

|||

NNTP User, I'm trying such:

USE master

GO

CREATE CERTIFICATE UnsafeSample_Certificate

ENCRYPTION BY PASSWORD = 'All you need is love'

WITH SUBJECT = 'Certificate for example_sp',

START_DATE = '20070201', EXPIRY_DATE = '21000101'

GO

BACKUP CERTIFICATE UnsafeSample_Certificate TO FILE = 'C:\Documents and Settings\All Users\Documents\hunter\SampleCert.cer'

WITH PRIVATE KEY (FILE = 'C:\Documents and Settings\All Users\Documents\hunter\SampleCert.pvk' ,

ENCRYPTION BY PASSWORD = 'Tomorrow never knows',

DECRYPTION BY PASSWORD = 'All you need is love')

GO

CREATE USER UnsafeSample_Login

FROM CERTIFICATE UnsafeSample_Certificate

GO

GRANT EXTERNAL ACCESS ASSEMBLY

TO UnsafeSample_Login

GO

code, but I'm reciving an error "Cannot find the login 'UnsafeSample_Login', because it does not exist or you do not have permission." on GRANT-command.

|||? Look at your code again -- you've created a USER, rather than a LOGIN -- you need to create the login first, then create a user based on the login, in your database (but not in master). -- Adam MachanicPro SQL Server 2005, available nowhttp://www..apress.com/book/bookDisplay.html?bID=457-- ""_hunter"@.discussions..microsoft.com" <"=?UTF-8?B?X2h1bnRlcg==?="@.discussions.microsoft.com> wrote in message news:46c433b9-51c8-4343-95b2-925ce937dbf4_WBRev1_@.discussions..microsoft.com...This post has been edited either by the author or a moderator in the Microsoft Forums: http://forums.microsoft.com NNTP User, I'm trying such: USE master GO CREATE CERTIFICATE UnsafeSample_Certificate ENCRYPTION BY PASSWORD = 'All you need is love' WITH SUBJECT = 'Certificate for example_sp', START_DATE = '20070201', EXPIRY_DATE = '21000101' GO BACKUP CERTIFICATE UnsafeSample_Certificate TO FILE = 'C:\Documents and Settings\All Users\Documents\hunter\SampleCert.cer' WITH PRIVATE KEY (FILE = 'C:\Documents and Settings\All Users\Documents\hunter\SampleCert.pvk' , ENCRYPTION BY PASSWORD = 'Tomorrow never knows', DECRYPTION BY PASSWORD = 'All you need is love') GO CREATE USER UnsafeSample_Login FROM CERTIFICATE UnsafeSample_Certificate GO GRANT EXTERNAL ACCESS ASSEMBLY TO UnsafeSample_Login GO code, but I'm reciving an error "Cannot find the login 'UnsafeSample_Login', because it does not exist or you do not have permission." on GRANT-command.

Project Type - Business Intelligence

I have sql server 2005 beta 2 and Visual Studio .Net 2003 installed.
I do not have the project type "Business Intelligence" in Visual Studio.
I have tried everything I could think of.
it is supposed to be there correct?On Sat, 30 Oct 2004 09:33:01 -0700, "Bryan Farrell"
<BryanFarrell@.discussions.microsoft.com> wrote:
>I have sql server 2005 beta 2 and Visual Studio .Net 2003 installed.
>I do not have the project type "Business Intelligence" in Visual Studio.
>I have tried everything I could think of.
>it is supposed to be there correct?
Bryan,
Do you have the beta 2 of SQL Server 2005 or of SQL Server 2005
Express?
If you have Express then the Business Intelligence Development Studio
is not included.
If you have the beta 2 of SQL Server 2005 then you should be able to
find the Business Intelligence Development Studio in the SQL Server
2005 folder under All Programs.
Andrew Watt
MVP - InfoPath|||i have beta 2 of SQL Server 2005.
i have the Business Intelligence Development Studio.
but what i am looking for is Visual Studio .Net 2003 - then New Project -
then Business Intelligence. thats what i do no have. the Business
Intelligence project type.
thx.
"Andrew Watt [MVP - InfoPath]" wrote:
> On Sat, 30 Oct 2004 09:33:01 -0700, "Bryan Farrell"
> <BryanFarrell@.discussions.microsoft.com> wrote:
> >I have sql server 2005 beta 2 and Visual Studio .Net 2003 installed.
> >I do not have the project type "Business Intelligence" in Visual Studio.
> >I have tried everything I could think of.
> >
> >it is supposed to be there correct?
> Bryan,
> Do you have the beta 2 of SQL Server 2005 or of SQL Server 2005
> Express?
> If you have Express then the Business Intelligence Development Studio
> is not included.
> If you have the beta 2 of SQL Server 2005 then you should be able to
> find the Business Intelligence Development Studio in the SQL Server
> 2005 folder under All Programs.
> Andrew Watt
> MVP - InfoPath
>

Project Server

Hi All,
I have got project server 2003 installed at both
forest DC and child DC, what if i want to replicate both
the datbases with each other. And which type of
replication most importantly
You can replicate the databases. As far as which method of replication,
that depends upon a lot of business needs factors. Every single replication
method will work from a technical standpoint. Not all of them will meet
your business needs.
Mike
Principal Mentor
Solid Quality Learning
"More than just Training"
SQL Server MVP
http://www.solidqualitylearning.com
http://www.mssqlserver.com

project server

I installed SP4 of SQL SERVER 2000 and even so I don't get to install
project server. Somebody knows how I can solve that.. the error message says
that
I have to install the sp3 or superior of the sql server 2000.Based on your comments, I am not sure where you are getting stuck.
You need to install SQL first w/SP3a or SP4.
Then create users as per project server install guide
Then setup sharepoint, including creating a Top Level Site
Then setup Project Server
Then install the Project Server SQL hotfix - see project server website,
then Project Server SP2.
Hope this helps.

Friday, March 9, 2012

Programmatically extending the project tree

Hi,

I need to write an add-in, that when installed it will add a virtual folder to the project tree (in which I can later add other stuff).

The problem is even more complicated since the project I want to extend is an SSIS project (SQL Server Integration Services), and it doesn't let you customize the project structure even from the project explorer itself (can't add folders).

I appreciate any help on this.

Thanks.

You can't add new folders to SSIS project, neither from UI nor programmatically. We automatically assign file to one of the predefined folders (based on file extention - you may notice file may move when you rename it).

If you describe what are your goals, we will consider this for future version.|||

Thank you.

I am writing an add-in to automate certain activities in SSIS. each such activity has its own definition, and you can have multiple activities in a certain SSIS project.

I thought the best way to do it would be to add my folder to the project tree, and list there the already defined activities, as well as allowing the creation of new activities.

each activity creates multiple SSIS packages, and also does some work outside the scope of SSIS.

I would love to hear if you have any other ideas solving this issue.

Thanks.

|||I would create a new tool window, which presents a different view of SSIS project - with activities and other custom stuff, and appropriate operations. This would be similar to e.g. Class View vs. Project View in C# or VB.NET projects.|||

Thanks.

Can you send me any reference or technical guide on how to do this?

|||

Michael,

I am working with Noa on the same project.

I am trying to do this differently than what you suggested. I added a new entry to the Project context menu (right click on the project) and I am trying to activate my addin from there. the problem is that this entry appears now for all project types and not only for SSIS!! Is there a better way to do this? maybe add the entry to another context menu? Or is there any indication that can tell me programmatically that I am dealing with a SSIS project, so I can disable it for other projects?

Thanks,

Sami.

Saturday, February 25, 2012

Programatically find out the SQL Server Version and SP via registry or WMI?

Hi All,
Just keen to find a way to find the version of SQL Server and the current installed SQL Server Service pack via either a registry key or a WMI class entry...
I've had a good look, but can't seem to find anything that matches or is useful. I know you can retrieve this via a SQL query (with Select @.@.version), but I'm after a way that uses our existing WMI/registry reading process as we are collecting info from s
ervers all over the world, so I don't want to have to deal with all the SQL permissions issues & have to use a different tool in order to run a SQL query...
Any info or advice that people can offer would be greatfully accepted
Thanks in Advance
Cheers
Iain
HKEY_LOCAL_MACHINE/Software/Microsoft/MSSQLServer/MSSQLServer/CurrentVersion
/CSDVersion
It's for default instance, don't know what will be for named instance really
but you can check it by yourself
"iain sandercock" <iain*DOT*sandercock@.*NOSPAM*riotinto.com> wrote in
message news:8E21AF3D-25DF-4709-AB10-4CD106A57340@.microsoft.com...
> Hi All,
> Just keen to find a way to find the version of SQL Server and the current
installed SQL Server Service pack via either a registry key or a WMI class
entry...
> I've had a good look, but can't seem to find anything that matches or is
useful. I know you can retrieve this via a SQL query (with Select
@.@.version), but I'm after a way that uses our existing WMI/registry reading
process as we are collecting info from servers all over the world, so I
don't want to have to deal with all the SQL permissions issues & have to use
a different tool in order to run a SQL query...
> Any info or advice that people can offer would be greatfully accepted
> Thanks in Advance
> Cheers
> Iain
|||Alex,
A named instance can be found here:
HKEY_LOCAL_MACHINE/Software/Microsoft/Microsoft SQL
Server/INSTANCE_NAME/MSSQLServer/CurrentVersion/CSDVersion
Where INSTANCE_NAME is the name of your SQL Server named instance.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Alex Cieszinski" <nomail@.thanks> wrote in message
news:ODWl%23YwPEHA.3304@.TK2MSFTNGP12.phx.gbl...
>
HKEY_LOCAL_MACHINE/Software/Microsoft/MSSQLServer/MSSQLServer/CurrentVersion
> /CSDVersion
> It's for default instance, don't know what will be for named instance
really
> but you can check it by yourself
>
|||Thanks Mark & Alex...
This is exactly what I need
Can't believe I didn't spot this, must have been due to a long day on friday for me to have missed it. The other method I found was to check the event log via WMI for the event that SQL records on startup, which give the version of SQL, and also the versi
on of SQL Server that is running (Enterprise / Standard /Developer etc)...the only limitation on this is that you need a relatively specific WQL (WMI Query Language) query - as its an information event that only differs in the message text from a range of
other event log informational messages from SQLServer, and the LIKE operator for WQL is only suppported in XP/Server2003.....not w2k which the majority of the servers will be.
Given that this info is in the registry, I wonder why in the PSS collection tool they retrieve the version from SQL statement, but I assume that it is to grab the SQL product type (enterprise edition etc) at the same time.....is this something that is al
so stored in the registry, as the only reference that might give this info is the productID (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\80\Registration), which I'll check on some different version machines to see if it actaully does identi
fy the product type...
if you already know if productID correlates with the different editions, and what the productIDs are for the various editions, that would be great, otherwise I'll post the results of what I find out back here for your reference
Thanks again
cheers
Iain
|||Ok, CSDVersion gives me "8.00.760" - what does that tell me about the Service Pack installed?
Regards
|||Thanks Mark,
I can use the list of version numbers - but what a crappy way of encoding the SP version into the version number.
It's impossible for me to write an algorithm displaying the SP version - that'll also work when SP4 i released!
Any ideas?
|||... and on a related node:
- how do i retrieve the version and SP of Internet Explorer?

Programatically find out the SQL Server Version and SP via registry or WMI?

Hi All,
Just keen to find a way to find the version of SQL Server and the current installed SQL Server Service pack via either a registry key or a WMI class entry..
I've had a good look, but can't seem to find anything that matches or is useful. I know you can retrieve this via a SQL query (with Select @.@.version), but I'm after a way that uses our existing WMI/registry reading process as we are collecting info from servers all over the world, so I don't want to have to deal with all the SQL permissions issues & have to use a different tool in order to run a SQL query..
Any info or advice that people can offer would be greatfully accepte
Thanks in Advanc
Cheer
IainHKEY_LOCAL_MACHINE/Software/Microsoft/MSSQLServer/MSSQLServer/CurrentVersion
/CSDVersion
It's for default instance, don't know what will be for named instance really
but you can check it by yourself
"iain sandercock" <iain*DOT*sandercock@.*NOSPAM*riotinto.com> wrote in
message news:8E21AF3D-25DF-4709-AB10-4CD106A57340@.microsoft.com...
> Hi All,
> Just keen to find a way to find the version of SQL Server and the current
installed SQL Server Service pack via either a registry key or a WMI class
entry...
> I've had a good look, but can't seem to find anything that matches or is
useful. I know you can retrieve this via a SQL query (with Select
@.@.version), but I'm after a way that uses our existing WMI/registry reading
process as we are collecting info from servers all over the world, so I
don't want to have to deal with all the SQL permissions issues & have to use
a different tool in order to run a SQL query...
> Any info or advice that people can offer would be greatfully accepted
> Thanks in Advance
> Cheers
> Iain|||Alex,
A named instance can be found here:
HKEY_LOCAL_MACHINE/Software/Microsoft/Microsoft SQL
Server/INSTANCE_NAME/MSSQLServer/CurrentVersion/CSDVersion
Where INSTANCE_NAME is the name of your SQL Server named instance.
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Alex Cieszinski" <nomail@.thanks> wrote in message
news:ODWl%23YwPEHA.3304@.TK2MSFTNGP12.phx.gbl...
>
HKEY_LOCAL_MACHINE/Software/Microsoft/MSSQLServer/MSSQLServer/CurrentVersion
> /CSDVersion
> It's for default instance, don't know what will be for named instance
really
> but you can check it by yourself
>|||Thanks Mark & Alex..
This is exactly what I nee
Can't believe I didn't spot this, must have been due to a long day on friday for me to have missed it. The other method I found was to check the event log via WMI for the event that SQL records on startup, which give the version of SQL, and also the version of SQL Server that is running (Enterprise / Standard /Developer etc)...the only limitation on this is that you need a relatively specific WQL (WMI Query Language) query - as its an information event that only differs in the message text from a range of other event log informational messages from SQLServer, and the LIKE operator for WQL is only suppported in XP/Server2003.....not w2k which the majority of the servers will be.
Given that this info is in the registry, I wonder why in the PSS collection tool they retrieve the version from SQL statement, but I assume that it is to grab the SQL product type (enterprise edition etc) at the same time.....is this something that is also stored in the registry, as the only reference that might give this info is the productID (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\80\Registration), which I'll check on some different version machines to see if it actaully does identify the product type..
if you already know if productID correlates with the different editions, and what the productIDs are for the various editions, that would be great, otherwise I'll post the results of what I find out back here for your referenc
Thanks agai
cheer
Iain|||Rasmus,
This should help:
How do I know which version of SQL Server I'm running?
http://aspfaq.com/show.asp?id=2160
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Rasmus wrote:
> Ok, CSDVersion gives me "8.00.760" - what does that tell me about the Service Pack installed?
>
> Regards|||Thanks Mark
I can use the list of version numbers - but what a crappy way of encoding the SP version into the version number.
It's impossible for me to write an algorithm displaying the SP version - that'll also work when SP4 i released
Any ideas?|||... and on a related node
- how do i retrieve the version and SP of Internet Explorer?

Programatically find out the SQL Server Version and SP via registry or WMI?

Hi All,
Just keen to find a way to find the version of SQL Server and the current in
stalled SQL Server Service pack via either a registry key or a WMI class ent
ry...
I've had a good look, but can't seem to find anything that matches or is use
ful. I know you can retrieve this via a SQL query (with Select @.@.version), b
ut I'm after a way that uses our existing WMI/registry reading process as we
are collecting info from s
ervers all over the world, so I don't want to have to deal with all the SQL
permissions issues & have to use a different tool in order to run a SQL quer
y...
Any info or advice that people can offer would be greatfully accepted
Thanks in Advance
Cheers
IainHKEY_LOCAL_MACHINE/Software/Microsoft/MSSQLServer/MSSQLServer/CurrentVersion
/CSDVersion
It's for default instance, don't know what will be for named instance really
but you can check it by yourself
"iain sandercock" <iain*DOT*sandercock@.*NOSPAM*riotinto.com> wrote in
message news:8E21AF3D-25DF-4709-AB10-4CD106A57340@.microsoft.com...
> Hi All,
> Just keen to find a way to find the version of SQL Server and the current
installed SQL Server Service pack via either a registry key or a WMI class
entry...
> I've had a good look, but can't seem to find anything that matches or is
useful. I know you can retrieve this via a SQL query (with Select
@.@.version), but I'm after a way that uses our existing WMI/registry reading
process as we are collecting info from servers all over the world, so I
don't want to have to deal with all the SQL permissions issues & have to use
a different tool in order to run a SQL query...
> Any info or advice that people can offer would be greatfully accepted
> Thanks in Advance
> Cheers
> Iain|||Alex,
A named instance can be found here:
HKEY_LOCAL_MACHINE/Software/Microsoft/Microsoft SQL
Server/INSTANCE_NAME/MSSQLServer/CurrentVersion/CSDVersion
Where INSTANCE_NAME is the name of your SQL Server named instance.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Alex Cieszinski" <nomail@.thanks> wrote in message
news:ODWl%23YwPEHA.3304@.TK2MSFTNGP12.phx.gbl...
>
HKEY_LOCAL_MACHINE/Software/Microsoft/MSSQLServer/MSSQLServer/CurrentVersion
> /CSDVersion
> It's for default instance, don't know what will be for named instance
really
> but you can check it by yourself
>|||Thanks Mark & Alex...
This is exactly what I need
Can't believe I didn't spot this, must have been due to a long day on friday
for me to have missed it. The other method I found was to check the event l
og via WMI for the event that SQL records on startup, which give the version
of SQL, and also the versi
on of SQL Server that is running (Enterprise / Standard /Developer etc)...th
e only limitation on this is that you need a relatively specific WQL (WMI Qu
ery Language) query - as its an information event that only differs in the m
essage text from a range of
other event log informational messages from SQLServer, and the LIKE operator
for WQL is only suppported in XP/Server2003.....not w2k which the majority
of the servers will be.
Given that this info is in the registry, I wonder why in the PSS collection
tool they retrieve the version from SQL statement, but I assume that it is t
o grab the SQL product type (enterprise edition etc) at the same time.....i
s this something that is al
so stored in the registry, as the only reference that might give this info i
s the productID (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\M
icrosoft SQL Server\
80\Registration), which I'll check on some different version machines to see
if it actaully does identi
fy the product type...
if you already know if productID correlates with the different editions, and
what the productIDs are for the various editions, that would be great, othe
rwise I'll post the results of what I find out back here for your reference
Thanks again
cheers
Iain|||Ok, CSDVersion gives me "8.00.760" - what does that tell me about the Servic
e Pack installed?
Regards|||Thanks Mark,
I can use the list of version numbers - but what a crappy way of encoding th
e SP version into the version number.
It's impossible for me to write an algorithm displaying the SP version - tha
t'll also work when SP4 i released!
Any ideas?|||... and on a related node:
- how do i retrieve the version and SP of Internet Explorer?