Showing posts with label connect. Show all posts
Showing posts with label connect. Show all posts

Friday, March 9, 2012

Encrypt argument does not work in SqlConnection.ConnectionString?

Is "Encrypt" not support in Compact Framework 2.0 SqlConnection string?

Trying to connect to sql2005 db using SSL from WM5/.net 2.0 pda and am receiving the below error. I can connect fine w/o the "encrypt" argument and the same connection string with "encrypt" connects fine from XP workstation to sql db w/SSL.

"Unknown connection option in connection string: encrypt."

Connection String I used:

sqlConnection = newSqlConnection("Data Source=mysqlserver;Initial Catalog=sometable;UID=username;PWD=Password;Encrypt=true;");

Thanks,

Jim

Hello everybody

I have the same problem. I'm using mobile PC with WinCE 4.2 on board. And I need the connection to be encrypted. How can I make this? The CF1.0/2.0 doesn't allow this feature. :(

Also I can use the VPN connection. But my device doesn't have this function (the function is present in disable mode). May be there is another application that realize VPN for WinCE 4.2?

Thank you.

Best regards,

Sergey

|||

This works in my code. I'm showing you the function that calls GetConnectionString so you'll see where the string is being passed.

PublicSharedFunction GetConnection(ByVal strDatabaseName AsString) As SqlCeConnection

Dim cn As SqlCeConnection

cn = New SqlCeConnection(GetConnectionString(strDatabaseName))

Return cn

EndFunction

PublicSharedFunction GetConnectionString(ByVal strDatabaseName AsString) AsString

Return"Data Source=" & strDatabaseName & ";SSCE:Database Password=xxxxxxxx;SSCE:Encrypt Database=True"

EndFunction

|||

Why did you write the 'ssce' near connection string properties? Is it rule or something else?

Also, I need connect to the Sql Server on the host (not mobile sql server) and I use the SqlConnection class for it. Can I use such connection string? I didn't find the information in the msdn about its description.

Sorry, but I can't check your advise now and see the result, I'm away from my workstation. That is why I want to know more. And I'll check it latter.

|||

To Clearify - I'm trying to encrypt the sql connection to the host using, not to a local installation of SQL Mobile. I believe a couple of replies address encrypting data or the database of a local sql mobile db.

Jim

|||Sorry, I did not notice you were not using sqlce.|||This means that Encrypt is not supported in Compact Framework 2.0 SqlClient.SqlConnection|||

This code sample does not work on a WM 5 device with cf 2.0 but works ok if "Encrypt=true" is removed. Am I doing something wrong? Same code works fine on XP with .Net 2.0 when connecting to same ssl enabled sql server. How can I encrypt a sql connection from pda to sql server?

Thanks,

Jim

sqlConnection = new SqlConnection("Data Source=someSql2005Server;Initial Catalog=someSqlTable;"

+ "UID=myUsername;PWD=somePassword;Encrypt=true");

|||The compact framework is not the full .NET framework. Some features are disabled or just not implemented. If you get an error that the connection could not be established because of the encrypt feature not being available it's just not implemented!

Encrypt argument does not work in SqlConnection.ConnectionString?

Is "Encrypt" not support in Compact Framework 2.0 SqlConnection string?

Trying to connect to sql2005 db using SSL from WM5/.net 2.0 pda and am receiving the below error. I can connect fine w/o the "encrypt" argument and the same connection string with "encrypt" connects fine from XP workstation to sql db w/SSL.

"Unknown connection option in connection string: encrypt."

Connection String I used:

sqlConnection = new SqlConnection("Data Source=mysqlserver;Initial Catalog=sometable;UID=username;PWD=Password;Encrypt=true;");

Thanks,

Jim

Hello everybody

I have the same problem. I'm using mobile PC with WinCE 4.2 on board. And I need the connection to be encrypted. How can I make this? The CF1.0/2.0 doesn't allow this feature. :(

Also I can use the VPN connection. But my device doesn't have this function (the function is present in disable mode). May be there is another application that realize VPN for WinCE 4.2?

Thank you.

Best regards,

Sergey

|||

This works in my code. I'm showing you the function that calls GetConnectionString so you'll see where the string is being passed.

Public Shared Function GetConnection(ByVal strDatabaseName As String) As SqlCeConnection

Dim cn As SqlCeConnection

cn = New SqlCeConnection(GetConnectionString(strDatabaseName))

Return cn

End Function

Public Shared Function GetConnectionString(ByVal strDatabaseName As String) As String

Return "Data Source=" & strDatabaseName & ";SSCE:Database Password=xxxxxxxx;SSCE:Encrypt Database=True"

End Function

|||

Why did you write the 'ssce' near connection string properties? Is it rule or something else?

Also, I need connect to the Sql Server on the host (not mobile sql server) and I use the SqlConnection class for it. Can I use such connection string? I didn't find the information in the msdn about its description.

Sorry, but I can't check your advise now and see the result, I'm away from my workstation. That is why I want to know more. And I'll check it latter.

|||

To Clearify - I'm trying to encrypt the sql connection to the host using, not to a local installation of SQL Mobile. I believe a couple of replies address encrypting data or the database of a local sql mobile db.

Jim

|||Sorry, I did not notice you were not using sqlce.|||This means that Encrypt is not supported in Compact Framework 2.0 SqlClient.SqlConnection|||

This code sample does not work on a WM 5 device with cf 2.0 but works ok if "Encrypt=true" is removed. Am I doing something wrong? Same code works fine on XP with .Net 2.0 when connecting to same ssl enabled sql server. How can I encrypt a sql connection from pda to sql server?

Thanks,

Jim

sqlConnection = new SqlConnection("Data Source=someSql2005Server;Initial Catalog=someSqlTable;"

+ "UID=myUsername;PWD=somePassword;Encrypt=true");

|||The compact framework is not the full .NET framework. Some features are disabled or just not implemented. If you get an error that the connection could not be established because of the encrypt feature not being available it's just not implemented!

Friday, February 24, 2012

Enable User Instances in SQL Server

I'm just starting out and trying to connect to my first database using the following string:

Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\RFPdb.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True

I get the following error during debug:

"Generating user instances in SQL Server is disabled. Use sp_configure 'user instances enabled' to generate user instances."

I've done this on every database - Master, Model, Tempdb, etc, and my database.

Still get the error. I may not be enabling it correctly. Any help would be appreciated.

The documentation suggests that I use user instances so that users without Admin rights can work with the database. Add, delete, edit data. Is this true?

is the database on your local machine or are you trying to connect through remote machies. Remote connections will not be allowed.|||Local database that I will eventually deploy with the product for local use only.|||Try using User Instance=False. User Instance is a special feature in express edition that allows normal users to have owner privilges and I guess this is not what is require here.|||

When I turn User Instance Off I get the error:

"A database with the same name exists, or specified file cannot be opened, or it is located on UNC share."

I tried downloading SSEUtil to set enable user instances but the .exe doesn't work. It flashes a command window and shuts down. Any ideas on this?

|||

is it necessary to use to attachdb. I mean any specific reason. If not try connecting using a connection string like :

connectionString="Data Source=LPXP561;Initial Catalog=AdventureWorks;Integrated Security=True

|||Lot's of other options will work. I'm trying to use the new User Instance feature of SQL Sever Express. It requires the "attachbd" usage and User Instance = True. I can't get it to work as decribed in the documentation.|||

Have got the same problem: cant connect to user instance, since it is not enabled in express version by default..

can anybody suggest how to "Use sp_configure 'user instances enabled' ", where to type it.. or whatever..

|||Hi,

Open the SQL Server Management Studio Express. This is the downloadable program in the same site where you downloaded the SQL Server 2005 express used to manage SQL Server 2005 Express.
In the query editor type this text: exec sp_configure 'user instances enabled', 1.
Then type: Reconfigure.
Then restart the SQL Server database.

Good luck.

KaBalweg?|||

Hi DDH,

I know this is now several weeks after your posted problem, but I have exactly the same issue. Did the suggested solution resolve the problem?

Mike

|||Thanks kabalweg for the str8 forward solution to this issue. It worked for me and made complete sense as soon as I read it.|||it's really nice when someone gives you a straight answer!-)
this one got me going right away!
i was trying to connect to the DBs I'm building in SQL 2005.
"exec sp_configure 'user instances enabled', 1" got me started quickly.
heck! ...i might re-visit this forum!-)
|||God bless you mate, you gave me heaven on earth. wonderful, amazing, magical. It works like .....wawwwwwww|||woot!!dude..u simply rocks!!|||

Hi, I have been doing this, and in the query editor, it says it has been changed, and then restarted the server, but it neva worked.

So i tried it again (and the query results said changed from 1 to 1), but it still hasnt worked.

Have i configured the sql server incorrectly?

Please help

PS i have been restarting my sql service through the sql server configuration manager

Enable User Instances in SQL Server

I'm just starting out and trying to connect to my first database using the following string:

Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\RFPdb.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True

I get the following error during debug:

"Generating user instances in SQL Server is disabled. Use sp_configure 'user instances enabled' to generate user instances."

I've done this on every database - Master, Model, Tempdb, etc, and my database.

Still get the error. I may not be enabling it correctly. Any help would be appreciated.

The documentation suggests that I use user instances so that users without Admin rights can work with the database. Add, delete, edit data. Is this true?

is the database on your local machine or are you trying to connect through remote machies. Remote connections will not be allowed.|||Local database that I will eventually deploy with the product for local use only.|||Try using User Instance=False. User Instance is a special feature in express edition that allows normal users to have owner privilges and I guess this is not what is require here.|||

When I turn User Instance Off I get the error:

"A database with the same name exists, or specified file cannot be opened, or it is located on UNC share."

I tried downloading SSEUtil to set enable user instances but the .exe doesn't work. It flashes a command window and shuts down. Any ideas on this?

|||

is it necessary to use to attachdb. I mean any specific reason. If not try connecting using a connection string like :

connectionString="Data Source=LPXP561;Initial Catalog=AdventureWorks;Integrated Security=True

|||Lot's of other options will work. I'm trying to use the new User Instance feature of SQL Sever Express. It requires the "attachbd" usage and User Instance = True. I can't get it to work as decribed in the documentation.|||

Have got the same problem: cant connect to user instance, since it is not enabled in express version by default..

can anybody suggest how to "Use sp_configure 'user instances enabled' ", where to type it.. or whatever..

|||Hi,

Open the SQL Server Management Studio Express. This is the downloadable program in the same site where you downloaded the SQL Server 2005 express used to manage SQL Server 2005 Express.
In the query editor type this text: exec sp_configure 'user instances enabled', 1.
Then type: Reconfigure.
Then restart the SQL Server database.

Good luck.

KaBalweg?|||

Hi DDH,

I know this is now several weeks after your posted problem, but I have exactly the same issue. Did the suggested solution resolve the problem?

Mike

|||Thanks kabalweg for the str8 forward solution to this issue. It worked for me and made complete sense as soon as I read it.|||it's really nice when someone gives you a straight answer!-)
this one got me going right away!
i was trying to connect to the DBs I'm building in SQL 2005.
"exec sp_configure 'user instances enabled', 1" got me started quickly.
heck! ...i might re-visit this forum!-)
|||God bless you mate, you gave me heaven on earth. wonderful, amazing, magical. It works like .....wawwwwwww|||woot!!dude..u simply rocks!!|||

