Showing posts with label via. Show all posts
Showing posts with label via. Show all posts

Thursday, March 22, 2012

Create subscription failed.

Hi
I am using merge replication to sync sqlserver 2000 sp3 database and sql
server ce 2.0 sp3 via PPC 2003. I received the following error.
"Sql CE Exception: Create subscription failed:
system.Data.Sqlserverce.sqlceException"
"Create subscription failed (27750 - 8004005)"
Please help.
80004005 is a generic access denied. Are you sure the account you are using
to pull the subscription is in the PAL of your merge publication?
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Pcherlop" <Pcherlop@.discussions.microsoft.com> wrote in message
news:930ED762-1874-4513-B675-0FFC27A418E0@.microsoft.com...
> Hi
> I am using merge replication to sync sqlserver 2000 sp3 database and sql
> server ce 2.0 sp3 via PPC 2003. I received the following error.
> "Sql CE Exception: Create subscription failed:
> system.Data.Sqlserverce.sqlceException"
> "Create subscription failed (27750 - 8004005)"
> Please help.

Create Subcription via VB Code

Could you point me in the right direction to samples to create a Subcription?
--
EdgarLook in the books online, they have a snippet that shows how to do this.
-Lukasz
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"mresanchez" <mresanchez@.donot-spam.com> wrote in message
news:FAC8AC06-F962-4CA5-8D16-3B31282F8996@.microsoft.com...
> Could you point me in the right direction to samples to create a
> Subcription?
> --
> Edgar

Wednesday, March 21, 2012

Create SQL 2000 user accounts with a script

> Is it possible to create multiple user accounts within SQL 2000 via a
> script? We have a database on a development server that is overwritten
> every night. I would like to be able to create a script to create the
> user
> accounts needed. Any help or guidance would be appreciated. Thank you.
> scott
Sure - lookup sp_addlogin and sp_grantdbaccess in BOL. It's likely that you
only need to grant existing logins access to the recreated database. I also
suggest reviewing sp_change_users_login - this will allow to synchronize the
users in the restored database with the correct login.Is it possible to create multiple user accounts within SQL 2000 via a
script? We have a database on a development server that is overwritten
every night. I would like to be able to create a script to create the user
accounts needed. Any help or guidance would be appreciated. Thank you.
scott|||> Is it possible to create multiple user accounts within SQL 2000 via a
> script? We have a database on a development server that is overwritten
> every night. I would like to be able to create a script to create the
> user
> accounts needed. Any help or guidance would be appreciated. Thank you.
> scott
Sure - lookup sp_addlogin and sp_grantdbaccess in BOL. It's likely that you
only need to grant existing logins access to the recreated database. I also
suggest reviewing sp_change_users_login - this will allow to synchronize the
users in the restored database with the correct login.|||It's very easy to write a script to do this, and then to set up a SQL Job to
run the script sortly after the database is replaced.
Arnie Rowland, YACE*
"To be successful, your heart must accompany your knowledge."
*Yet Another certification Exam
"spburke" <spburke@.discussions.microsoft.com> wrote in message
news:4B6B03EC-1227-4009-B7E5-EF8260BAA502@.microsoft.com...
> Is it possible to create multiple user accounts within SQL 2000 via a
> script? We have a database on a development server that is overwritten
> every night. I would like to be able to create a script to create the
> user
> accounts needed. Any help or guidance would be appreciated. Thank you.
> scott|||It's very easy to write a script to do this, and then to set up a SQL Job to
run the script sortly after the database is replaced.
Arnie Rowland, YACE*
"To be successful, your heart must accompany your knowledge."
*Yet Another certification Exam
"spburke" <spburke@.discussions.microsoft.com> wrote in message
news:4B6B03EC-1227-4009-B7E5-EF8260BAA502@.microsoft.com...
> Is it possible to create multiple user accounts within SQL 2000 via a
> script? We have a database on a development server that is overwritten
> every night. I would like to be able to create a script to create the
> user
> accounts needed. Any help or guidance would be appreciated. Thank you.
> scott|||scott,
email me at jrvickers@.hotmail.com (subject:msdn) and i'll email you back the
VBSCript file I use to create server databases and accounts for my network.
I
use it in conjunction with creating user accounts on our w2k3 AD Domain.
Jamie.
"spburke" wrote:

