Showing posts with label current. Show all posts
Showing posts with label current. Show all posts

Sunday, March 25, 2012

Adding a linked server?

I have a huge table called "Clientdata" in a database called "Accounts" against which I have to run current month queries. Not only does this kill the box it runs on, but slows down everything in sight.

What I would like to do is export only the current month records from this database\table to another database\table (Statements\Clientdata) by means of a stored proc.

How do I setup the store proc as I have not done one yet ?

Thanksy dont u use a DTS package?

Adding a Distributor

I have a current merge replication system with a publisher server that is its
own distributor, and four remote subscriber servers. I now want to make the
present publisher/distributor a distibutor, and add a new publisher only
server. What is the easiest method?
Can I avoid having to recreate the whole system and remake the subscribers?
Thanks for advice.
You will have to script out your publications and subscriptions. Do a final
synchronization, drop them, and then migrate to the new publisher.
Then recreate everything.
Hilary Cotter
Looking for a SQL Server replication book?
Now available for purchase at:
http://www.nwsu.com/0974973602.html
"MDP" <MDP@.discussions.microsoft.com> wrote in message
news:0578784C-DA1B-40D5-9903-3F7228E79EA5@.microsoft.com...
>I have a current merge replication system with a publisher server that is
>its
> own distributor, and four remote subscriber servers. I now want to make
> the
> present publisher/distributor a distibutor, and add a new publisher only
> server. What is the easiest method?
> Can I avoid having to recreate the whole system and remake the
> subscribers?
> Thanks for advice.

Adding a default value to a table

I'm new to SQL server and am in the process of converting an Access Db to SQL.

What I'd like to happen is for the current date and an Autonumber generated as soon as the user enters a value in another field. This was fairly straightforward in Access. When I try to set the default in design table (inSQL), the date() is not available. After a little research I came up with CREATE DEFAULT and Bind column commands, Global variables, etc.

I have a couple of questions for anyone that might know:

Is there an easier way than this to create default values in a table? AND,

Would I also have to bind columns for Table lookups? For example, if I wanted a price to be returned after the product ID was entered (Automatic in Access if relationship/form setup properly), would I have to bind the column? Or would it happen automatically?you can use getdate() or current_timestamp instead of date()

for "lookup" feature of access you can create calculated field.

Adding a date to a report

I'd like to add a date in the heading of the report. Since the current date is not part of the stored procedure that I'm using how can I get the date? I was hoping for a built-in function of some kind.

you should be able to just add a textbox and enter the expression

= System.DateTime.Now()

|||

Are you referring to referencing a date/time other than the current date/time? If so, I would like to know how to do this as well. I have a DTS (SSIS) job that i want to reference the time it ran in my report. I could do the same thing with a stored proc if I had to.

Thanks everyone.

|||No, all I needed was the date/time the report is produced and I already received that answer.sql

Tuesday, March 20, 2012

added article to current transactional repl. How to replicate additional article?

