Showing posts with label old. Show all posts
Showing posts with label old. Show all posts

Friday, March 30, 2012

How to rename a table ?

Hi all.

I'm porting an application from eVB-ADOCE to VB.Net-SQL CE

In the old application there are some SQL statements like this:

"ALTER TABLE OldTable TO NewTable"

Is there an equivalent instruction or a simple way to rename a table?

I was not able to find anything simple to do the same.

I really need NOT to do something like

SELECT * INTO NewTable FROM OldTable

because the resulting table could go outside memory and/or spend too much time in elaboration.

Please let me know what I can do.

Many thanks !

As far as I know, there is no such option from SQL. But you can rename a table (and a table column) using OLE DB:

QA: How do I rename a SQL CE table?

|||This is very interesting, and I read your article, but I'm so ignorant in C++ that I've not been able to translate your code in VB. |||

Don't worry - I'm working on an article that will allow you to do this from .NET CF on a device. I will post this article either today or tomorrow.

|||

Jo?o Paulo Figueira wrote:

Don't worry - I'm working on an article that will allow you to do this from .NET CF on a device. I will post this article either today or tomorrow.

That will be wonderful !

|||

As promised, here is the article:

Renaming a SQL CE Table From a .NET CF Application

|||

Joao Paulo,

I don't know how to say "thank you" for your kindness. I'm going to use your work just now.

If you come to Milano (Italy), please let me know ! I shall organize a good dinner for you

Thank you very much again !

Wednesday, March 28, 2012

How to remove a registered Server ?

We have removed an old SQL Server from our network.
However in Enterprise Manager, the Server is still
listed. The status is "SQL Serve does not exist".
We would like to know how can we remove it from the list.
This is because when we attempt to select it and click the
right hand button of the mouse, there is no response in
Enterprise Manager.
Thank you for your help.
To remove a registered server running SQL Server:
1.Expand a server group, and then right-click a server.
2.Click Delete SQL Server Registration.
3.Confirm the deletion.
You might have to wait a while to get a response (context window to
open), if u have a slow/overloaded PC and/or network
|||Another alternative could also be to delete the registry entry for that
specific server. If you go to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL
Server\80\Tools\SQLEW\Registered Servers X , you can finde your server and
delete the key.
I often find that when the server isn't available, it takes quite some time
before you get the "Delete" option when you right-click on the server in EM.
I agree with naz that it's the best way to delete it, but the registry key
deletion will also do the trick.
Regards
Steen
naz wrote:
> To remove a registered server running SQL Server:
> 1.Expand a server group, and then right-click a server.
> 2.Click Delete SQL Server Registration.
> 3.Confirm the deletion.
> You might have to wait a while to get a response (context window to
> open), if u have a slow/overloaded PC and/or network

How to remove a registered Server ?

We have removed an old SQL Server from our network.
However in Enterprise Manager, the Server is still
listed. The status is "SQL Serve does not exist".
We would like to know how can we remove it from the list.
This is because when we attempt to select it and click the
right hand button of the mouse, there is no response in
Enterprise Manager.
Thank you for your help.To remove a registered server running SQL Server:
1.Expand a server group, and then right-click a server.
2.Click Delete SQL Server Registration.
3.Confirm the deletion.
You might have to wait a while to get a response (context window to
open), if u have a slow/overloaded PC and/or network|||Another alternative could also be to delete the registry entry for that
specific server. If you go to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL
Server\80\Tools\SQLEW\Registered Servers X , you can finde your server and
delete the key.
I often find that when the server isn't available, it takes quite some time
before you get the "Delete" option when you right-click on the server in EM.
I agree with naz that it's the best way to delete it, but the registry key
deletion will also do the trick.
Regards
Steen
naz wrote:
> To remove a registered server running SQL Server:
> 1.Expand a server group, and then right-click a server.
> 2.Click Delete SQL Server Registration.
> 3.Confirm the deletion.
> You might have to wait a while to get a response (context window to
> open), if u have a slow/overloaded PC and/or network

How to remove a registered Server ?

We have removed an old SQL Server from our network.
However in Enterprise Manager, the Server is still
listed. The status is "SQL Serve does not exist".
We would like to know how can we remove it from the list.
This is because when we attempt to select it and click the
right hand button of the mouse, there is no response in
Enterprise Manager.
Thank you for your help.To remove a registered server running SQL Server:
1.Expand a server group, and then right-click a server.
2.Click Delete SQL Server Registration.
3.Confirm the deletion.
You might have to wait a while to get a response (context window to
open), if u have a slow/overloaded PC and/or network|||Another alternative could also be to delete the registry entry for that
specific server. If you go to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Mi
crosoft SQL
Server\80\Tools\SQLEW\Registered Servers X , you can finde your server and
delete the key.
I often find that when the server isn't available, it takes quite some time
before you get the "Delete" option when you right-click on the server in EM.
I agree with naz that it's the best way to delete it, but the registry key
deletion will also do the trick.
Regards
Steen
naz wrote:
> To remove a registered server running SQL Server:
> 1.Expand a server group, and then right-click a server.
> 2.Click Delete SQL Server Registration.
> 3.Confirm the deletion.
> You might have to wait a while to get a response (context window to
> open), if u have a slow/overloaded PC and/or networksql