Link to home
Start Free TrialLog in
Avatar of seanfoord
seanfoordFlag for Australia

asked on

SQL Server Management Studio Express

We have SQL 2000 & SQL 2005 installed on our server (SBS 2003) running different databases, I can connect to the SQL 2000 databases using SQL Server Management studio express but I cannot connect to SQL 2005, basically I need to remove a database from the SQL 2005 instance but I am unable to connect to it, is there a way to do this?

Thanks for your help
Avatar of Anthony Perkins
Anthony Perkins
Flag of United States of America image

Have you enabled remote access on the SQL Server 2005 box?
Avatar of seanfoord

ASKER

Thanks for the quick response, the SBS2003 has remote access enabled, I use the to remotely log in.
 
Seems like you have installed SQL Server 2005 express in your machine as a Named instance..
Named instances can be accessed by typing either

servername\instancename
or
serverip\instancename

and you can find the instance in either services.msc or SQL Server Configuration manager..
rrjeqan17,
Thankyou for the solution, that worked!
This has unfortunately led into another problem, I receive an error message saying "cannot connect to server\arcserve_db. All I want to do is remove this database from our system as the related software is uninstalled & it was unable to remove the DB instance during the uninstall program, do you know of any way to remove this db from SQL server 2005 express
Thanks
 
 at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)
   at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
   at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
   at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
   at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
   at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
   at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
   at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
   at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
   at System.Data.SqlClient.SqlConnection.Open()
   at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ObjectExplorer.ValidateConnection(UIConnectionInfo ci, IServerType server)
   at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()
>> All I want to do is remove this database from our system as the related software is uninstalled & it was unable to remove the DB instance during the uninstall program, do you know of any way to remove this db from SQL server 2005 express

Just go to Control Panel -> Add/ Remove Programs and you would be able to uninstall Express version of SQL Server 2005..

If you don't find any entries in Control Panel, then you can uninstall Express Edition using the Windows Installer Cleanup Utility Tool from here:

http://support.microsoft.com/kb/290301

If both didn't work, the the manual approach to remove the instance below:

http://support.microsoft.com/kb/909967
Thanks again for your quick response & help, the SQL 2005 DB has another DB being used in it for another program, I really would like to just delete the one DB instance inside SQL 2005 if that makes sense & not remove the program
 
>> I really would like to just delete the one DB instance inside SQL 2005

Kindly confirm whether you meant

* One database within a instance
* One SQL Server 2005 instance among two SQL Server 2005 instances..

I am asking this because it contradicts with the original question which states that you have two instances one is 2000 and the other is 2005 and need to remove 2005 instance alone..

If you meant the first one, ie., deleting the database in a database then you can do it via a Drop database statement.

If you meant the second one, then go to add/ remove programs and then click on Uninstall SQL Server 2005 and it would ask you whether you need to uninstall a instance or the complete installation.. Just provide the instance name correctly to remove that installation..

Hope this clarifies..
I know this sounds confusing, we do have 2 sql instances on our server (sbs2003)
1. Sql 2000 standard which has 5 databases inside it (remains as is)
2. Sql 2005 express which has 2 databases inside it ( I would like to remove one of the databases from this version of SQL but leave the program installed on our system with the other database operational)
Thanks heaps for your patience, I have very little understanding of SQL
That clarifies..
Just remove the unnecessary databases by either using DROP DATABASE statements like

USE master
GO
DROP DATABASE ur_database_name
GO

where ur_database_name is the database you tried to remove

Or a simple way by using SQL Server Management Studio Express..
Just right click on that database and choose Delete..

It would do.
I tried using the SQL Management Studio express to delete the database and I received the error  in message ID: 26280601 above, in the example you mentioned in your last post  "USE master etc..." do I create a batch file (.bat)  & execute it?
Ok.. Just try this one out..

1. Go to services.msc and check whether this Express instance is up and running. If not then start it out..
2. Login using sa or any other administrator credentials to this instance.
3. Try dropping the database again.

Make sure:

1. SQL Browser service is up and running.
2. The login you use has necessary privileges to drop that database.
The Express instance of the database "arcserve_db" is not running and will not start. There are a number of errors in the log file which I have shown below,.

erver TCP provider failed to listen on [ 'any' <ipv4> 1433]. Tcp port is already in use.
For more information, see Help and Support Center at  

TDSSNIClient initialization failed with error 0x2740, status code 0xa.
For more information, see Help and Support Center at  

SQL Server could not spawn FRunCM thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.
 
Could not start the network library because of an internal error in the network library. To determine the cause, review the errors immediately preceding this one in the error log.
ASKER CERTIFIED SOLUTION
Avatar of Raja Jegan R
Raja Jegan R
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That worked a charm, there are no error logs & I can now connect to any database instance.
Thanks rrjegan17  for all you help and time
Welcome..
And glad to help you out..