Showing posts with label properties. Show all posts
Showing posts with label properties. Show all posts

Monday, March 19, 2012

Deleting a login account

I'm getting the below error when trying to change a few properties for a
login account. If I delete the login from Ent. Manager and then create a new
login with the same name, I get the same error.
I can create a new user as long as i use any other name. How can this
account already exist after I manually delete it?
Is there some code I can run to find this account and delete it? It's almost
like this particular account is hidden somewhere else within SQL.
This is SQL 2000.
ERROR ***********
Microsoft SQL-DMO
Error 21002:[SQL-DMO] User 'myUser' already exists.Did you do a restore operation? Did you refresh?
"scott" wrote:

> I'm getting the below error when trying to change a few properties for a
> login account. If I delete the login from Ent. Manager and then create a n
ew
> login with the same name, I get the same error.
> I can create a new user as long as i use any other name. How can this
> account already exist after I manually delete it?
> Is there some code I can run to find this account and delete it? It's almo
st
> like this particular account is hidden somewhere else within SQL.
> This is SQL 2000.
> ERROR ***********
> Microsoft SQL-DMO
> Error 21002:[SQL-DMO] User 'myUser' already exists.
>
>|||I just re-installed sql on the server, then attached my databases. After
that, this problem surfaced.
"Ata John" <AtaJohn@.discussions.microsoft.com> wrote in message
news:C9C4A787-1E6C-4C46-96AE-A3BE8FCBC454@.microsoft.com...
> Did you do a restore operation? Did you refresh?
> "scott" wrote:
>

Friday, March 9, 2012

Deleted Log file

Hi,
I have a database that use two log files. I deleted one of the logs going to
database/properties/files select the log file, and remove.
Everything goes well, but now when I go to database/properties/files I still
see the tow log files (the folder and file for one of the logs doesn’t exi
st
anymore).
Any idea how to resolve this?
ThanksHi
You don't say which version of SQL Server you are using? Have you tried
sp_helpfile to see what that gives and the
ALTER DATABASE REMOVE FILE logical_file_name
command to see if it can be removed that way?
John
"Tecnica" wrote:

> Hi,
> I have a database that use two log files. I deleted one of the logs going
to
> database/properties/files select the log file, and remove.
> Everything goes well, but now when I go to database/properties/files I sti
ll
> see the tow log files (the folder and file for one of the logs doesn’t e
xist
> anymore).
> Any idea how to resolve this?
> Thanks
>|||Hi John,
in fact i didn′t mencioned that the SQL is version 2005.
The ALTER DATABASE REMOVE FILE logical_file_name doesn′t work because
phisicaly the file does not exist.
If you run SELECT * FROM sys.database_files you see the file mencioned in
one row, but i don′t know if i can modify this system table.
Rui
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> You don't say which version of SQL Server you are using? Have you tried
> sp_helpfile to see what that gives and the
> ALTER DATABASE REMOVE FILE logical_file_name
> command to see if it can be removed that way?
> John
>
> "Tecnica" wrote:
>|||Hi
You should not need to modify system catalogs. Do you have the number/text
for the error for the ALTER DATABASE command. Are you using SP1?
John
"Tecnica" wrote:
[vbcol=seagreen]
> Hi John,
> in fact i didn′t mencioned that the SQL is version 2005.
> The ALTER DATABASE REMOVE FILE logical_file_name doesn′t work because
> phisicaly the file does not exist.
> If you run SELECT * FROM sys.database_files you see the file mencioned in
> one row, but i don′t know if i can modify this system table.
> Rui
> "John Bell" wrote:
>|||Hi,
My understanding of your issue is that:
Your database had two log files. You manually deleted one of the log files
in SQL Server Management Studio. However when you viewed the database
properties again, you found that the log file was still there.
If I have misunderstood, please let me know.
I performed a test in SQL Server 2005 Enterprise Edition SP1, but
unfortunately I couldn't reproduce your issue. Everything works fine at my
side. I created a database called TMLogDB which has two log files:
TMLogDB_log and TMLogDB_log1. After creating a table in the database, I
manually removed the TMLogDB_log1. Then I clicked the Properties of the
database and found that the log file had been removed.
For further research, I recommend that:
1. Check if this issue occurs only on this database. Please create a test
dabase and see if the same issue exists on it;
2. Completely backup your database, then try using sp_detach_db to detach
the database and sp_attach_db to attach the database with the current log
file. For the usage of sp_detach_db/sp_attach_db, please refer to SQL
Server Books Online.
3. Install SQL Server 2005 SP1 if it was not installed on your computer.
4. If this issue perists, please mail me (changliw@.microsoft.com) sql error
logs (C:\Program Files\Microsoft SQL Server\MSSQL\LOG).
If you have any other questions or concerns, please feel free to let me
know. It's my pleasure to be of assistance.
Sincerely yours,
Charles Wang
Microsoft Online Community Support
========================================
==============
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
========================================
==============
This posting is provided "AS IS" with no warranties, and confers no rights.
========================================
==============|||Hi Charles
tanks for the help. Detach and attach database has solve the problem.
Regards,
Rui Reis
"Charles Wang[MSFT]" wrote:

> Hi,
> My understanding of your issue is that:
> Your database had two log files. You manually deleted one of the log files
> in SQL Server Management Studio. However when you viewed the database
> properties again, you found that the log file was still there.
> If I have misunderstood, please let me know.
> I performed a test in SQL Server 2005 Enterprise Edition SP1, but
> unfortunately I couldn't reproduce your issue. Everything works fine at my
> side. I created a database called TMLogDB which has two log files:
> TMLogDB_log and TMLogDB_log1. After creating a table in the database, I
> manually removed the TMLogDB_log1. Then I clicked the Properties of the
> database and found that the log file had been removed.
> For further research, I recommend that:
> 1. Check if this issue occurs only on this database. Please create a test
> dabase and see if the same issue exists on it;
> 2. Completely backup your database, then try using sp_detach_db to detach
> the database and sp_attach_db to attach the database with the current log
> file. For the usage of sp_detach_db/sp_attach_db, please refer to SQL
> Server Books Online.
> 3. Install SQL Server 2005 SP1 if it was not installed on your computer.
> 4. If this issue perists, please mail me (changliw@.microsoft.com) sql erro
r
> logs (C:\Program Files\Microsoft SQL Server\MSSQL\LOG).
> If you have any other questions or concerns, please feel free to let me
> know. It's my pleasure to be of assistance.
> Sincerely yours,
> Charles Wang
> Microsoft Online Community Support
> ========================================
==============
> When responding to posts, please "Reply to Group" via
> your newsreader so that others may learn and benefit
> from this issue.
> ========================================
==============
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> ========================================
==============
>
>|||Hi,
Appreciate your update and response. I am glad to hear that the problem has
been fixed. If you have any other questions or concerns, please do not
hesitate to contact us. It is always our pleasure to be of assistance.
Have a nice day!
Charles Wang
Microsoft Online Community Support
========================================
==============
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
========================================
==============
This posting is provided "AS IS" with no warranties, and confers no rights.
========================================
==============|||Hi
Can you let us know whether this is SP1 or not?
Thanks
John
"Tecnica" wrote:
[vbcol=seagreen]
> Hi Charles
> tanks for the help. Detach and attach database has solve the problem.
> Regards,
> Rui Reis
> "Charles Wang[MSFT]" wrote:
>|||Hi
no, it is not SP1 because i already intaled some time ago. It was detach and
atach that solve the problem.
Thanks again,
Rui Reis
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> Can you let us know whether this is SP1 or not?
> Thanks
> John
> "Tecnica" wrote:
>|||Hi
I would strongly recommend that you upgrade to SP1 which does not seem to
have this issue.
John
"Tecnica" wrote:
[vbcol=seagreen]
> Hi
> no, it is not SP1 because i already intaled some time ago. It was detach a
nd
> atach that solve the problem.
> Thanks again,
> Rui Reis
> "John Bell" wrote:
>

Deleted Log file

