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

Wednesday, March 21, 2012

How to setup a repeated update to a table in SQL?

Hi:

I am fairly new to SQL Server 2005 and before now, I have only had to restore databases, and connect to tables via ODBC connection in a reference (read only) setup. Today, I have a very small project to set up using the server.

I have a userlogon.csv file that the network stores on a file server in a hidden share \logon$. It has 4 columns, UserID, Computer, Date, Time.

I was able to create a database called UserLogon and import the file as it was today. I want to create a scheduled update so the server would go to this file perhaps 4 times a day (or more) and grab any new logins that have appended itself to this CSV file.

So, as a newbie with a 1,900 page SQL Server 2005 unleashed manual at my side, could someone outline what the steps are in general I should follow to set this up?

I have the process laid out in my mind, but I don't know how to translate in into a scheduled task of the SQL Server :

1. Create DB and import the table (done)

2. create a stored procedure that connects to the CSV file and evaluates date and time stamps then appends any new records into the SQL db table. (appending records would be achieved by using the INSERT and WHERE statements?)

3. Schedule a job to perform this task on a routine basis.

It appears that the file connection portion of this set up is defined outside the evaluation and append record procedure? (not in the same stored procedure). Perhaps I tie the whole process together using the Job Manager, selecting the file settings, and then the stored procedure to be performed on the file.?

I hope I have been descriptive enough to ask if someone could outline the modules/features/processes involved so I can read up on them and figure them out using the book.

Thank you in advance.

David

David:

It sounds to me like you need a good book on the subject of "Database Design". I would suggest Pro SQL Server 2005 Database Design and Optimization by MVP Louis Davidson.

Maybe since you are just getting started a better choice for a first book would be Data Modeling Essentials by Graeme Simison

Kent

Monday, March 12, 2012

How to set SQL Profiler via command line

Hello,

How can I set SQL Profiler to capture the logs via command line?

This is what I have:

I already have a SQL Profiler Template (fooTemplate.tdf) which tells what I need SQL to capture.

C:\>"C:\Program Files\Microsoft SQL Server\90\Tools\Binn\PROFILER90.EXE" /Sfoo /Dfoo /E /T"c:\fooTemplate.tdf" /Oc:\mysql.out

What other parameters am I missing?

Thanks!

J

Trace automation is done with the sp_trace_create and it's assocciated procedures, not through the profiler gui.

Books Online: ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/fd605a61-ade1-49d6-8174-cbe789b6d342.htm

How to set SQL Profiler via command line

Hello,

How can I set SQL Profiler to capture the logs via command line?

This is what I have:

I already have a SQL Profiler Template (fooTemplate.tdf) which tells what I need SQL to capture.

C:\>"C:\Program Files\Microsoft SQL Server\90\Tools\Binn\PROFILER90.EXE" /Sfoo /Dfoo /E /T"c:\fooTemplate.tdf" /Oc:\mysql.out

What other parameters am I missing?

Thanks!

J

Trace automation is done with the sp_trace_create and it's assocciated procedures, not through the profiler gui.

Books Online: ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/fd605a61-ade1-49d6-8174-cbe789b6d342.htm

|||How about if the SQL Server I used is 2000, I've checked it b4 but cannot find the Profiler90.exe, only Profiler.exe is exist which don't hv output file path I can specified. Pls help. Thanks.|||

Please read the following to find out how to monitor SQL Server using Profiler Traces.

http://yukonspace.blogspot.com/2007/09/server-side-profiler-traces.html

The EXE for SQL Server 2000 Profiler is Profiler.exe and for SQL Server 2005 is Profiler90.exe

How to set SQL Profiler via command line

Hello,

How can I set SQL Profiler to capture the logs via command line?

This is what I have:

I already have a SQL Profiler Template (fooTemplate.tdf) which tells what I need SQL to capture.

C:\>"C:\Program Files\Microsoft SQL Server\90\Tools\Binn\PROFILER90.EXE" /Sfoo /Dfoo /E /T"c:\fooTemplate.tdf" /Oc:\mysql.out

What other parameters am I missing?