Hi, I have been doing this, and in the query editor, it says it has been changed, and then restarted the server, but it neva worked.

So i tried it again (and the query results said changed from 1 to 1), but it still hasnt worked.

Have i configured the sql server incorrectly?

Please help

PS i have been restarting my sql service through the sql server configuration manager

Enable User Instances in SQL Server

I'm just starting out and trying to connect to my first database using the following string:

Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\RFPdb.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True

I get the following error during debug:

"Generating user instances in SQL Server is disabled. Use sp_configure 'user instances enabled' to generate user instances."

I've done this on every database - Master, Model, Tempdb, etc, and my database.

Still get the error. I may not be enabling it correctly. Any help would be appreciated.

The documentation suggests that I use user instances so that users without Admin rights can work with the database. Add, delete, edit data. Is this true?

is the database on your local machine or are you trying to connect through remote machies. Remote connections will not be allowed.|||Local database that I will eventually deploy with the product for local use only.|||Try using User Instance=False. User Instance is a special feature in express edition that allows normal users to have owner privilges and I guess this is not what is require here.|||

When I turn User Instance Off I get the error:

"A database with the same name exists, or specified file cannot be opened, or it is located on UNC share."

I tried downloading SSEUtil to set enable user instances but the .exe doesn't work. It flashes a command window and shuts down. Any ideas on this?