Hi,
I have a database that use two log files. I deleted one of the logs going to
database/properties/files select the log file, and remove.
Everything goes well, but now when I go to database/properties/files I still
see the tow log files (the folder and file for one of the logs doesnâ't exist
anymore).
Any idea how to resolve this?
ThanksHi
You don't say which version of SQL Server you are using? Have you tried
sp_helpfile to see what that gives and the
ALTER DATABASE REMOVE FILE logical_file_name
command to see if it can be removed that way?
John
"Tecnica" wrote:
> Hi,
> I have a database that use two log files. I deleted one of the logs going to
> database/properties/files select the log file, and remove.
> Everything goes well, but now when I go to database/properties/files I still
> see the tow log files (the folder and file for one of the logs doesnâ't exist
> anymore).
> Any idea how to resolve this?
> Thanks
>|||Hi John,
in fact i didn´t mencioned that the SQL is version 2005.
The ALTER DATABASE REMOVE FILE logical_file_name doesn´t work because
phisicaly the file does not exist.
If you run SELECT * FROM sys.database_files you see the file mencioned in
one row, but i don´t know if i can modify this system table.
Rui
"John Bell" wrote:
> Hi
> You don't say which version of SQL Server you are using? Have you tried
> sp_helpfile to see what that gives and the
> ALTER DATABASE REMOVE FILE logical_file_name
> command to see if it can be removed that way?
> John
>
> "Tecnica" wrote:
> > Hi,
> > I have a database that use two log files. I deleted one of the logs going to
> > database/properties/files select the log file, and remove.
> > Everything goes well, but now when I go to database/properties/files I still
> > see the tow log files (the folder and file for one of the logs doesnâ't exist
> > anymore).
> > Any idea how to resolve this?
> >
> > Thanks
> >|||Hi
You should not need to modify system catalogs. Do you have the number/text
for the error for the ALTER DATABASE command. Are you using SP1?
John
"Tecnica" wrote:
> Hi John,
> in fact i didn´t mencioned that the SQL is version 2005.
> The ALTER DATABASE REMOVE FILE logical_file_name doesn´t work because
> phisicaly the file does not exist.
> If you run SELECT * FROM sys.database_files you see the file mencioned in
> one row, but i don´t know if i can modify this system table.
> Rui
> "John Bell" wrote:
> > Hi
> >
> > You don't say which version of SQL Server you are using? Have you tried
> > sp_helpfile to see what that gives and the
> > ALTER DATABASE REMOVE FILE logical_file_name
> > command to see if it can be removed that way?
> >
> > John
> >
> >
> > "Tecnica" wrote:
> >
> > > Hi,
> > > I have a database that use two log files. I deleted one of the logs going to
> > > database/properties/files select the log file, and remove.
> > > Everything goes well, but now when I go to database/properties/files I still
> > > see the tow log files (the folder and file for one of the logs doesnâ't exist
> > > anymore).
> > > Any idea how to resolve this?
> > >
> > > Thanks
> > >|||Hi,
My understanding of your issue is that:
Your database had two log files. You manually deleted one of the log files
in SQL Server Management Studio. However when you viewed the database
properties again, you found that the log file was still there.
If I have misunderstood, please let me know.
I performed a test in SQL Server 2005 Enterprise Edition SP1, but
unfortunately I couldn't reproduce your issue. Everything works fine at my
side. I created a database called TMLogDB which has two log files:
TMLogDB_log and TMLogDB_log1. After creating a table in the database, I
manually removed the TMLogDB_log1. Then I clicked the Properties of the
database and found that the log file had been removed.
For further research, I recommend that:
1. Check if this issue occurs only on this database. Please create a test
dabase and see if the same issue exists on it;
2. Completely backup your database, then try using sp_detach_db to detach
the database and sp_attach_db to attach the database with the current log
file. For the usage of sp_detach_db/sp_attach_db, please refer to SQL
Server Books Online.
3. Install SQL Server 2005 SP1 if it was not installed on your computer.
4. If this issue perists, please mail me (changliw@.microsoft.com) sql error
logs (C:\Program Files\Microsoft SQL Server\MSSQL\LOG).
If you have any other questions or concerns, please feel free to let me
know. It's my pleasure to be of assistance.
Sincerely yours,
Charles Wang
Microsoft Online Community Support
======================================================When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================|||Hi Charles
tanks for the help. Detach and attach database has solve the problem.
Regards,
Rui Reis
"Charles Wang[MSFT]" wrote:
> Hi,
> My understanding of your issue is that:
> Your database had two log files. You manually deleted one of the log files
> in SQL Server Management Studio. However when you viewed the database
> properties again, you found that the log file was still there.
> If I have misunderstood, please let me know.
> I performed a test in SQL Server 2005 Enterprise Edition SP1, but
> unfortunately I couldn't reproduce your issue. Everything works fine at my
> side. I created a database called TMLogDB which has two log files:
> TMLogDB_log and TMLogDB_log1. After creating a table in the database, I
> manually removed the TMLogDB_log1. Then I clicked the Properties of the
> database and found that the log file had been removed.
> For further research, I recommend that:
> 1. Check if this issue occurs only on this database. Please create a test
> dabase and see if the same issue exists on it;
> 2. Completely backup your database, then try using sp_detach_db to detach
> the database and sp_attach_db to attach the database with the current log
> file. For the usage of sp_detach_db/sp_attach_db, please refer to SQL
> Server Books Online.
> 3. Install SQL Server 2005 SP1 if it was not installed on your computer.
> 4. If this issue perists, please mail me (changliw@.microsoft.com) sql error
> logs (C:\Program Files\Microsoft SQL Server\MSSQL\LOG).
> If you have any other questions or concerns, please feel free to let me
> know. It's my pleasure to be of assistance.
> Sincerely yours,
> Charles Wang
> Microsoft Online Community Support
> ======================================================> When responding to posts, please "Reply to Group" via
> your newsreader so that others may learn and benefit
> from this issue.
> ======================================================> This posting is provided "AS IS" with no warranties, and confers no rights.
> ======================================================>
>|||Hi,
Appreciate your update and response. I am glad to hear that the problem has
been fixed. If you have any other questions or concerns, please do not
hesitate to contact us. It is always our pleasure to be of assistance.
Have a nice day!
Charles Wang
Microsoft Online Community Support
======================================================When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================|||Hi
Can you let us know whether this is SP1 or not?
Thanks
John
"Tecnica" wrote:
> Hi Charles
> tanks for the help. Detach and attach database has solve the problem.
> Regards,
> Rui Reis
> "Charles Wang[MSFT]" wrote:
> > Hi,
> > My understanding of your issue is that:
> > Your database had two log files. You manually deleted one of the log files
> > in SQL Server Management Studio. However when you viewed the database
> > properties again, you found that the log file was still there.
> > If I have misunderstood, please let me know.
> >
> > I performed a test in SQL Server 2005 Enterprise Edition SP1, but
> > unfortunately I couldn't reproduce your issue. Everything works fine at my
> > side. I created a database called TMLogDB which has two log files:
> > TMLogDB_log and TMLogDB_log1. After creating a table in the database, I
> > manually removed the TMLogDB_log1. Then I clicked the Properties of the
> > database and found that the log file had been removed.
> >
> > For further research, I recommend that:
> > 1. Check if this issue occurs only on this database. Please create a test
> > dabase and see if the same issue exists on it;
> > 2. Completely backup your database, then try using sp_detach_db to detach
> > the database and sp_attach_db to attach the database with the current log
> > file. For the usage of sp_detach_db/sp_attach_db, please refer to SQL
> > Server Books Online.
> > 3. Install SQL Server 2005 SP1 if it was not installed on your computer.
> > 4. If this issue perists, please mail me (changliw@.microsoft.com) sql error
> > logs (C:\Program Files\Microsoft SQL Server\MSSQL\LOG).
> >
> > If you have any other questions or concerns, please feel free to let me
> > know. It's my pleasure to be of assistance.
> >
> > Sincerely yours,
> > Charles Wang
> > Microsoft Online Community Support
> >
> > ======================================================> > When responding to posts, please "Reply to Group" via
> > your newsreader so that others may learn and benefit
> > from this issue.
> > ======================================================> > This posting is provided "AS IS" with no warranties, and confers no rights.
> > ======================================================> >
> >
> >
> >|||Hi
no, it is not SP1 because i already intaled some time ago. It was detach and
atach that solve the problem.
Thanks again,
Rui Reis
"John Bell" wrote:
> Hi
> Can you let us know whether this is SP1 or not?
> Thanks
> John
> "Tecnica" wrote:
> > Hi Charles
> >
> > tanks for the help. Detach and attach database has solve the problem.
> >
> > Regards,
> > Rui Reis
> >
> > "Charles Wang[MSFT]" wrote:
> >
> > > Hi,
> > > My understanding of your issue is that:
> > > Your database had two log files. You manually deleted one of the log files
> > > in SQL Server Management Studio. However when you viewed the database
> > > properties again, you found that the log file was still there.
> > > If I have misunderstood, please let me know.
> > >
> > > I performed a test in SQL Server 2005 Enterprise Edition SP1, but
> > > unfortunately I couldn't reproduce your issue. Everything works fine at my
> > > side. I created a database called TMLogDB which has two log files:
> > > TMLogDB_log and TMLogDB_log1. After creating a table in the database, I
> > > manually removed the TMLogDB_log1. Then I clicked the Properties of the
> > > database and found that the log file had been removed.
> > >
> > > For further research, I recommend that:
> > > 1. Check if this issue occurs only on this database. Please create a test
> > > dabase and see if the same issue exists on it;
> > > 2. Completely backup your database, then try using sp_detach_db to detach
> > > the database and sp_attach_db to attach the database with the current log
> > > file. For the usage of sp_detach_db/sp_attach_db, please refer to SQL
> > > Server Books Online.
> > > 3. Install SQL Server 2005 SP1 if it was not installed on your computer.
> > > 4. If this issue perists, please mail me (changliw@.microsoft.com) sql error
> > > logs (C:\Program Files\Microsoft SQL Server\MSSQL\LOG).
> > >
> > > If you have any other questions or concerns, please feel free to let me
> > > know. It's my pleasure to be of assistance.
> > >
> > > Sincerely yours,
> > > Charles Wang
> > > Microsoft Online Community Support
> > >
> > > ======================================================> > > When responding to posts, please "Reply to Group" via
> > > your newsreader so that others may learn and benefit
> > > from this issue.
> > > ======================================================> > > This posting is provided "AS IS" with no warranties, and confers no rights.
> > > ======================================================> > >
> > >
> > >
> > >|||Hi
I would strongly recommend that you upgrade to SP1 which does not seem to
have this issue.
John
"Tecnica" wrote:
> Hi
> no, it is not SP1 because i already intaled some time ago. It was detach and
> atach that solve the problem.
> Thanks again,
> Rui Reis
> "John Bell" wrote:
> > Hi
> >
> > Can you let us know whether this is SP1 or not?
> >
> > Thanks
> >
> > John
> >
> > "Tecnica" wrote:
> >
> > > Hi Charles
> > >
> > > tanks for the help. Detach and attach database has solve the problem.
> > >
> > > Regards,
> > > Rui Reis
> > >
> > > "Charles Wang[MSFT]" wrote:
> > >
> > > > Hi,
> > > > My understanding of your issue is that:
> > > > Your database had two log files. You manually deleted one of the log files
> > > > in SQL Server Management Studio. However when you viewed the database
> > > > properties again, you found that the log file was still there.
> > > > If I have misunderstood, please let me know.
> > > >
> > > > I performed a test in SQL Server 2005 Enterprise Edition SP1, but
> > > > unfortunately I couldn't reproduce your issue. Everything works fine at my
> > > > side. I created a database called TMLogDB which has two log files:
> > > > TMLogDB_log and TMLogDB_log1. After creating a table in the database, I
> > > > manually removed the TMLogDB_log1. Then I clicked the Properties of the
> > > > database and found that the log file had been removed.
> > > >
> > > > For further research, I recommend that:
> > > > 1. Check if this issue occurs only on this database. Please create a test
> > > > dabase and see if the same issue exists on it;
> > > > 2. Completely backup your database, then try using sp_detach_db to detach
> > > > the database and sp_attach_db to attach the database with the current log
> > > > file. For the usage of sp_detach_db/sp_attach_db, please refer to SQL
> > > > Server Books Online.
> > > > 3. Install SQL Server 2005 SP1 if it was not installed on your computer.
> > > > 4. If this issue perists, please mail me (changliw@.microsoft.com) sql error
> > > > logs (C:\Program Files\Microsoft SQL Server\MSSQL\LOG).
> > > >
> > > > If you have any other questions or concerns, please feel free to let me
> > > > know. It's my pleasure to be of assistance.
> > > >
> > > > Sincerely yours,
> > > > Charles Wang
> > > > Microsoft Online Community Support
> > > >
> > > > ======================================================> > > > When responding to posts, please "Reply to Group" via
> > > > your newsreader so that others may learn and benefit
> > > > from this issue.
> > > > ======================================================> > > > This posting is provided "AS IS" with no warranties, and confers no rights.
> > > > ======================================================> > > >
> > > >
> > > >
> > > >|||Hi
I didnâ't explain well. I have already upgrade to SP1 some time ago (I donâ't
remember when).
Thanks
"John Bell" wrote:
> Hi
> I would strongly recommend that you upgrade to SP1 which does not seem to
> have this issue.
> John
> "Tecnica" wrote:
> > Hi
> >
> > no, it is not SP1 because i already intaled some time ago. It was detach and
> > atach that solve the problem.
> >
> > Thanks again,
> > Rui Reis
> >
> > "John Bell" wrote:
> >
> > > Hi
> > >
> > > Can you let us know whether this is SP1 or not?
> > >
> > > Thanks
> > >
> > > John
> > >
> > > "Tecnica" wrote:
> > >
> > > > Hi Charles
> > > >
> > > > tanks for the help. Detach and attach database has solve the problem.
> > > >
> > > > Regards,
> > > > Rui Reis
> > > >
> > > > "Charles Wang[MSFT]" wrote:
> > > >
> > > > > Hi,
> > > > > My understanding of your issue is that:
> > > > > Your database had two log files. You manually deleted one of the log files
> > > > > in SQL Server Management Studio. However when you viewed the database
> > > > > properties again, you found that the log file was still there.
> > > > > If I have misunderstood, please let me know.
> > > > >
> > > > > I performed a test in SQL Server 2005 Enterprise Edition SP1, but
> > > > > unfortunately I couldn't reproduce your issue. Everything works fine at my
> > > > > side. I created a database called TMLogDB which has two log files:
> > > > > TMLogDB_log and TMLogDB_log1. After creating a table in the database, I
> > > > > manually removed the TMLogDB_log1. Then I clicked the Properties of the
> > > > > database and found that the log file had been removed.
> > > > >
> > > > > For further research, I recommend that:
> > > > > 1. Check if this issue occurs only on this database. Please create a test
> > > > > dabase and see if the same issue exists on it;
> > > > > 2. Completely backup your database, then try using sp_detach_db to detach
> > > > > the database and sp_attach_db to attach the database with the current log
> > > > > file. For the usage of sp_detach_db/sp_attach_db, please refer to SQL
> > > > > Server Books Online.
> > > > > 3. Install SQL Server 2005 SP1 if it was not installed on your computer.
> > > > > 4. If this issue perists, please mail me (changliw@.microsoft.com) sql error
> > > > > logs (C:\Program Files\Microsoft SQL Server\MSSQL\LOG).
> > > > >
> > > > > If you have any other questions or concerns, please feel free to let me
> > > > > know. It's my pleasure to be of assistance.
> > > > >
> > > > > Sincerely yours,
> > > > > Charles Wang
> > > > > Microsoft Online Community Support
> > > > >
> > > > > ======================================================> > > > > When responding to posts, please "Reply to Group" via
> > > > > your newsreader so that others may learn and benefit
> > > > > from this issue.
> > > > > ======================================================> > > > > This posting is provided "AS IS" with no warranties, and confers no rights.
> > > > > ======================================================> > > > >
> > > > >
> > > > >
> > > > >

