smo create database object

  • Thread starter Thread starter Martin
  • Start date Start date
M

Martin

Hello

Does anyone know if it is possible to use the smo db.Create() method to
create a new sql server database with sql server 2005 express? The debugger
complains that remote operations are not allowed with the default install of
sql server express.

Thank you

Martin
 
hi Martin,
Does anyone know if it is possible to use the smo db.Create() method to
create a new sql server database with sql server 2005 express? The debugger
complains that remote operations are not allowed with the default install of
sql server express.
That is correct, you have to enable it first using the Surface tool.

mfG
--> stefan <--
 
Stefan Hoffmann said:
hi Martin,

That is correct, you have to enable it first using the Surface tool.

mfG
--> stefan <--

Thanks Stefan

I've tried the surface area configuration tool, but the database engine
settings pages states sql server express version can only be run in local
mode. Is there another surface tool I'm not aware of?

I'm only trying to use smo with my databases on my local c disk, so I'm not
sure why smo needs remote connectivity to do this?

Martin
 
Martin said:
Thanks Stefan

I've tried the surface area configuration tool, but the database engine
settings pages states sql server express version can only be run in local
mode. Is there another surface tool I'm not aware of?

I'm only trying to use smo with my databases on my local c disk, so I'm
not sure why smo needs remote connectivity to do this?

Martin

It considers anything outside the database to be a remote connection.

When you run the Surface Area Configuration, and you go into Services and
Connections, and click on your database, does it show a line for "Remote
Connections" ? Set it to accept local and remote connections.

Robin S.
 
RobinS said:
It considers anything outside the database to be a remote connection.

When you run the Surface Area Configuration, and you go into Services and
Connections, and click on your database, does it show a line for "Remote
Connections" ? Set it to accept local and remote connections.

Robin S.

Thank you Robin

Yes it does show a 'remote connections' line but enabling this option didn't
work. I'll try re-installing the express version and selecting the 'mixed
mode' option to see if that helps.

Cheers, Martin
 
Martin said:
Thank you Robin

Yes it does show a 'remote connections' line but enabling this option
didn't
work. I'll try re-installing the express version and selecting the 'mixed
mode' option to see if that helps.

Cheers, Martin

Isn't there another line under that one that says something about Piped or
TCP/IP connections? I have both enabled.

Good luck.
Robin S.
 
RobinS said:
Isn't there another line under that one that says something about Piped or
TCP/IP connections? I have both enabled.

Good luck.
Robin S.

Thank you Robin

As it turns out, the 'remote connections not allowed' error message was not
the cause of my problem. I spent a day trying every surface area setting and
reinstalling but the problem was actually fixed by correcting an error in my
connection string.

Smo is working fine now with my server in local mode only and I am able to
create database and tables via csharp code.

Cheers, Martin
 
Martin said:
Thank you Robin

As it turns out, the 'remote connections not allowed' error message was
not the cause of my problem. I spent a day trying every surface area
setting and reinstalling but the problem was actually fixed by correcting
an error in my connection string.

Smo is working fine now with my server in local mode only and I am able
to create database and tables via csharp code.

Cheers, Martin
Yay! Congratulations.
Robin S.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top