|||

is it necessary to use to attachdb. I mean any specific reason. If not try connecting using a connection string like :

connectionString="Data Source=LPXP561;Initial Catalog=AdventureWorks;Integrated Security=True

|||Lot's of other options will work. I'm trying to use the new User Instance feature of SQL Sever Express. It requires the "attachbd" usage and User Instance = True. I can't get it to work as decribed in the documentation.|||

Have got the same problem: cant connect to user instance, since it is not enabled in express version by default..

can anybody suggest how to "Use sp_configure 'user instances enabled' ", where to type it.. or whatever..

|||Hi,

Open the SQL Server Management Studio Express. This is the downloadable program in the same site where you downloaded the SQL Server 2005 express used to manage SQL Server 2005 Express.
In the query editor type this text: exec sp_configure 'user instances enabled', 1.
Then type: Reconfigure.
Then restart the SQL Server database.

Good luck.

KaBalweg?|||

Hi DDH,

I know this is now several weeks after your posted problem, but I have exactly the same issue. Did the suggested solution resolve the problem?

Mike

|||Thanks kabalweg for the str8 forward solution to this issue. It worked for me and made complete sense as soon as I read it.|||it's really nice when someone gives you a straight answer!-)
this one got me going right away!
i was trying to connect to the DBs I'm building in SQL 2005.
"exec sp_configure 'user instances enabled', 1" got me started quickly.
heck! ...i might re-visit this forum!-)
|||God bless you mate, you gave me heaven on earth. wonderful, amazing, magical. It works like .....wawwwwwww|||woot!!dude..u simply rocks!!|||

