Showing posts with label deleting. Show all posts
Showing posts with label deleting. Show all posts

Monday, March 26, 2012

Problems deleting transaction log files older than x days

Hi,
I have a problem with maintainance plans an deleting
transaction log files older than x days. I have made one
maintainance plan for databases and that one works.
But the one made for the transaction log doesn't delete
the old files. They remain and aren't deleted
automatically.
brgds
PeterBelow KB might help:
http://support.microsoft.com/defaul...2&Product=sql2k
Also, check out below great troubleshooting suggestions from Bill H at MS:
-- Log files don't delete --
This is likely to be either a permissions problem or a sharing violation
problem. The maintenance plan is run as a job, and jobs are run by the
SQLServerAgent service.
Permissions:
1. Determine the startup account for the SQLServerAgent service
(Start|Programs|Administrative tools|Services|SQLServerAgent|Startup). This
account is the security context for jobs, and thus the maintenance plan.
2. If SQLServerAgent is started using LocalSystem (as opposed to a domain
account) then skip step 3.
3. On that box, log onto NT as that account. Using Explorer, attempt to
delete an expired backup. If that succeeds then go to Sharing Violation
section.
4. Log onto NT with an account that is an administrator and use Explorer to
look at the Properties|Security of the folder (where the backups reside)
and ensure the SQLServerAgent startup account has Full Control. If the
SQLServerAgent startup account is LocalSystem, then the account to consider
is SYSTEM.
5. In NT, if an account is a member of an NT group, and if that group has
Access is Denied, then that account will have Access is Denied, even if
that account is also a member of the Administrators group. Thus you may
need to check group permissions (if the Startup Account is a member of a
group).
6. Keep in mind that permissions (by default) are inherited from a parent
folder. Thus, if the backups are stored in C:\bak, and if someone had
denied permission to the SQLServerAgent startup account for C:\, then
C:\bak will inherit access is denied.
Sharing violation:
This is likely to be rooted in a timing issue, with the most likely cause
being another scheduled process (such as NT Backup or Anti-Virus software)
having the backup file open at the time when the SQLServerAgent (i.e., the
maintenance plan job) tried to delete it.
1. Download filemon and handle from www.sysinternals.com.
2. I am not sure whether filemon can be scheduled, or you might be able to
use NT scheduling services to start filemon just before the maintenance
plan job is started, but the filemon log can become very large, so it would
be best to start it some short time before the maintenance plan starts.
3. Inspect the filemon log for another process that has that backup file
open (if your lucky enough to have started filemon before this other
process grabs the backup folder), and inspect the log for the results when
the SQLServerAgent agent attempts to open that same file.
4. Schedule the job or that other process to do their work at different
times.
5. You can use the handle utility if you are around at the time when the
job is scheduled to run.
If the backup files are going to a \\share or a mapped drive (as opposed to
local drive), then you will need to modify the above (with respect to where
the tests and utilities are run).
Finally, inspection of the maintenance plan's history report might be
useful.
Thanks,
Bill Hollinshead
Microsoft, SQL Server
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Peter Junell" <peter.junell@.silverhuset.se> wrote in message
news:9b0601c405c2$d5967c20$a101280a@.phx.gbl...
> Hi,
> I have a problem with maintainance plans an deleting
> transaction log files older than x days. I have made one
> maintainance plan for databases and that one works.
> But the one made for the transaction log doesn't delete
> the old files. They remain and aren't deleted
> automatically.
> brgds
> Peter

Problems deleting SQL.LOG file

Hi,

I can not delete this file from C/Windows/Temp directory, all other files form that foder I can delete. The error message I get is that something else is using this file. The thing is I cant find what is using it, even though I uninstaled SQL Server 2005 completely. I have tried lots of things, nothing helps. At the end I entered windows in SAFE MODE, went to Computer Management and disabled almost every service I can, that might be using it, and still cant get rid of this SQL.LOG which is 26GB now. The only thing I could do is to compress the file and now it is 6.5GB.

Txs for the help..

This file is a result of ODBC tracing. Here's the article about how to delete it.

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

Thanks,
Sam Lester (MSFT)

Problems deleting a column from SQL2000