Deleted Log file

Hi,
I have a database that use two log files. I deleted one of the logs going to
database/properties/files select the log file, and remove.
Everything goes well, but now when I go to database/properties/files I still
see the tow log files (the folder and file for one of the logs doesn’t exist
anymore).
Any idea how to resolve this?
Thanks
Hi
You don't say which version of SQL Server you are using? Have you tried
sp_helpfile to see what that gives and the
ALTER DATABASE REMOVE FILE logical_file_name
command to see if it can be removed that way?
John
"Tecnica" wrote:

> Hi,
> I have a database that use two log files. I deleted one of the logs going to
> database/properties/files select the log file, and remove.
> Everything goes well, but now when I go to database/properties/files I still
> see the tow log files (the folder and file for one of the logs doesn’t exist
> anymore).
> Any idea how to resolve this?
> Thanks
>
|||Hi John,
in fact i didn′t mencioned that the SQL is version 2005.
The ALTER DATABASE REMOVE FILE logical_file_name doesn′t work because
phisicaly the file does not exist.
If you run SELECT * FROM sys.database_files you see the file mencioned in
one row, but i don′t know if i can modify this system table.
Rui
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> You don't say which version of SQL Server you are using? Have you tried
> sp_helpfile to see what that gives and the
> ALTER DATABASE REMOVE FILE logical_file_name
> command to see if it can be removed that way?
> John
>
> "Tecnica" wrote:
|||Hi
You should not need to modify system catalogs. Do you have the number/text
for the error for the ALTER DATABASE command. Are you using SP1?
John
"Tecnica" wrote:
[vbcol=seagreen]
> Hi John,
> in fact i didn′t mencioned that the SQL is version 2005.
> The ALTER DATABASE REMOVE FILE logical_file_name doesn′t work because
> phisicaly the file does not exist.
> If you run SELECT * FROM sys.database_files you see the file mencioned in
> one row, but i don′t know if i can modify this system table.
> Rui
> "John Bell" wrote:
|||Hi,
My understanding of your issue is that:
Your database had two log files. You manually deleted one of the log files
in SQL Server Management Studio. However when you viewed the database
properties again, you found that the log file was still there.
If I have misunderstood, please let me know.
I performed a test in SQL Server 2005 Enterprise Edition SP1, but
unfortunately I couldn't reproduce your issue. Everything works fine at my
side. I created a database called TMLogDB which has two log files:
TMLogDB_log and TMLogDB_log1. After creating a table in the database, I
manually removed the TMLogDB_log1. Then I clicked the Properties of the
database and found that the log file had been removed.
For further research, I recommend that:
1. Check if this issue occurs only on this database. Please create a test
dabase and see if the same issue exists on it;
2. Completely backup your database, then try using sp_detach_db to detach
the database and sp_attach_db to attach the database with the current log
file. For the usage of sp_detach_db/sp_attach_db, please refer to SQL
Server Books Online.
3. Install SQL Server 2005 SP1 if it was not installed on your computer.
4. If this issue perists, please mail me (changliw@.microsoft.com) sql error
logs (C:\Program Files\Microsoft SQL Server\MSSQL\LOG).
If you have any other questions or concerns, please feel free to let me
know. It's my pleasure to be of assistance.
Sincerely yours,
Charles Wang
Microsoft Online Community Support
================================================== ====
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
================================================== ====
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== ====
|||Hi Charles
tanks for the help. Detach and attach database has solve the problem.
Regards,
Rui Reis
"Charles Wang[MSFT]" wrote:

> Hi,
> My understanding of your issue is that:
> Your database had two log files. You manually deleted one of the log files
> in SQL Server Management Studio. However when you viewed the database
> properties again, you found that the log file was still there.
> If I have misunderstood, please let me know.
> I performed a test in SQL Server 2005 Enterprise Edition SP1, but
> unfortunately I couldn't reproduce your issue. Everything works fine at my
> side. I created a database called TMLogDB which has two log files:
> TMLogDB_log and TMLogDB_log1. After creating a table in the database, I
> manually removed the TMLogDB_log1. Then I clicked the Properties of the
> database and found that the log file had been removed.
> For further research, I recommend that:
> 1. Check if this issue occurs only on this database. Please create a test
> dabase and see if the same issue exists on it;
> 2. Completely backup your database, then try using sp_detach_db to detach
> the database and sp_attach_db to attach the database with the current log
> file. For the usage of sp_detach_db/sp_attach_db, please refer to SQL
> Server Books Online.
> 3. Install SQL Server 2005 SP1 if it was not installed on your computer.
> 4. If this issue perists, please mail me (changliw@.microsoft.com) sql error
> logs (C:\Program Files\Microsoft SQL Server\MSSQL\LOG).
> If you have any other questions or concerns, please feel free to let me
> know. It's my pleasure to be of assistance.
> Sincerely yours,
> Charles Wang
> Microsoft Online Community Support
> ================================================== ====
> When responding to posts, please "Reply to Group" via
> your newsreader so that others may learn and benefit
> from this issue.
> ================================================== ====
> This posting is provided "AS IS" with no warranties, and confers no rights.
> ================================================== ====
>
>
|||Hi,
Appreciate your update and response. I am glad to hear that the problem has
been fixed. If you have any other questions or concerns, please do not
hesitate to contact us. It is always our pleasure to be of assistance.
Have a nice day!
Charles Wang
Microsoft Online Community Support
================================================== ====
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
================================================== ====
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== ====
|||Hi
Can you let us know whether this is SP1 or not?
Thanks
John
"Tecnica" wrote:
[vbcol=seagreen]
> Hi Charles
> tanks for the help. Detach and attach database has solve the problem.
> Regards,
> Rui Reis
> "Charles Wang[MSFT]" wrote:
|||Hi
no, it is not SP1 because i already intaled some time ago. It was detach and
atach that solve the problem.
Thanks again,
Rui Reis
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> Can you let us know whether this is SP1 or not?
> Thanks
> John
> "Tecnica" wrote:
|||Hi
I would strongly recommend that you upgrade to SP1 which does not seem to
have this issue.
John
"Tecnica" wrote:
[vbcol=seagreen]
> Hi
> no, it is not SP1 because i already intaled some time ago. It was detach and
> atach that solve the problem.
> Thanks again,
> Rui Reis
> "John Bell" wrote:

Wednesday, March 7, 2012

DeleteCommand and UpdateCommand

I have added a gridview and under its properties i have changed AutoGenerateDeleteButton and AutoGenerateEditButton to true.

The problem is... when I try and delete a record, I get this error: Deleting is not supported by data source 'SqlDataSource1' unless DeleteCommand is specified

If I try and update.. i get the error: Updating is not supported by data source 'SqlDataSource1' unless UpdateCommand is specified.

Can someone please help me out... maybe with some code... or a link to a tutorial..

Thanks

Canning

When you configure your datasource, you need to choose "Advanced". On the Advanced page, you need to check "Generate Insert,Update and Delete commands". This will generate attributes in your sqldatasource that allow for these things to happen. Make sure you have a primary key in your table set.|||

Hi,

I have the same problem. I tried to change the advanced setting as you specified. However, it is not allowing me to do so. The check boxes are greyed out.

Any suggestions?

thanks..

|||Greyed out usually means there is no primary key on the table that the control can recognize.|||

Also,

I do see where it says on the advanced section that "You must have all primary key fields selected for this option to be enabled." Im not sure what that means though. I have every column in the table selected to display. That does not help though. Can you tell me where I find the primary key fields so that I can "Select" them?

thanks...

|||

I do see where it says on the advanced section that "You must have all primary key fields selected for this option to be enabled." Im not sure what that means though. I have every column in the table selected to display. That does not help though. Can you tell me where I find the primary key fields so that I can "Select" them?