Hi, I have been doing this, and in the query editor, it says it has been changed, and then restarted the server, but it neva worked.

So i tried it again (and the query results said changed from 1 to 1), but it still hasnt worked.

Have i configured the sql server incorrectly?

Please help

PS i have been restarting my sql service through the sql server configuration manager

Enable User Instances in SQL Server

I'm just starting out and trying to connect to my first database using the following string:

Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\RFPdb.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True

I get the following error during debug:

"Generating user instances in SQL Server is disabled. Use sp_configure 'user instances enabled' to generate user instances."

I've done this on every database - Master, Model, Tempdb, etc, and my database.

Still get the error. I may not be enabling it correctly. Any help would be appreciated.

The documentation suggests that I use user instances so that users without Admin rights can work with the database. Add, delete, edit data. Is this true?

is the database on your local machine or are you trying to connect through remote machies. Remote connections will not be allowed.|||Local database that I will eventually deploy with the product for local use only.|||Try using User Instance=False. User Instance is a special feature in express edition that allows normal users to have owner privilges and I guess this is not what is require here.|||

When I turn User Instance Off I get the error:

"A database with the same name exists, or specified file cannot be opened, or it is located on UNC share."

I tried downloading SSEUtil to set enable user instances but the .exe doesn't work. It flashes a command window and shuts down. Any ideas on this?

