Showing posts with label deleted. Show all posts
Showing posts with label deleted. Show all posts

Wednesday, March 21, 2012

Error creating new push subscription after deleting the existing o

I created a transactional replication publication and pushed a subscriber,
and that works fine. I deleted existing push subscription in the publisher
with enterprise manager, and also deleted automatically generated replication
jobs related to that push subscription. I noticed that the push subscription
was not automatically deleted in the subscriber as it should. Moreover, when
I created a new push subscription with the same article, I encountered an
error. The error message is as following.
Subscriptions were created successfully at the following subscribers.

SQL Server Enterprise manager could not start the snapshot agent.
Error 14262:the specified @.job_id … does not exist.
Please help.
The error indicates that a replication agent job was deleted accidentally.
When this issue occurs, the most efficient way would be rebuilding the
replication from scratch.
Sincerely,
William Wang
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
This posting is provided "AS IS" with no warranties, and confers no rights.

Sunday, February 19, 2012

error attaching single db .mdf file

Hi,
The dev deleted some of the ldf files mistakenly and are unable to attach the mdf file.
How can i re-create the db with the existing mdf file and a new ldf file. Can someone suggest.
Thanks,
Arzan
http://www.sqlservercentral.com/scri...p?scriptid=599
Restoring a .mdf
Andrew J. Kelly SQL MVP
"Arzan" <Arzan@.discussions.microsoft.com> wrote in message
news:8A81A4E5-F699-4552-A0C0-8310527A7EA5@.microsoft.com...
> Hi,
> The dev deleted some of the ldf files mistakenly and are unable to attach
the mdf file.
> How can i re-create the db with the existing mdf file and a new ldf file.
Can someone suggest.
> Thanks,
> Arzan
|||Hi,
Try using the procedure "sp_attach_single_file_db" to attach the database
with specifying the MDF file only.
EXEC sp_attach_single_file_db 'dbname', 'c:\mssql\data\dbname.mdf'
THis will create a new database with exiting mdf and new ldf file.
This command will fail in below scenarios:-
1. If the database is not detached using sp_detach_db
2. If you have multiple LDF files in your old database.
If your sp_attach_single_file_db command fails then probaly you have to
restore the database from good backup available.
Thanks
Hari
MCDBA
"Arzan" <Arzan@.discussions.microsoft.com> wrote in message
news:8A81A4E5-F699-4552-A0C0-8310527A7EA5@.microsoft.com...
> Hi,
> The dev deleted some of the ldf files mistakenly and are unable to attach
the mdf file.
> How can i re-create the db with the existing mdf file and a new ldf file.
Can someone suggest.
> Thanks,
> Arzan
|||Thanks Hari, the problem has been resolved.
"Hari Prasad" wrote:

> Hi,
> Try using the procedure "sp_attach_single_file_db" to attach the database
> with specifying the MDF file only.
> EXEC sp_attach_single_file_db 'dbname', 'c:\mssql\data\dbname.mdf'
> THis will create a new database with exiting mdf and new ldf file.
> This command will fail in below scenarios:-
> 1. If the database is not detached using sp_detach_db
> 2. If you have multiple LDF files in your old database.
> If your sp_attach_single_file_db command fails then probaly you have to
> restore the database from good backup available.
> Thanks
> Hari
> MCDBA
>
> "Arzan" <Arzan@.discussions.microsoft.com> wrote in message
> news:8A81A4E5-F699-4552-A0C0-8310527A7EA5@.microsoft.com...
> the mdf file.
> Can someone suggest.
>
>

Friday, February 17, 2012

error attaching single db .mdf file

Hi,
The dev deleted some of the ldf files mistakenly and are unable to attach th
e mdf file.
How can i re-create the db with the existing mdf file and a new ldf file. Ca
n someone suggest.
Thanks,
Arzanhttp://www.sqlservercentral.com/scr...sp?scriptid=599
Restoring a .mdf
Andrew J. Kelly SQL MVP
"Arzan" <Arzan@.discussions.microsoft.com> wrote in message
news:8A81A4E5-F699-4552-A0C0-8310527A7EA5@.microsoft.com...
> Hi,
> The dev deleted some of the ldf files mistakenly and are unable to attach
the mdf file.
> How can i re-create the db with the existing mdf file and a new ldf file.
Can someone suggest.
> Thanks,
> Arzan|||Hi,
Try using the procedure "sp_attach_single_file_db" to attach the database
with specifying the MDF file only.
EXEC sp_attach_single_file_db 'dbname', 'c:\mssql\data\dbname.mdf'
THis will create a new database with exiting mdf and new ldf file.
This command will fail in below scenarios:-
1. If the database is not detached using sp_detach_db
2. If you have multiple LDF files in your old database.
If your sp_attach_single_file_db command fails then probaly you have to
restore the database from good backup available.
Thanks
Hari
MCDBA
"Arzan" <Arzan@.discussions.microsoft.com> wrote in message
news:8A81A4E5-F699-4552-A0C0-8310527A7EA5@.microsoft.com...
> Hi,
> The dev deleted some of the ldf files mistakenly and are unable to attach
the mdf file.
> How can i re-create the db with the existing mdf file and a new ldf file.
Can someone suggest.
> Thanks,
> Arzan|||Thanks Hari, the problem has been resolved.
"Hari Prasad" wrote:

> Hi,
> Try using the procedure "sp_attach_single_file_db" to attach the database
> with specifying the MDF file only.
> EXEC sp_attach_single_file_db 'dbname', 'c:\mssql\data\dbname.mdf'
> THis will create a new database with exiting mdf and new ldf file.
> This command will fail in below scenarios:-
> 1. If the database is not detached using sp_detach_db
> 2. If you have multiple LDF files in your old database.
> If your sp_attach_single_file_db command fails then probaly you have to
> restore the database from good backup available.
> Thanks
> Hari
> MCDBA
>
> "Arzan" <Arzan@.discussions.microsoft.com> wrote in message
> news:8A81A4E5-F699-4552-A0C0-8310527A7EA5@.microsoft.com...
> the mdf file.
> Can someone suggest.
>
>

error attaching single db .mdf file

Hi,
The dev deleted some of the ldf files mistakenly and are unable to attach the mdf file.
How can i re-create the db with the existing mdf file and a new ldf file. Can someone suggest.
Thanks,
Arzanhttp://www.sqlservercentral.com/scripts/scriptdetails.asp?scriptid=599
Restoring a .mdf
--
Andrew J. Kelly SQL MVP
"Arzan" <Arzan@.discussions.microsoft.com> wrote in message
news:8A81A4E5-F699-4552-A0C0-8310527A7EA5@.microsoft.com...
> Hi,
> The dev deleted some of the ldf files mistakenly and are unable to attach
the mdf file.
> How can i re-create the db with the existing mdf file and a new ldf file.
Can someone suggest.
> Thanks,
> Arzan|||Hi,
Try using the procedure "sp_attach_single_file_db" to attach the database
with specifying the MDF file only.
EXEC sp_attach_single_file_db 'dbname', 'c:\mssql\data\dbname.mdf'
THis will create a new database with exiting mdf and new ldf file.
This command will fail in below scenarios:-
1. If the database is not detached using sp_detach_db
2. If you have multiple LDF files in your old database.
If your sp_attach_single_file_db command fails then probaly you have to
restore the database from good backup available.
Thanks
Hari
MCDBA
"Arzan" <Arzan@.discussions.microsoft.com> wrote in message
news:8A81A4E5-F699-4552-A0C0-8310527A7EA5@.microsoft.com...
> Hi,
> The dev deleted some of the ldf files mistakenly and are unable to attach
the mdf file.
> How can i re-create the db with the existing mdf file and a new ldf file.
Can someone suggest.
> Thanks,
> Arzan

Wednesday, February 15, 2012

Error Adding SQL Server Login Properties

Hello,
I have SQL 200 SP3 box that has a web app with a hard coded user; I
tried to re-add the user after it was deleted.
I now get the following error when trying to add the database access:
"Error 21002 [SQL-DMO] user 'unsername' already exists."
Any help would be greatly appreciated.
I fixed my issue by running the following:
use my_db;
go
sp_change_users_login AUTO_FIX, 'my_user'
go
Hulicat wrote:
> Hello,
> I have SQL 200 SP3 box that has a web app with a hard coded user; I
> tried to re-add the user after it was deleted.
> I now get the following error when trying to add the database access:
> "Error 21002 [SQL-DMO] user 'unsername' already exists."
>
> Any help would be greatly appreciated.

Error Adding SQL Server Login Properties

Hello,
I have SQL 200 SP3 box that has a web app with a hard coded user; I
tried to re-add the user after it was deleted.
I now get the following error when trying to add the database access:
"Error 21002 [SQL-DMO] user 'unsername' already exists."
Any help would be greatly appreciated.I fixed my issue by running the following:
use my_db;
go
sp_change_users_login AUTO_FIX, 'my_user'
go
Hulicat wrote:
> Hello,
> I have SQL 200 SP3 box that has a web app with a hard coded user; I
> tried to re-add the user after it was deleted.
> I now get the following error when trying to add the database access:
> "Error 21002 [SQL-DMO] user 'unsername' already exists."
>
> Any help would be greatly appreciated.