Hello,
I'm trying to delete an existing varchar(10) column called "abc1" o in a
table on a SQL 2000 database and I'm getting the following error message in
Enterprise Manager.:
'web_cartOrders' table
- Unable to modify table.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Line
2: Incorrect
syntax near 'abc1'.
I tried to delete it from SQL Analyzer directly from the server's console,
but I'm getting a similar error: "Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'abc1'."
I tried to rename, change data type and size of the data type of the column,
but still could not delete it.
Any thoughts?
Thanksmight be worth running Profiler to capture the SQL that is getting issued /
generated by Enterprise Manager just to try and see whats going on
Andy.
"Vi" <Vi@.discussions.microsoft.com> wrote in message
news:B221D62F-4C50-4DEB-96F0-766AE8B7D8EF@.microsoft.com...
> Hello,
> I'm trying to delete an existing varchar(10) column called "abc1" o in a
> table on a SQL 2000 database and I'm getting the following error message
in
> Enterprise Manager.:
> 'web_cartOrders' table
> - Unable to modify table.
> ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 2:[/vb
col]
Incorrect[vbcol=seagreen]
> syntax near 'abc1'.
>
> I tried to delete it from SQL Analyzer directly from the server's console,
> but I'm getting a similar error: "Server: Msg 170, Level 15, State 1, Line
1
> Line 1: Incorrect syntax near 'abc1'."
> I tried to rename, change data type and size of the data type of the
column,
> but still could not delete it.
> Any thoughts?
> Thanks|||Check your database compatibility level. I know some people
have hit the error when it's set to 64. You can execute
sp_dbcmptlevel to check it.
-Sue
On Tue, 10 Aug 2004 15:25:04 -0700, "Vi"
<Vi@.discussions.microsoft.com> wrote:

>Hello,
>I'm trying to delete an existing varchar(10) column called "abc1" o in a
>table on a SQL 2000 database and I'm getting the following error message in
>Enterprise Manager.:
>'web_cartOrders' table
>- Unable to modify table.
>ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Line
2: Incorrect
>syntax near 'abc1'.
>
>I tried to delete it from SQL Analyzer directly from the server's console,
>but I'm getting a similar error: "Server: Msg 170, Level 15, State 1, Line
1
>Line 1: Incorrect syntax near 'abc1'."
>I tried to rename, change data type and size of the data type of the column
,
>but still could not delete it.
>Any thoughts?
>Thanks

Friday, March 23, 2012

Problems deleting a column from SQL2000

Hello,
I'm trying to delete an existing varchar(10) column called "abc1" o in a
table on a SQL 2000 database and I'm getting the following error message in
Enterprise Manager.:
'web_cartOrders' table
- Unable to modify table.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 2: Incorrect
syntax near 'abc1'.
I tried to delete it from SQL Analyzer directly from the server's console,
but I'm getting a similar error: "Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'abc1'."
I tried to rename, change data type and size of the data type of the column,
but still could not delete it.
Any thoughts?
Thanks
might be worth running Profiler to capture the SQL that is getting issued /
generated by Enterprise Manager just to try and see whats going on
Andy.
"Vi" <Vi@.discussions.microsoft.com> wrote in message
news:B221D62F-4C50-4DEB-96F0-766AE8B7D8EF@.microsoft.com...
> Hello,
> I'm trying to delete an existing varchar(10) column called "abc1" o in a
> table on a SQL 2000 database and I'm getting the following error message
in
> Enterprise Manager.:
> 'web_cartOrders' table
> - Unable to modify table.
> ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 2:
Incorrect
> syntax near 'abc1'.
>
> I tried to delete it from SQL Analyzer directly from the server's console,
> but I'm getting a similar error: "Server: Msg 170, Level 15, State 1, Line
1
> Line 1: Incorrect syntax near 'abc1'."
> I tried to rename, change data type and size of the data type of the
column,
> but still could not delete it.
> Any thoughts?
> Thanks
|||Check your database compatibility level. I know some people
have hit the error when it's set to 64. You can execute
sp_dbcmptlevel to check it.
-Sue
On Tue, 10 Aug 2004 15:25:04 -0700, "Vi"
<Vi@.discussions.microsoft.com> wrote:

>Hello,
>I'm trying to delete an existing varchar(10) column called "abc1" o in a
>table on a SQL 2000 database and I'm getting the following error message in
>Enterprise Manager.:
>'web_cartOrders' table
>- Unable to modify table.
>ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 2: Incorrect
>syntax near 'abc1'.
>
>I tried to delete it from SQL Analyzer directly from the server's console,
>but I'm getting a similar error: "Server: Msg 170, Level 15, State 1, Line 1
>Line 1: Incorrect syntax near 'abc1'."
>I tried to rename, change data type and size of the data type of the column,
>but still could not delete it.
>Any thoughts?
>Thanks
sql

Problems deleting a column

Hello,
I'm trying to delete an existing varchar(10) column called "abc1" o in a
table on a SQL 2000 database and I'm getting the following error message in
Enterprise Manager.:
'myTable' table
- Unable to modify table.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 2: Incorrect
syntax near 'abc1'.
I tried to delete it from SQL Analyzer directly from the server's console,
but I'm getting a similar error: "Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'abc1'."
I tried to rename, change data type and size of the data type of the column,
but still could not delete it.
Any thoughts?
ThanksOn Tue, 10 Aug 2004 15:25:01 -0700, Vi wrote:
>Hello,
>I'm trying to delete an existing varchar(10) column called "abc1" o in a
>table on a SQL 2000 database and I'm getting the following error message in
>Enterprise Manager.:
>'myTable' table
>- Unable to modify table.
>ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 2: Incorrect
>syntax near 'abc1'.
>
>I tried to delete it from SQL Analyzer directly from the server's console,
>but I'm getting a similar error: "Server: Msg 170, Level 15, State 1, Line 1
>Line 1: Incorrect syntax near 'abc1'."
>I tried to rename, change data type and size of the data type of the column,
>but still could not delete it.
>Any thoughts?
>Thanks
Hi Vi,
You forgot to include the code you executed in query analyzer when you got
this error message.
Dropping the column abc1 from table myTable should be possible with the
following statement:
ALTER TABLE myTable
DROP COLUMN abc1
(untested)
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||The code is:
--
USE myDatabase
go
ALTER TABLE dbo.myTable DROP COLUMN abc1
go
--
"Hugo Kornelis" wrote:
> On Tue, 10 Aug 2004 15:25:01 -0700, Vi wrote:
> >Hello,
> >I'm trying to delete an existing varchar(10) column called "abc1" o in a
> >table on a SQL 2000 database and I'm getting the following error message in
> >Enterprise Manager.:
> >
> >'myTable' table
> >- Unable to modify table.
> >ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 2: Incorrect
> >syntax near 'abc1'.
> >
> >
> >I tried to delete it from SQL Analyzer directly from the server's console,
> >but I'm getting a similar error: "Server: Msg 170, Level 15, State 1, Line 1
> >Line 1: Incorrect syntax near 'abc1'."
> >
> >I tried to rename, change data type and size of the data type of the column,
> >but still could not delete it.
> >
> >Any thoughts?
> >Thanks
> Hi Vi,
> You forgot to include the code you executed in query analyzer when you got
> this error message.
> Dropping the column abc1 from table myTable should be possible with the
> following statement:
> ALTER TABLE myTable
> DROP COLUMN abc1
> (untested)
> Best, Hugo
> --
> (Remove _NO_ and _SPAM_ to get my e-mail address)
>|||Perhaps your database is set to a pre 70 compatibility level. You can check
this with:
EXEC sp_dbcmptlevel 'myDatabase'
And set it with:
EXEC sp_dbcmptlevel 'myDatabase', 80
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Vi" <Vi@.discussions.microsoft.com> wrote in message
news:EA353C88-D7EC-46BB-A31A-F748F87B40FE@.microsoft.com...
> The code is:
> --
> USE myDatabase
> go
> ALTER TABLE dbo.myTable DROP COLUMN abc1
> go
> --
> "Hugo Kornelis" wrote:
> > On Tue, 10 Aug 2004 15:25:01 -0700, Vi wrote:
> >
> > >Hello,
> > >I'm trying to delete an existing varchar(10) column called "abc1" o in
a
> > >table on a SQL 2000 database and I'm getting the following error
message in
> > >Enterprise Manager.:
> > >
> > >'myTable' table
> > >- Unable to modify table.
> > >ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 2:
Incorrect
> > >syntax near 'abc1'.
> > >
> > >
> > >I tried to delete it from SQL Analyzer directly from the server's
console,
> > >but I'm getting a similar error: "Server: Msg 170, Level 15, State 1,
Line 1
> > >Line 1: Incorrect syntax near 'abc1'."
> > >
> > >I tried to rename, change data type and size of the data type of the
column,
> > >but still could not delete it.
> > >
> > >Any thoughts?
> > >Thanks
> >
> > Hi Vi,
> >
> > You forgot to include the code you executed in query analyzer when you
got
> > this error message.
> >
> > Dropping the column abc1 from table myTable should be possible with the
> > following statement:
> >
> > ALTER TABLE myTable
> > DROP COLUMN abc1
> > (untested)
> >
> > Best, Hugo
> > --
> >
> > (Remove _NO_ and _SPAM_ to get my e-mail address)
> >|||What do you mean that you tried to change the data type and size of the
column? Were you able to do that? Or did you get error messages for those
operations also.
--
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Vi" <Vi@.discussions.microsoft.com> wrote in message
news:9F0BD776-CA70-42C4-92D6-0338228817EA@.microsoft.com...
> Hello,
> I'm trying to delete an existing varchar(10) column called "abc1" o in a
> table on a SQL 2000 database and I'm getting the following error message
in
> Enterprise Manager.:
> 'myTable' table
> - Unable to modify table.
> ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 2:
Incorrect
> syntax near 'abc1'.
>
> I tried to delete it from SQL Analyzer directly from the server's console,
> but I'm getting a similar error: "Server: Msg 170, Level 15, State 1, Line
1
> Line 1: Incorrect syntax near 'abc1'."
> I tried to rename, change data type and size of the data type of the
column,
> but still could not delete it.
> Any thoughts?
> Thanks