Hi, I already have transactional replication setup between two servers
(production server to reporting server).
I have created a new table witha primary key and have added this table as
an article to the publication.
How can i get my setup to take an initial snapshot of the table and apply it
to the reporting server?
Any help most appreciated!
thanks
John
John,
you will need to run the snapshot agent then synchronize. The whole process
from start to finish is:
exec sp_addarticle @.publication = 'tTestFNames'
, @.article = 'tEmployees'
, @.source_table = 'tEmployees'
exec sp_addsubscription @.publication = 'tTestFNames'
, @.article = 'tEmployees'
, @.subscriber = 'RSCOMPUTER'
, @.destination_db = 'testrep'
Start snapshot agent, start distribuition agent.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Thanks Paul,
Are you saying that I have to take a snapshot of the whole database all over
again?
I thought I could take a snapshot of just the article that has been newely
added to the publication?
In actual fact, the 'Last Action' column on my agent (subsicriber' is saying
"The initial snapshot for article 'myTable' is not yet available"
Many thanks!
John
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:OQ2XvSVEGHA.4000@.TK2MSFTNGP10.phx.gbl...
> John,
> you will need to run the snapshot agent then synchronize. The whole
> process from start to finish is:
> exec sp_addarticle @.publication = 'tTestFNames'
> , @.article = 'tEmployees'
> , @.source_table = 'tEmployees'
> exec sp_addsubscription @.publication = 'tTestFNames'
> , @.article = 'tEmployees'
> , @.subscriber = 'RSCOMPUTER'
> , @.destination_db = 'testrep'
> Start snapshot agent, start distribuition agent.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
|||John,
if you add a new table and subscription to that table, running the snapshot
agent won't create a complete snapshot - just the new article.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

Saturday, February 25, 2012

Add events as one batch

Hi,

Can I add collection of events to notification services from my .NET application?

Current implementation in my code:

Code Snippet

// create a new event and event collector

Event myEvent = new Event(application, eventClassName);

EventCollector eventCollector = new EventCollector(application, EVENT_CREATOR);

// Set field values of the event.

.

.

.

// add the event

eventCollector.Write(myEvent);

// commit the 1-event batch

eventCollector.Commit();

Let me know how can I commit collection of events at once rather than one by one.

Please give me your suggestions on this whether this can not be achieved or NOT.

Thanks in advance

Yogendran

Ah... Guys do you know where I can get the answer for this question?

Please help me.

Do you think this cann't be done?

Regards

Yogendran

Sunday, February 19, 2012

add and subract time to a date

Hello all,
Lets say I have the current date and I would like to get the date
two weeks in advance. How would I do this in T-sql? The T-SQL should
take into account if the month changes. For example, if todays date
is 1/17/2003 the advanced date would be 2/17/2003.

Thanks,
BillyYou can use DATEADD function to accomplish this. Refer to SQL Server Books
Online for more details. For example :

SELECT DATEADD(m, 1, '20030117') ;

--
- Anith
( Please reply to newsgroups only )

Monday, February 13, 2012

Add a "print" button to Report Manager?

I know that there is a print button with RS 2.0, but is there a way to
add the button on the current version of report manager?
Thanks,
TrintSP2 will have the print functionality. It is coming out very soon, so
please keep an eye out for it in the next couple weeks to month or so.
--
| From: "trint" <trinity.smith@.gmail.com>
| Newsgroups: microsoft.public.sqlserver.reportingsvcs
| Subject: Add a "print" button to Report Manager'
| Date: 29 Mar 2005 04:25:25 -0800
| Organization: http://groups.google.com
| Lines: 5
| Message-ID: <1112099125.393374.154240@.o13g2000cwo.googlegroups.com>
| NNTP-Posting-Host: 65.244.90.165
| Mime-Version: 1.0
| Content-Type: text/plain; charset="iso-8859-1"
| X-Trace: posting.google.com 1112099129 1365 127.0.0.1 (29 Mar 2005
12:25:29 GMT)
| X-Complaints-To: groups-abuse@.google.com
| NNTP-Posting-Date: Tue, 29 Mar 2005 12:25:29 +0000 (UTC)
| User-Agent: G2/0.2
| Complaints-To: groups-abuse@.google.com
| Injection-Info: o13g2000cwo.googlegroups.com; posting-host=65.244.90.165;
| posting-account=Ih-yCA0AAADzXymSlPU6JhcQ_cZnGStd
| Path:
TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onli
ne.de!news.glorb.com!postnews.google.com!o13g2000cwo.googlegroups.com!not-fo
r-mail
| Xref: TK2MSFTNGXA03.phx.gbl microsoft.public.sqlserver.reportingsvcs:46347
| X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
|
| I know that there is a print button with RS 2.0, but is there a way to
| add the button on the current version of report manager?
| Thanks,
| Trint
|
|

Thursday, February 9, 2012

ActiveX Vbscript still ok in Yukon ?

Will I still be able to use my current VBscripts (Active X) code in dts
packages in Yukon ?Hi
In SQL Server 2005, there is an optional install of the SQL Server 2000 DTS
engine. this will allow the existing scripts to work (as long as you don't
use any T-SQL that is no longer supported in SQL Server 2005).
The new DTS engine in SQL Server 2005 is amazing and you will be very
tempted to convert your existing packages ASAP to the new engine.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Rob C" <rwc1960@.bellsouth.net> wrote in message
news:I81xd.21621$rO2.720@.bignews1.bellsouth.net...
> Will I still be able to use my current VBscripts (Active X) code in dts
> packages in Yukon ?
>