Thanks!

J

Trace automation is done with the sp_trace_create and it's assocciated procedures, not through the profiler gui.

Books Online: ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/fd605a61-ade1-49d6-8174-cbe789b6d342.htm

|||How about if the SQL Server I used is 2000, I've checked it b4 but cannot find the Profiler90.exe, only Profiler.exe is exist which don't hv output file path I can specified. Pls help. Thanks.|||

Please read the following to find out how to monitor SQL Server using Profiler Traces.

http://yukonspace.blogspot.com/2007/09/server-side-profiler-traces.html

The EXE for SQL Server 2000 Profiler is Profiler.exe and for SQL Server 2005 is Profiler90.exe

How to set SQL Profiler via command line

Hello,
How can I set SQL Profiler to capture the logs via command line? I wanted to
this just before my testing.
This is what I have:
I already have a SQL Profiler Template (fooTemplate.tdf) which tells what I
need SQL to capture.
C:\>"C:\Program Files\Microsoft SQL Server\90\Tools\Binn\PROFILER90.EXE"
/Sfoo /Dfoo /E /T"c:\fooTemplate.tdf" /Oc:\mysql.out
What other parameters am I missing?
Thanks!
Read the below article about server side tracing.
http://vyaskn.tripod.com/server_side_tracing_in_sql_server.htm
http://www.dbazine.com/sql/sql-articles/larsen6
THanks
Hari
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OThA6%23tZHHA.1388@.TK2MSFTNGP05.phx.gbl...
> Read up on "Server Side Trace".
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "MS" <MS@.discussions.microsoft.com> wrote in message
> news:301D495F-1B3F-4694-B9CA-6A3417F7CDEF@.microsoft.com...
>
|||On 15 Mar, 14:14, "Hari Prasad" <hari_prasa...@.hotmail.com> wrote:
> Read the below article aboutserverside tracing.
> http://vyaskn.tripod.com/server_side_tracing_in_sql_server.htm
> http://www.dbazine.com/sql/sql-articles/larsen6
> THanks
> Hari
> "Tibor Karaszi" <tibor_please.no.email_kara...@.hotmail.nomail.com> wrote in
> messagenews:OThA6%23tZHHA.1388@.TK2MSFTNGP05.phx.gb l...
>
>
>
>
>
>
> - Show quoted text -
That was very useful.. Thanks hari..
-PrasannaKRao

Friday, March 9, 2012

How to set PDF margins when rendering via WS

I'm rendering reports in PDF format in aspx pages by calling the ssrs
webservice. Is there a way to adjust the side margins in the PDF?
Currently the margins are a default of 1 inch on each side and I want to
reduce it to 1/2 inch on each side.
Thanks.
--
moondaddy@.nospam.nospamHello,
I suggest that you refer to the following topics in Reporting Services
Books Online:
PDF Device Information Settings
Device Information Settings
Render Method
I hope the information is helpful.
Sophie Guo
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
=====================================================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.

Friday, February 24, 2012

HOW to set Authentication Using OSQL

I would like to change the authentication method for an MSDE instance. How
do I do it via OSQL ?
This I need when there is no EM installed. I would like to turn the default
authentication from Windows to Mixed mode.
I searched BOL but it talked about using EM.
Thanks in advance for your input.
MacYou can switch MSDE to mixed mode during installation and after that.
Here it is
http://support.microsoft.com/default.aspx?scid=kb;en-us;319930&Product=sql#5
Regards
---
All information provided above AS IS.
"Mac Vazehgoo" <mahmood.vazehgoo@.unisys.com> wrote in message
news:bnu8sh$20ag$1@.si05.rsvl.unisys.com...
> I would like to change the authentication method for an MSDE instance.
How
> do I do it via OSQL ?
> This I need when there is no EM installed. I would like to turn the
default
> authentication from Windows to Mixed mode.
> I searched BOL but it talked about using EM.
> Thanks in advance for your input.
> Mac
>|||Thanks for the quick response!! That worked.
"SkyWalker" <tcp_43@.hotmail.com_TAKETHISOFF> wrote in message
news:%23o1rkv9nDHA.372@.TK2MSFTNGP11.phx.gbl...
> You can switch MSDE to mixed mode during installation and after that.
> Here it is
>
http://support.microsoft.com/default.aspx?scid=kb;en-us;319930&Product=sql#5
>
> Regards
> ---
> All information provided above AS IS.
>
> "Mac Vazehgoo" <mahmood.vazehgoo@.unisys.com> wrote in message
> news:bnu8sh$20ag$1@.si05.rsvl.unisys.com...
> > I would like to change the authentication method for an MSDE instance.
> How
> > do I do it via OSQL ?
> > This I need when there is no EM installed. I would like to turn the
> default
> > authentication from Windows to Mixed mode.
> > I searched BOL but it talked about using EM.
> >
> > Thanks in advance for your input.
> > Mac
> >
> >
>