|||

is it necessary to use to attachdb. I mean any specific reason. If not try connecting using a connection string like :

connectionString="Data Source=LPXP561;Initial Catalog=AdventureWorks;Integrated Security=True

|||Lot's of other options will work. I'm trying to use the new User Instance feature of SQL Sever Express. It requires the "attachbd" usage and User Instance = True. I can't get it to work as decribed in the documentation.|||

Have got the same problem: cant connect to user instance, since it is not enabled in express version by default..

can anybody suggest how to "Use sp_configure 'user instances enabled' ", where to type it.. or whatever..

|||Hi,

Open the SQL Server Management Studio Express. This is the downloadable program in the same site where you downloaded the SQL Server 2005 express used to manage SQL Server 2005 Express.
In the query editor type this text: exec sp_configure 'user instances enabled', 1.
Then type: Reconfigure.
Then restart the SQL Server database.

Good luck.

KaBalweg?|||

Hi DDH,

I know this is now several weeks after your posted problem, but I have exactly the same issue. Did the suggested solution resolve the problem?

Mike

|||Thanks kabalweg for the str8 forward solution to this issue. It worked for me and made complete sense as soon as I read it.|||it's really nice when someone gives you a straight answer!-)
this one got me going right away!
i was trying to connect to the DBs I'm building in SQL 2005.
"exec sp_configure 'user instances enabled', 1" got me started quickly.
heck! ...i might re-visit this forum!-)
|||God bless you mate, you gave me heaven on earth. wonderful, amazing, magical. It works like .....wawwwwwww|||woot!!dude..u simply rocks!!|||

Hi, I have been doing this, and in the query editor, it says it has been changed, and then restarted the server, but it neva worked.

So i tried it again (and the query results said changed from 1 to 1), but it still hasnt worked.

Have i configured the sql server incorrectly?

Please help

PS i have been restarting my sql service through the sql server configuration manager

Enable User Instances in SQL Server

I'm just starting out and trying to connect to my first database using the following string:

Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\RFPdb.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True

I get the following error during debug:

"Generating user instances in SQL Server is disabled. Use sp_configure 'user instances enabled' to generate user instances."

I've done this on every database - Master, Model, Tempdb, etc, and my database.

Still get the error. I may not be enabling it correctly. Any help would be appreciated.

The documentation suggests that I use user instances so that users without Admin rights can work with the database. Add, delete, edit data. Is this true?

is the database on your local machine or are you trying to connect through remote machies. Remote connections will not be allowed.|||Local database that I will eventually deploy with the product for local use only.|||Try using User Instance=False. User Instance is a special feature in express edition that allows normal users to have owner privilges and I guess this is not what is require here.|||

When I turn User Instance Off I get the error:

"A database with the same name exists, or specified file cannot be opened, or it is located on UNC share."

I tried downloading SSEUtil to set enable user instances but the .exe doesn't work. It flashes a command window and shuts down. Any ideas on this?

|||

is it necessary to use to attachdb. I mean any specific reason. If not try connecting using a connection string like :

connectionString="Data Source=LPXP561;Initial Catalog=AdventureWorks;Integrated Security=True

|||Lot's of other options will work. I'm trying to use the new User Instance feature of SQL Sever Express. It requires the "attachbd" usage and User Instance = True. I can't get it to work as decribed in the documentation.|||

Have got the same problem: cant connect to user instance, since it is not enabled in express version by default..

can anybody suggest how to "Use sp_configure 'user instances enabled' ", where to type it.. or whatever..

|||Hi,

