Showing posts with label basically. Show all posts
Showing posts with label basically. Show all posts

Thursday, March 22, 2012

Cannot open user default database - login failed

Hey,

I renamed a database, and it happened to be my default; so I basically screwed myself, because I can't change it through script (doesn't exist or you don't have permissions). What can I do?

Thanks.

Well do you have another database?

If you do then on the connect screen click the "options" button and pick the other database in the drop down list. Then you can log in and change your default.

|||

Hey,

I do, but still no result; because of the default database problem, as I go to connect, it gives me that error... I don't have the option to even try that unfortunately. Any other ideas?

Thanks.

|||

Well what database are you using? Sql Server 2005, 2000?

Anyway, I had the same problem as you, but I changed my default database from outside SqlServer using the DOS Command prompt.

The method to do this is here. It's pretty simple and easy.


http://support.microsoft.com/?kbid=307864

|||

If you're using SQL2005, open Management Studio->new a query (connect to Database Engine)->modify Options, change 'Connect to database' DropdownList to a valid database name (choose one your account can access)->Connect-> Execute the following system procedure:

sp_defaultdb 'youlogin','newdefaultdatabasename'

If you're using SQL2000 Query Analyzer, enter something like 'SQLInstanceName;database=dbname' in the 'SQL Server' textbox and connect, then execute the system procedure as above.

Saturday, February 25, 2012

Cannot install or uninstall

We have a 2003 server with SQL Server 2005.
Our instance in SRS was playing up basically so I uninstalled it.
When I now try to reinstall via the original CD it still thinks the product
is installed. If I try to uninstall it tells me no features have changed
and exits.
When I try to reinstall or uninstall via control panel and changing the
items installed and that gives me an error of "Could not find a package to
install on the installation media".
Any help would be appreciated.
ChubblyI have now completely removed the instance of SQL Server, run a registry
cleaner to remove any erroneous entries and then tried to reinstall SQL
Server. It still thinks however that Reporting Services are already there.
I continued with the installation which threw up numerous other errors,
installed the SQL 2005 patch from Microsoft update and then tried to change
the installed components of SQL Server. To no avail. I still receive
"Could not find a package to install on the installation media".
If I try to manually run the SqlRun_RS.msi file I get the following error:
"An instance with the same name is already installed on this computer. To
proceed with SQL Server Setup, provide a unique instance name."
I'm stumped and don't particularly want to have to rebuild the whole server.
Chubbly
"Chubbly Geezer" <chubbly_geezer@.newsgroup.nospam> wrote in message
news:eyJQY9wPHHA.4484@.TK2MSFTNGP02.phx.gbl...
> We have a 2003 server with SQL Server 2005.
> Our instance in SRS was playing up basically so I uninstalled it.
> When I now try to reinstall via the original CD it still thinks the
> product is installed. If I try to uninstall it tells me no features have
> changed and exits.
> When I try to reinstall or uninstall via control panel and changing the
> items installed and that gives me an error of "Could not find a package to
> install on the installation media".
> Any help would be appreciated.
> Chubbly
>
>