Click here to Skip to main content
15,888,116 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I recovered a db from all tasks->recover (Microsoft Sql Server Enterprise). Now I can read (select queries) from db but i can't write. I know that this has to do something with rights but can't figure out. When I try to run an insert,update command it gives 'invalid object tablename' error.
Posted
Comments
Mahendra.p25 12-Apr-11 5:51am    
not clear please elaborate
Pong D. Panda 12-Apr-11 5:51am    
can you add your sample insert/update statement?
Muhammad Waqas Iqbal 12-Apr-11 6:03am    
insert into sec_user_log ('userid','username') values (1,'john')
userid is int
username is varchar
sec_user_log is table
select statement works fine on this table

Try creating a new db and try using import & export data tool to get data
 
Share this answer
 
I have tried this its working properly

SQL
create table sec_user_log (userid int,username varchar(50))
insert into sec_user_log (userid,username) values (1,'john')
select * from sec_user_log
 
Share this answer
 
Maybe run DBCC CHECKDB[^] against your database, make sure it's all OK. You might need a repair \ rebuild

SQL
Use database_name
GO

ALTER DATABASE database_name SET SINGLE_USER
GO

DBCC CHECKDB('database_name', REPAIR_REBUILD)
GO

ALTER <database-name> SET MULTI_USER
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900