Open the SQL Server Management Studio Express. This is the downloadable program in the same site where you downloaded the SQL Server 2005 express used to manage SQL Server 2005 Express.
In the query editor type this text: exec sp_configure 'user instances enabled', 1.
Then type: Reconfigure.
Then restart the SQL Server database.

Good luck.

KaBalweg?|||

Hi DDH,

I know this is now several weeks after your posted problem, but I have exactly the same issue. Did the suggested solution resolve the problem?

Mike

|||Thanks kabalweg for the str8 forward solution to this issue. It worked for me and made complete sense as soon as I read it.|||it's really nice when someone gives you a straight answer!-)
this one got me going right away!
i was trying to connect to the DBs I'm building in SQL 2005.
"exec sp_configure 'user instances enabled', 1" got me started quickly.
heck! ...i might re-visit this forum!-)
|||God bless you mate, you gave me heaven on earth. wonderful, amazing, magical. It works like .....wawwwwwww|||woot!!dude..u simply rocks!!|||

Hi, I have been doing this, and in the query editor, it says it has been changed, and then restarted the server, but it neva worked.

So i tried it again (and the query results said changed from 1 to 1), but it still hasnt worked.

Have i configured the sql server incorrectly?

Please help

PS i have been restarting my sql service through the sql server configuration manager

Enable User Instances in SQL Server

I'm just starting out and trying to connect to my first database using the following string:

Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\RFPdb.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True

I get the following error during debug:

"Generating user instances in SQL Server is disabled. Use sp_configure 'user instances enabled' to generate user instances."

I've done this on every database - Master, Model, Tempdb, etc, and my database.

Still get the error. I may not be enabling it correctly. Any help would be appreciated.

The documentation suggests that I use user instances so that users without Admin rights can work with the database. Add, delete, edit data. Is this true?

is the database on your local machine or are you trying to connect through remote machies. Remote connections will not be allowed.|||Local database that I will eventually deploy with the product for local use only.|||Try using User Instance=False. User Instance is a special feature in express edition that allows normal users to have owner privilges and I guess this is not what is require here.|||

When I turn User Instance Off I get the error:

"A database with the same name exists, or specified file cannot be opened, or it is located on UNC share."

I tried downloading SSEUtil to set enable user instances but the .exe doesn't work. It flashes a command window and shuts down. Any ideas on this?

|||

is it necessary to use to attachdb. I mean any specific reason. If not try connecting using a connection string like :

connectionString="Data Source=LPXP561;Initial Catalog=AdventureWorks;Integrated Security=True

|||Lot's of other options will work. I'm trying to use the new User Instance feature of SQL Sever Express. It requires the "attachbd" usage and User Instance = True. I can't get it to work as decribed in the documentation.|||

Have got the same problem: cant connect to user instance, since it is not enabled in express version by default..

can anybody suggest how to "Use sp_configure 'user instances enabled' ", where to type it.. or whatever..

|||Hi,

Open the SQL Server Management Studio Express. This is the downloadable program in the same site where you downloaded the SQL Server 2005 express used to manage SQL Server 2005 Express.
In the query editor type this text: exec sp_configure 'user instances enabled', 1.
Then type: Reconfigure.
Then restart the SQL Server database.

Good luck.

KaBalweg?|||

Hi DDH,

I know this is now several weeks after your posted problem, but I have exactly the same issue. Did the suggested solution resolve the problem?

Mike

|||Thanks kabalweg for the str8 forward solution to this issue. It worked for me and made complete sense as soon as I read it.|||it's really nice when someone gives you a straight answer!-)
this one got me going right away!
i was trying to connect to the DBs I'm building in SQL 2005.
"exec sp_configure 'user instances enabled', 1" got me started quickly.
heck! ...i might re-visit this forum!-)
|||God bless you mate, you gave me heaven on earth. wonderful, amazing, magical. It works like .....wawwwwwww|||woot!!dude..u simply rocks!!|||