> Is it possible to create multiple user accounts within SQL 2000 via a
> script? We have a database on a development server that is overwritten
> every night. I would like to be able to create a script to create the use
r
> accounts needed. Any help or guidance would be appreciated. Thank you.
> scott

Thursday, March 8, 2012

Create new Date table with a stored proceedure

Hi,

I have a table from which I need to create a report via MSRS2005, however the data in the table is awful in its construction and I was hoping to be able to use a stored proceedure to create a new table in which I can manupulate the data, but my T-SQL programming skills aren't that clever, so if anyone can offer any advice I'd be most grateful:

In the existing table there are two columns; StartDate and EndDate which is pretty self explanitory - what I would like to do is create a new table with only one date column and if there is more than one day between StartDate and EndDate I would like it to fill in every date in between.

For example, if the StartDate is 01/06/2007 and the EndDate 10/06/2007 I'd like the new table to list dates 01/06/2007 through 10/06/2007 inclusive in one column.

Is this possible? All suggestions welcome.

Thanks in advance,

Paul

Might be the below code will help you.

Code Snippet

CREATE PROCEDURE FillDates
@.StartDate DATETIME,
@.EndDate DATETIME
AS
BEGIN
IF datediff(day,@.StartDate,@.EndDate) >0
BEGIN
CREATE TABLE #Calander(CalanderDay DateTime)
WHILE(@.StartDate<=@.EndDate)
BEGIN
INSERT #Calander SELECT @.StartDate
SET @.StartDate = DATEADD(day,1,@.StartDate)
END
SELECT CONVERT(VARCHAR,CalanderDay,103) FROM #Calander
END
ELSE
PRINT 'No'
END
GO

EXEC FillDates '06/01/2007', '06/10/2007'
GO

Thanks,

R@.j

Tuesday, February 14, 2012

Create Data Driven Subscription via C# code? SSRS 2005 EE (or Batch Reports?)

Hello,

Does anyone know if you can create a Data Driven Subscription via code (C#)? The web based Report Manager does it via the Subscriptions.aspx (I assume). Seems like they are using theMicrosoft.ReportingServices.UI.Pages.Subscriptions namespace.

I can't find any info on anybody doing it. So, here's my need, please tell me if I am on the right track.

In my ASP.NET 2.0 C# app, we use the SSRS Web Service (reportservice2005) to generate PDF reports in a new window. If the User requests a large amount of pages (say 1000), the request is timing out, as well as tying up the web server.

So, the thought was, why not submit these reports to a "Batch". It seems that Data Driven Subscriptions could do it but what I'd want is to create the Subscription on the fly and clean them up after they run (or weekly).

Should I go this approach,OR should I write a Windows Service (or Console App) that just uses the same SSRS Web Service (reportservice2005) to create my reports in batch mode?

Any thoughts are helpful.

Nothing like answering your own question. I guess after a good night's sleep I Googled the right phrase to see this link:

http://msdn2.microsoft.com/en-us/library/microsoft.wssux.reportingserviceswebservice.rsmanagementservice2005.reportingservice2005_methods.aspx

There is a CreateDataDrivenSubscription() method.

However, given my original question on proper approach,should I be doing it this way or write the windows service or console app to do it?

Thoughts?

|||We are looking into the same concept. We are trying to create a single data-driven subscription that runs nightly and all the "requests" for the day are processed. We're achieving this by inserting the "request" into the database. The only problem we are having now is how to do this for multi-value parameters since each row creates a different subscription and you can only reference one column per parameter. Good luck!