Showing posts with label app. Show all posts
Showing posts with label app. Show all posts

Monday, March 26, 2012

how to make column lowercase

I have a table that contains names that are all in upper case, this column is called in many different areas of my web app. I wanted to make the names all lowercase, or with the leading character only capitalized.
How can I make a column within a SQL table lowercase at the SQL server end and not the programming side?

thanks,
Frank


UPDATE
TableName
SET
FieldName = LCASE(FieldName)

For all future entries, you create a trigger that will execute on insert.|||If you are talking about the data to be converted in lowercase, then following is the syntax:

select lower(column_name) from table_name

To convert first letter in Capital, you could write your own function, using UPPER, LOWER, SUBSTRING and CHARINDEX.
You can use CHARINDEX to find the spaces, then UPPER the character following each space.|||How can I do this automatically in the Formula field of the Table Design.

thanks

Monday, March 19, 2012

How to log disconnects?

Check the app logs first, are they logging query/conection
errors,timeouts,etc?
And look for specific errors (ADO,OLE-DB,etc)
Will wrote:
> I need to log user disconnects for a specific DB. I do not know how to
> do this relabily. The application owner is under the impression that
> our SQL cluster is disconnecting their users. Which I am fairly
> confident is not the case.
> Any ideas on how to do this? Specifically disconnects that are not
> 'requested' but either forced or lost.
> Thanks!That kind of logging 'should' happen on the client. For a limited time span,
you may wish to use Profiler.
Application timeout is the first thing to explore. Check the ADO connection
timeout (I think the default is 60 seconds -but I don't remember with
certainty.)
--
Arnie Rowland, YACE*
"To be successful, your heart must accompany your knowledge."
*Yet Another certification Exam
"Will" <wfj5444@.gmail.com> wrote in message
news:1151588003.074757.326780@.m73g2000cwd.googlegroups.com...
>I need to log user disconnects for a specific DB. I do not know how to
> do this relabily. The application owner is under the impression that
> our SQL cluster is disconnecting their users. Which I am fairly
> confident is not the case.
> Any ideas on how to do this? Specifically disconnects that are not
> 'requested' but either forced or lost.
> Thanks!
>|||I need to log user disconnects for a specific DB. I do not know how to
do this relabily. The application owner is under the impression that
our SQL cluster is disconnecting their users. Which I am fairly
confident is not the case.
Any ideas on how to do this? Specifically disconnects that are not
'requested' but either forced or lost.
Thanks!|||Check the app logs first, are they logging query/conection
errors,timeouts,etc?
And look for specific errors (ADO,OLE-DB,etc)
Will wrote:
> I need to log user disconnects for a specific DB. I do not know how to
> do this relabily. The application owner is under the impression that
> our SQL cluster is disconnecting their users. Which I am fairly
> confident is not the case.
> Any ideas on how to do this? Specifically disconnects that are not
> 'requested' but either forced or lost.
> Thanks!|||That kind of logging 'should' happen on the client. For a limited time span,
you may wish to use Profiler.
Application timeout is the first thing to explore. Check the ADO connection
timeout (I think the default is 60 seconds -but I don't remember with
certainty.)
--
Arnie Rowland, YACE*
"To be successful, your heart must accompany your knowledge."
*Yet Another certification Exam
"Will" <wfj5444@.gmail.com> wrote in message
news:1151588003.074757.326780@.m73g2000cwd.googlegroups.com...
>I need to log user disconnects for a specific DB. I do not know how to
> do this relabily. The application owner is under the impression that
> our SQL cluster is disconnecting their users. Which I am fairly
> confident is not the case.
> Any ideas on how to do this? Specifically disconnects that are not
> 'requested' but either forced or lost.
> Thanks!
>|||Right,
That is the issue only one application out of many is seeing the issue.
It does not sound like an SQL Server issue. They are seeing the
disconnects on their side. We have no other users reporting any other
issues or symptoms.
Thanks,
Will
Arnie Rowland wrote:[vbcol=seagreen]
> That kind of logging 'should' happen on the client. For a limited time spa
n,
> you may wish to use Profiler.
> Application timeout is the first thing to explore. Check the ADO connectio
n
> timeout (I think the default is 60 seconds -but I don't remember with
> certainty.)
> --
> Arnie Rowland, YACE*
> "To be successful, your heart must accompany your knowledge."
> *Yet Another certification Exam
>
> "Will" <wfj5444@.gmail.com> wrote in message
> news:1151588003.074757.326780@.m73g2000cwd.googlegroups.com...|||Right,
That is the issue only one application out of many is seeing the issue.
It does not sound like an SQL Server issue. They are seeing the
disconnects on their side. We have no other users reporting any other
issues or symptoms.
Thanks,
Will
Arnie Rowland wrote:[vbcol=seagreen]
> That kind of logging 'should' happen on the client. For a limited time spa
n,
> you may wish to use Profiler.
> Application timeout is the first thing to explore. Check the ADO connectio
n
> timeout (I think the default is 60 seconds -but I don't remember with
> certainty.)
> --
> Arnie Rowland, YACE*
> "To be successful, your heart must accompany your knowledge."
> *Yet Another certification Exam
>
> "Will" <wfj5444@.gmail.com> wrote in message
> news:1151588003.074757.326780@.m73g2000cwd.googlegroups.com...

Wednesday, March 7, 2012

How to launch package from client machine, display progress and finally results?

Please help. I'm completely new to SSIS, and I was hoping someone could point me in the right direction(s).

I am developing a winforms client app, and I need to be able to provide the user with the ability to import data in CSV format into our application's database.

I'd like to use SSIS if possible, as long as what I am trying to do isn't near impossible.

I'm thinking of a UI where the user can specify a flat file (CSV) to upload and be processed by an SSIS package on a remote database server.

This package will be responsible for validating the CSV file and inserting data into the database as appropriate.

Is there a way I can:

    launch an SSIS package remotely, from a winforms app on the client machine that is not running SQL server (preferably asynchronously) -- and pass it some parameters, including the import file itself

    (optionally) provide progress feedback to the client pc to let them know it is being processed

    display a nice SSRS report on the client upon completion that tells them exactly what the success/failure of the import was (how many rows processed, which ones failed and why, etc)

Any helpful examples, links, etc would be most appreciated.

Thanks in advance!

1 - How about hosting it on the SQL Server, and start ith through T-SQL. The best way to get the asycn behaviour is to use a job.

How to: Run a Package Using a SQL Server Agent Job
(http://msdn2.microsoft.com/en-us/library/69d3958c-6abc-41ae-8428-312917867c9a.aspx)

2 - You will not get anything back from the job, as it you have no handle back to it. You could turn on logging in your package, perhaps to SQL Server, and then query the table on a polling basis to provide progress to a user.

3 - A combination of SQL logging and some custom logging within the package and you should be able to achieve this.