Hi, I have been doing this, and in the query editor, it says it has been changed, and then restarted the server, but it neva worked.

So i tried it again (and the query results said changed from 1 to 1), but it still hasnt worked.

Have i configured the sql server incorrectly?

Please help

PS i have been restarting my sql service through the sql server configuration manager

Enable User Instances in SQL Server

I'm just starting out and trying to connect to my first database using the following string:

Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\RFPdb.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True

I get the following error during debug:

"Generating user instances in SQL Server is disabled. Use sp_configure 'user instances enabled' to generate user instances."

I've done this on every database - Master, Model, Tempdb, etc, and my database.

Still get the error. I may not be enabling it correctly. Any help would be appreciated.

The documentation suggests that I use user instances so that users without Admin rights can work with the database. Add, delete, edit data. Is this true?

is the database on your local machine or are you trying to connect through remote machies. Remote connections will not be allowed.|||Local database that I will eventually deploy with the product for local use only.|||Try using User Instance=False. User Instance is a special feature in express edition that allows normal users to have owner privilges and I guess this is not what is require here.|||

When I turn User Instance Off I get the error:

"A database with the same name exists, or specified file cannot be opened, or it is located on UNC share."

I tried downloading SSEUtil to set enable user instances but the .exe doesn't work. It flashes a command window and shuts down. Any ideas on this?

|||

is it necessary to use to attachdb. I mean any specific reason. If not try connecting using a connection string like :

connectionString="Data Source=LPXP561;Initial Catalog=AdventureWorks;Integrated Security=True

|||Lot's of other options will work. I'm trying to use the new User Instance feature of SQL Sever Express. It requires the "attachbd" usage and User Instance = True. I can't get it to work as decribed in the documentation.|||

Have got the same problem: cant connect to user instance, since it is not enabled in express version by default..

can anybody suggest how to "Use sp_configure 'user instances enabled' ", where to type it.. or whatever..

|||Hi,

Open the SQL Server Management Studio Express. This is the downloadable program in the same site where you downloaded the SQL Server 2005 express used to manage SQL Server 2005 Express.
In the query editor type this text: exec sp_configure 'user instances enabled', 1.
Then type: Reconfigure.
Then restart the SQL Server database.

Good luck.

KaBalweg?|||

Hi DDH,

I know this is now several weeks after your posted problem, but I have exactly the same issue. Did the suggested solution resolve the problem?

Mike

|||Thanks kabalweg for the str8 forward solution to this issue. It worked for me and made complete sense as soon as I read it.|||it's really nice when someone gives you a straight answer!-)
this one got me going right away!
i was trying to connect to the DBs I'm building in SQL 2005.
"exec sp_configure 'user instances enabled', 1" got me started quickly.
heck! ...i might re-visit this forum!-)
|||God bless you mate, you gave me heaven on earth. wonderful, amazing, magical. It works like .....wawwwwwww|||woot!!dude..u simply rocks!!|||

Hi, I have been doing this, and in the query editor, it says it has been changed, and then restarted the server, but it neva worked.

So i tried it again (and the query results said changed from 1 to 1), but it still hasnt worked.

Have i configured the sql server incorrectly?

Please help

PS i have been restarting my sql service through the sql server configuration manager

Enable User Instances in SQL Server

I'm just starting out and trying to connect to my first database using the following string:

Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\RFPdb.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True

I get the following error during debug:

"Generating user instances in SQL Server is disabled. Use sp_configure 'user instances enabled' to generate user instances."

I've done this on every database - Master, Model, Tempdb, etc, and my database.

Still get the error. I may not be enabling it correctly. Any help would be appreciated.

The documentation suggests that I use user instances so that users without Admin rights can work with the database. Add, delete, edit data. Is this true?