Sunday, February 19, 2012

How to send the SQL Reports via email.

Hi Everybody

can somebody please help in finding how to mail the sql server reports via email.

Thanks alot

Nee123

Copy this to help you:

Delivered by

Select the delivery extension to use to distribute the report. Selecting a delivery extension causes other settings to appear. The settings vary depending on the delivery extension you choose. Reporting Services provides Report Server File Share and Report Server E-mail delivery.

Report Server E-Mail Settings

Choosing Report Server E-mail shows delivery options that specify how to deliver a report to a mailbox. To e-mail a report, your report server must be configured for e-mail delivery. E-mail subscriptions provide fields that are familiar to e-mail users (for example, To, Subject, and Priority fields). Specify Include Report to embed or attach the report, and Include Link to include a URL to the report. Render Format to choose a presentation format for the attached or embedded report. For more information about how to specify these options, search SQL Server Books Online for the topic How to subscribe to a report.

Report Server File Share

Choosing Report Server File Share shows delivery options that specify how to deliver a report to a location on the file system. You can deliver any report to a file share. However, reports that support interactive features (including matrix reports that support drill-down to supporting rows and columns) are rendered as static files. You cannot view drill-down rows and columns in a file that is based on a matrix report.

The file share must be specified in Uniform Naming Convention (UNC) format (for example, \\myserver\myreportfiles). Do not include a trailing backslash in the path name. The file name is based on the report name, which you can override by setting the File Name option. The report file will be delivered in a file format that is based on the render format (for example, if you choose Excel, the report is delivered as an .xls file). For more information about how to specify these options, search SQL Server Books Online for the topic How to subscribe to a report.

|||If you use Report Manager, the email extension should be the default option when you select New Subscription. If the email extension is not there check the RSReportServer.config file and see if the configuration info for the email extension contains information for the smtpserver and from element. If not, add the correct information and the email extension will show up in Report Manager.|||

Thanks alot guys for your timely help

Best

Nee123

|||Hi I'm having problems getting the Report Server E-mail delivery option to show up I only have the File share option to chose from in my subscriptions. I edited the RSReportServer.config file and when i look at the Reporting Services Configuration Manager it looks like everything is set up correctly. It's using the desired sender address, delivery method = use SMTP server and the desired smtp server is listed.

Any clues to how i can get the e-mail delivery option to show up?

Thanks

|||

Please refer to the following link for the problem:

http://msdn2.microsoft.com/en-us/library/ms159155.aspx

How to send the SQL Reports via email.

Hi Everybody

can somebody please help in finding how to mail the sql server reports via email.

Thanks alot

Nee123

Copy this to help you:

Delivered by

Select the delivery extension to use to distribute the report. Selecting a delivery extension causes other settings to appear. The settings vary depending on the delivery extension you choose. Reporting Services provides Report Server File Share and Report Server E-mail delivery.

Report Server E-Mail Settings

Choosing Report Server E-mail shows delivery options that specify how to deliver a report to a mailbox. To e-mail a report, your report server must be configured for e-mail delivery. E-mail subscriptions provide fields that are familiar to e-mail users (for example, To, Subject, and Priority fields). Specify Include Report to embed or attach the report, and Include Link to include a URL to the report. Render Format to choose a presentation format for the attached or embedded report. For more information about how to specify these options, search SQL Server Books Online for the topic How to subscribe to a report.