thanks...

|||

I was able to figure this out...thanks...and sorry for posting that twice.

Thanks for the direction.

|||

Hi,

I have the same problem that DavidatWork. Can you send me the direction too?

|||I have the same problem however in my table I specify a primary key. I still have the options disabled. Any help?|||

WEN I tried to change the advanced setting OPTION However, it is not allowing TO DO THAT The check boxes ARE UNCHECKED IE GREYED OUT SO HOW CAN I DO UPDATE AND DELETE IN MY TABLE.hOW TO ADD PRIMARY KEY ON THE TABLE

|||

hoW TO ADD PRIMARY KEY IN TABLE QUERY I HAVENT FOUND ANY OPTION REGD PRIMARY KEY CAN U SUGGEST ME

tHANK U

bHANUPRIYA

|||

do this:

ALTER TABLE Customer ADD PRIMARY KEY (SID);

(it's not the same as having an identity column).

|||

i have the same problem can anyone tell me how to resolve it?

Saturday, February 25, 2012

Delete Subscription

I am still struggling to delete a subscription so I can set another one to
that server
I believe that normally that would be listed in the Properties Page of the
Publisher, but it doesn't
How can I still delete it
Thank you,
Samuel
Did you try to issue a sp_dropsubscription 'Publicationname','articlename/or
all','Subscribername','subscriptiondatabase'
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Samuel Shulman" <samuel.shulman@.ntlworld.com> wrote in message
news:ur04P1y4GHA.1252@.TK2MSFTNGP04.phx.gbl...
>I am still struggling to delete a subscription so I can set another one to
>that server
> I believe that normally that would be listed in the Properties Page of the
> Publisher, but it doesn't
> How can I still delete it
> Thank you,
> Samuel
>