is the database on your local machine or are you trying to connect through remote machies. Remote connections will not be allowed.|||Local database that I will eventually deploy with the product for local use only.|||Try using User Instance=False. User Instance is a special feature in express edition that allows normal users to have owner privilges and I guess this is not what is require here.|||

When I turn User Instance Off I get the error:

"A database with the same name exists, or specified file cannot be opened, or it is located on UNC share."

I tried downloading SSEUtil to set enable user instances but the .exe doesn't work. It flashes a command window and shuts down. Any ideas on this?

|||

is it necessary to use to attachdb. I mean any specific reason. If not try connecting using a connection string like :

connectionString="Data Source=LPXP561;Initial Catalog=AdventureWorks;Integrated Security=True

|||Lot's of other options will work. I'm trying to use the new User Instance feature of SQL Sever Express. It requires the "attachbd" usage and User Instance = True. I can't get it to work as decribed in the documentation.|||

Have got the same problem: cant connect to user instance, since it is not enabled in express version by default..

can anybody suggest how to "Use sp_configure 'user instances enabled' ", where to type it.. or whatever..

|||Hi,

Open the SQL Server Management Studio Express. This is the downloadable program in the same site where you downloaded the SQL Server 2005 express used to manage SQL Server 2005 Express.
In the query editor type this text: exec sp_configure 'user instances enabled', 1.
Then type: Reconfigure.
Then restart the SQL Server database.

Good luck.

KaBalweg?|||

Hi DDH,

I know this is now several weeks after your posted problem, but I have exactly the same issue. Did the suggested solution resolve the problem?

Mike

|||Thanks kabalweg for the str8 forward solution to this issue. It worked for me and made complete sense as soon as I read it.|||it's really nice when someone gives you a straight answer!-)
this one got me going right away!
i was trying to connect to the DBs I'm building in SQL 2005.
"exec sp_configure 'user instances enabled', 1" got me started quickly.
heck! ...i might re-visit this forum!-)
|||God bless you mate, you gave me heaven on earth. wonderful, amazing, magical. It works like .....wawwwwwww|||woot!!dude..u simply rocks!!|||

Hi, I have been doing this, and in the query editor, it says it has been changed, and then restarted the server, but it neva worked.

So i tried it again (and the query results said changed from 1 to 1), but it still hasnt worked.

Have i configured the sql server incorrectly?

Please help

PS i have been restarting my sql service through the sql server configuration manager

Wednesday, February 15, 2012

empty cellset issue with mdx in reporting services 2005

Hi all,
I am using reporting services 2005 based on analysis services 2005 cubes
datasource. I use oledb provider and connect to analysis services 9.0. I am
writing an expression in dataset which will evaluate to mdx query during
runtime. Now the issue is if the generated dynamic query cannot product even
a single row because of slicer, then I get an ugly error message.
If in a sql statement, the where clause we include make the query return
zero rows, then you wont see any data for your report, but you dont see an
error. But here in RS with mdx, you are getting error. How to avoid this? Is
there any work around available to solve this issue while creating datasets.
Thanks.Hello,
Thank you for your post in MSDN newsgroup!
To understand the issue better, I'd like to know the following information:
1. What is the exact error message you encountered? Is is saying there are
multiple measures in the WHERE clause even though there is only one
measure? If so, this shall be known issue in AS 2005.
2. Does the issue occur if you run the MDX directly on SSMS? If you use
"Microsoft SQL Server Analysis Services" instead of OlEDB provider for
Analysis Service, does the issue still occur?
3. If the error message is different from that mentioned above, will you
provide us a simple sample project by using Adventure works sample
database, so that we may be able to reproduce the issue on our side? YOu
could send it to me at petery@.microsoft.com.
If you have other related information, please also let's know.
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
=====================================================
Microsoft Online Community Support
==================================================Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications
<http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx>.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
<http://msdn.microsoft.com/subscriptions/support/default.aspx>.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi,
Just want to check in if you have further questions on the issue. Please
feel free to post back if need any help.
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================