Report Server File Share

Choosing Report Server File Share shows delivery options that specify how to deliver a report to a location on the file system. You can deliver any report to a file share. However, reports that support interactive features (including matrix reports that support drill-down to supporting rows and columns) are rendered as static files. You cannot view drill-down rows and columns in a file that is based on a matrix report.

The file share must be specified in Uniform Naming Convention (UNC) format (for example, \\myserver\myreportfiles). Do not include a trailing backslash in the path name. The file name is based on the report name, which you can override by setting the File Name option. The report file will be delivered in a file format that is based on the render format (for example, if you choose Excel, the report is delivered as an .xls file). For more information about how to specify these options, search SQL Server Books Online for the topic How to subscribe to a report.

|||If you use Report Manager, the email extension should be the default option when you select New Subscription. If the email extension is not there check the RSReportServer.config file and see if the configuration info for the email extension contains information for the smtpserver and from element. If not, add the correct information and the email extension will show up in Report Manager.|||

Thanks alot guys for your timely help

Best

Nee123

|||Hi I'm having problems getting the Report Server E-mail delivery option to show up I only have the File share option to chose from in my subscriptions. I edited the RSReportServer.config file and when i look at the Reporting Services Configuration Manager it looks like everything is set up correctly. It's using the desired sender address, delivery method = use SMTP server and the desired smtp server is listed.

Any clues to how i can get the e-mail delivery option to show up?

Thanks

|||

Please refer to the following link for the problem:

http://msdn2.microsoft.com/en-us/library/ms159155.aspx

How to send the SQL Reports via email

Hi Everybody

can somebody please help in finding how to mail the sql server reports via email.

Thanks alot

Nee123

Copy this to help you:

Delivered by

Select the delivery extension to use to distribute the report. Selecting a delivery extension causes other settings to appear. The settings vary depending on the delivery extension you choose. Reporting Services provides Report Server File Share and Report Server E-mail delivery.

Report Server E-Mail Settings

Choosing Report Server E-mail shows delivery options that specify how to deliver a report to a mailbox. To e-mail a report, your report server must be configured for e-mail delivery. E-mail subscriptions provide fields that are familiar to e-mail users (for example, To, Subject, and Priority fields). Specify Include Report to embed or attach the report, and Include Link to include a URL to the report. Render Format to choose a presentation format for the attached or embedded report. For more information about how to specify these options, search SQL Server Books Online for the topic How to subscribe to a report.

Report Server File Share

Choosing Report Server File Share shows delivery options that specify how to deliver a report to a location on the file system. You can deliver any report to a file share. However, reports that support interactive features (including matrix reports that support drill-down to supporting rows and columns) are rendered as static files. You cannot view drill-down rows and columns in a file that is based on a matrix report.

The file share must be specified in Uniform Naming Convention (UNC) format (for example, \\myserver\myreportfiles). Do not include a trailing backslash in the path name. The file name is based on the report name, which you can override by setting the File Name option. The report file will be delivered in a file format that is based on the render format (for example, if you choose Excel, the report is delivered as an .xls file). For more information about how to specify these options, search SQL Server Books Online for the topic How to subscribe to a report.

|||If you use Report Manager, the email extension should be the default option when you select New Subscription. If the email extension is not there check the RSReportServer.config file and see if the configuration info for the email extension contains information for the smtpserver and from element. If not, add the correct information and the email extension will show up in Report Manager.|||

Thanks alot guys for your timely help

Best

Nee123

|||Hi I'm having problems getting the Report Server E-mail delivery option to show up I only have the File share option to chose from in my subscriptions. I edited the RSReportServer.config file and when i look at the Reporting Services Configuration Manager it looks like everything is set up correctly. It's using the desired sender address, delivery method = use SMTP server and the desired smtp server is listed.

Any clues to how i can get the e-mail delivery option to show up?

Thanks

|||

Please refer to the following link for the problem:

http://msdn2.microsoft.com/en-us/library/ms159155.aspx