Problems deleting a column

Hello,
I'm trying to delete an existing varchar(10) column called "abc1" o in a
table on a SQL 2000 database and I'm getting the following error message in
Enterprise Manager.:
'myTable' table
- Unable to modify table.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Line
2: Incorrect
syntax near 'abc1'.
I tried to delete it from SQL Analyzer directly from the server's console,
but I'm getting a similar error: "Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'abc1'."
I tried to rename, change data type and size of the data type of the column,
but still could not delete it.
Any thoughts?
ThanksOn Tue, 10 Aug 2004 15:25:01 -0700, Vi wrote:

>Hello,
>I'm trying to delete an existing varchar(10) column called "abc1" o in a
>table on a SQL 2000 database and I'm getting the following error message in
>Enterprise Manager.:
>'myTable' table
>- Unable to modify table.
>ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Line
2: Incorrect
>syntax near 'abc1'.
>
>I tried to delete it from SQL Analyzer directly from the server's console,
>but I'm getting a similar error: "Server: Msg 170, Level 15, State 1, Line
1
>Line 1: Incorrect syntax near 'abc1'."
>I tried to rename, change data type and size of the data type of the column
,
>but still could not delete it.
>Any thoughts?
>Thanks
Hi Vi,
You forgot to include the code you executed in query analyzer when you got
this error message.
Dropping the column abc1 from table myTable should be possible with the
following statement:
ALTER TABLE myTable
DROP COLUMN abc1
(untested)
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||The code is:
--
USE myDatabase
go
ALTER TABLE dbo.myTable DROP COLUMN abc1
go
--
"Hugo Kornelis" wrote:

> On Tue, 10 Aug 2004 15:25:01 -0700, Vi wrote:
>
> Hi Vi,
> You forgot to include the code you executed in query analyzer when you got
> this error message.
> Dropping the column abc1 from table myTable should be possible with the
> following statement:
> ALTER TABLE myTable
> DROP COLUMN abc1
> (untested)
> Best, Hugo
> --
> (Remove _NO_ and _SPAM_ to get my e-mail address)
>|||Perhaps your database is set to a pre 70 compatibility level. You can check
this with:
EXEC sp_dbcmptlevel 'myDatabase'
And set it with:
EXEC sp_dbcmptlevel 'myDatabase', 80
Hope this helps.
Dan Guzman
SQL Server MVP
"Vi" <Vi@.discussions.microsoft.com> wrote in message
news:EA353C88-D7EC-46BB-A31A-F748F87B40FE@.microsoft.com...[vbcol=seagreen]
> The code is:
> --
> USE myDatabase
> go
> ALTER TABLE dbo.myTable DROP COLUMN abc1
> go
> --
> "Hugo Kornelis" wrote:
>
a[vbcol=seagreen]
message in[vbcol=seagreen]
Incorrect[vbcol=seagreen]
console,[vbcol=seagreen]
Line 1[vbcol=seagreen]
column,[vbcol=seagreen]
got[vbcol=seagreen]|||What do you mean that you tried to change the data type and size of the
column? Were you able to do that? Or did you get error messages for those
operations also.
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Vi" <Vi@.discussions.microsoft.com> wrote in message
news:9F0BD776-CA70-42C4-92D6-0338228817EA@.microsoft.com...
> Hello,
> I'm trying to delete an existing varchar(10) column called "abc1" o in a
> table on a SQL 2000 database and I'm getting the following error message
in
> Enterprise Manager.:
> 'myTable' table
> - Unable to modify table.
> ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 2:[/vb
col]
Incorrect[vbcol=seagreen]
> syntax near 'abc1'.
>
> I tried to delete it from SQL Analyzer directly from the server's console,
> but I'm getting a similar error: "Server: Msg 170, Level 15, State 1, Line
1
> Line 1: Incorrect syntax near 'abc1'."
> I tried to rename, change data type and size of the data type of the
column,
> but still could not delete it.
> Any thoughts?
> Thanks

Problems deleting a column

Hello,
I'm trying to delete an existing varchar(10) column called "abc1" o in a
table on a SQL 2000 database and I'm getting the following error message in
Enterprise Manager.:
'myTable' table
- Unable to modify table.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 2: Incorrect
syntax near 'abc1'.
I tried to delete it from SQL Analyzer directly from the server's console,
but I'm getting a similar error: "Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'abc1'."
I tried to rename, change data type and size of the data type of the column,
but still could not delete it.
Any thoughts?
Thanks
On Tue, 10 Aug 2004 15:25:01 -0700, Vi wrote:

>Hello,
>I'm trying to delete an existing varchar(10) column called "abc1" o in a
>table on a SQL 2000 database and I'm getting the following error message in
>Enterprise Manager.:
>'myTable' table
>- Unable to modify table.
>ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 2: Incorrect
>syntax near 'abc1'.
>
>I tried to delete it from SQL Analyzer directly from the server's console,
>but I'm getting a similar error: "Server: Msg 170, Level 15, State 1, Line 1
>Line 1: Incorrect syntax near 'abc1'."
>I tried to rename, change data type and size of the data type of the column,
>but still could not delete it.
>Any thoughts?
>Thanks
Hi Vi,
You forgot to include the code you executed in query analyzer when you got
this error message.
Dropping the column abc1 from table myTable should be possible with the
following statement:
ALTER TABLE myTable
DROP COLUMN abc1
(untested)
Best, Hugo
(Remove _NO_ and _SPAM_ to get my e-mail address)
|||The code is:
USE myDatabase
go
ALTER TABLE dbo.myTable DROP COLUMN abc1
go
"Hugo Kornelis" wrote:

> On Tue, 10 Aug 2004 15:25:01 -0700, Vi wrote:
>
> Hi Vi,
> You forgot to include the code you executed in query analyzer when you got
> this error message.
> Dropping the column abc1 from table myTable should be possible with the
> following statement:
> ALTER TABLE myTable
> DROP COLUMN abc1
> (untested)
> Best, Hugo
> --
> (Remove _NO_ and _SPAM_ to get my e-mail address)
>
|||Perhaps your database is set to a pre 70 compatibility level. You can check
this with:
EXEC sp_dbcmptlevel 'myDatabase'
And set it with:
EXEC sp_dbcmptlevel 'myDatabase', 80
Hope this helps.
Dan Guzman
SQL Server MVP
"Vi" <Vi@.discussions.microsoft.com> wrote in message
news:EA353C88-D7EC-46BB-A31A-F748F87B40FE@.microsoft.com...[vbcol=seagreen]
> The code is:
> --
> USE myDatabase
> go
> ALTER TABLE dbo.myTable DROP COLUMN abc1
> go
> --
> "Hugo Kornelis" wrote:
a[vbcol=seagreen]
message in[vbcol=seagreen]
Incorrect[vbcol=seagreen]
console,[vbcol=seagreen]
Line 1[vbcol=seagreen]
column,[vbcol=seagreen]
got[vbcol=seagreen]
|||What do you mean that you tried to change the data type and size of the
column? Were you able to do that? Or did you get error messages for those
operations also.
HTH
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Vi" <Vi@.discussions.microsoft.com> wrote in message
news:9F0BD776-CA70-42C4-92D6-0338228817EA@.microsoft.com...
> Hello,
> I'm trying to delete an existing varchar(10) column called "abc1" o in a
> table on a SQL 2000 database and I'm getting the following error message
in
> Enterprise Manager.:
> 'myTable' table
> - Unable to modify table.
> ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 2:
Incorrect
> syntax near 'abc1'.
>
> I tried to delete it from SQL Analyzer directly from the server's console,
> but I'm getting a similar error: "Server: Msg 170, Level 15, State 1, Line
1
> Line 1: Incorrect syntax near 'abc1'."
> I tried to rename, change data type and size of the data type of the
column,
> but still could not delete it.
> Any thoughts?
> Thanks

Problems Deleting / Renaming Dimensions

I had a problem with a dimension and so decided to re-created it. Once I was happy with the new dimension I deleted the old and renamed the new to what the old one was called previously. When I try and build my cube I get the following error:

Error 18 Errors in the metadata manager. The dimension with the name of 'dim_product' already exists in the 'Sales_AS' database.

Not sure why this is happening as I thought I'd got rid of all trace of the old dimension. If I rename the new dimension I have no problem.

Is anyone able to explain what's going on here? Thanks.

If you deploy with the default settings the old dimension still exists on the server and if you want too deploay a second one with the same name (but for sure a different id) the server does not allow this.

Try delete the DB from Analysis services and deploy the whole DB again (if possible for your solution).

HANNES

Wednesday, March 21, 2012

Problems Connecting to Server Due to Deliting of Default DB

Hlp!
I have made a stoopid mistake of deleting the DB that was sat to default with Enterprise Manager. Now I can't use Enterprise Manager to work with any of my DB's.

Don't get me wrong, the server is still running, and I am able to view all the old folders in IIS, I can log into and add content to different sites I am working with.
But Ican not add new DB's, make backups or modify excisting tables and so on.

There must be a way to make another Db my new defalut? Pls say it is, so I don't need to reinstall, cause then I will loose data the way it is now.

Pls tell me there is a someway easy way around this issue.

slopee
Sad n' bitterEXEC sp_defaultdb 'User', 'DB'|||I will try this in commandline, and put my username, and the DB i want for default

If this does not work I hope someone can give mestep by step guiding, that way I know what I am doing:)) I am not even sure this is to be run from cmd, or where i should run it:))

Will try this, and let you know how it went.

slopee|||Ok, sure what you wrote is totally correct, but I am afraid I am going to need more then that. I will need a step by step guide on howto do this, cause i didn't work from cmd line.

If someone knows what to do here, pls guide me.

slopee|||Clearly I need help. I can barely spell, ("Deliting" lol) how should I possible manage to apply the line you submitted?;-)

Come on y'all, surely there is someone how can give me basic details? I need it explained in details, and step-by-step pls.

s|||From MS Support (http://support.microsoft.com/default.aspx?scid=kb;en-us;307864&Product=sql):

f the user's default database no longer exists, or has been marked suspect, use the ISQL command line utility to change the user's default database to a database that is currently available for a connection.

1. At a command line prompt, type the following and then press ENTER: C:\>isql -E

2. At the isql prompt, type the following and then press ENTER: 1>sp_defaultdb 'user's_login', 'master'

3. At the second prompt, type the following and then press ENTER:2>go|||Great.

Thx y'all.

s