Showing posts with label management. Show all posts
Showing posts with label management. Show all posts

Thursday, March 8, 2012

Change authentication

I am not good endlish. I am thai.

I try to change authentication from win --> sql authen. I am use sql express and management tool.I am select at .\sqlexpress --> property -->security and change authentication from win authentication to sql authentication and click OK

after that re-connect and change to sql authentication but It not work.

Pls tell me How to change authentication.

Thank you for you help

Hi there,

From your description it seems that you've changed the authentication mode successfully.

I would assume, then, that the problem has something to do with the SQL Server account you are using. So:

* What account are you using?
* Does it have a password that you might have forgotten to enter? (sorry about asking that)

What you could do, to test that everything is absolutely OK is switch back to Windows Authentication, log into your SQL Server instance and create a new SQL Server user (e.g. test_user) with no password (or you could set a password, up to you).

After doing that, disconnect from your sever and reconnect using SQL Server Authentication. Set the account as the one you just created and enter whatever password you set (or nothing if you set not password).

Hopefully you'll log in successfully.

Hope that helps a bit, but sorry if it doesn't
|||You have to restart the service.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

Friday, February 24, 2012

Centralized reports logging

We are using sql server 2000 reporting services. Management needs to know the
list of reports actually used, their frequency, and all the statistics along
with each one of them such as who, when, where, how long etc.
One way to that is to create a table in sql server and log all the facts
related to these attributes when the report(s) are launched at the front end
(asp.net) side. I am thinking out loud that SSRS must be logging this
information some where.
Is there any way to get to it? If yes, then how. I will google and look at
BOL to see if this could be done. In the mean time, any hints, pointers are
greatly appreciated.
Thank you in advance...RS has a series of reports that include packages you schedule (from SQL
Server). I haven't done this yet (I am doing it for RS 2005 but it uses
Integration Services instead of DTS).
RS 2000 steps
1.Reports you can download
2. Create table
3. Create DTS and schedule. This loads the table with info on usage
4. Run or schedule to run the management reports
You definitely do not need to roll you own with this.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"sqlster" <nospam@.nospam.com> wrote in message
news:9A9FF399-FF68-45D7-B60D-C1A1BF21242F@.microsoft.com...
> We are using sql server 2000 reporting services. Management needs to know
> the
> list of reports actually used, their frequency, and all the statistics
> along
> with each one of them such as who, when, where, how long etc.
> One way to that is to create a table in sql server and log all the facts
> related to these attributes when the report(s) are launched at the front
> end
> (asp.net) side. I am thinking out loud that SSRS must be logging this
> information some where.
> Is there any way to get to it? If yes, then how. I will google and look at
> BOL to see if this could be done. In the mean time, any hints, pointers
> are
> greatly appreciated.
> Thank you in advance...

Cellset.open hangs, query works fine in Management Studio?

Hi All,

We are experiencing a very strange Cellset behaviour.

Trying to open a cellset in VBA (same in VB6) in Excel 2003, using ADOMD.Catalog, accessing a AS2005SP2, the system 'sometimes' hangs, depending on the 'dynamic' MDX query string. While the query works fine in the SQL Management Studio.

For example, this MDX works fine:

select descendants {[Measures].[NumberOfA]} on columns, [Time].[Month].[200502] on rows

from [DWH]
where {([Client].[Hierarchy].[Group].&[G000879])}

This one causes Excel (and VB6) to freeze, but nicely returns a result in SQL Management Studio!!!?

select descendants {[Measures].[NumberOfA]} on columns, [Time].[Month].[200501] on rows

from [DWH]
where {([Client].[Hierarchy].[Group].&[G000879])}

There is nothing wrong with the data, it's more connection related (I expect...)?

Does somebody have any advice?

PS: we have msxml6,asoledb9 installed

It is a firewall issue. See also: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1558402&SiteID=1

Cheers,

Tom

Sunday, February 12, 2012

Cast Problem

If I run the following query in SQL Server Management Studio it returns the correct results: (Searching the table for the field "SpecimenID (an INT)" against the data entered (a Text Field - "7575-01") from the submitted form.

SELECT ClinicalID, SpecimenID, PatientID, LabID, Accession, Bacillus, Francisella, Yersinia, Brucella, Burkholderia, Coxiella, Staphylococcus, Other,
OtherExplanation, CollectionDate, strddlTransportMedium, strddlSpecimenSource, UserName, Test, SpecimenCount, DateAndTime
FROM ClinicalSpecimen
WHERE (SpecimenID = CAST('7575-01' AS VARCHAR(50)))
ORDER BY SpecimenID DESC

However, when I try to use the same logic in the ASPX.VB code behind page, as follows below, I either get an error message (Syntax error converting the varchar value '' to a column of data type int.) or record not found... Can someone please explain what I am missing here...

MySQL ="SELECT * FROM ClinicalSpecimen WHERE SpecimenID = CAST(('" & AccessionPresent &"') AS VARCHAR(50))"

*"AccessionPresent" is the value of the text field retrieved from the form.

I guess what I am really asking is how can I search for an INT value in a table using a VARCHAR Field.

Thank you for any or all assistance !!!

Looks like you have a blank value that you are trying to convert to int. Check for NULL/Blanks in your application before you CAST as varchar.

|||

Instead of:
MySQL ="SELECT * FROM ClinicalSpecimen WHERE SpecimenID = CAST(('" & AccessionPresent &"') AS VARCHAR(50))"

Try:
MySQL ="SELECT * FROM ClinicalSpecimen WHERE SpecimenID = CAST('" & AccessionPresent &"' AS VARCHAR(50))"

Remove the Paren's, also as shark said, do something like if string.isnullorempty(AccessionPresent) then put a dummy value their or whatever

|||

Try this (use this query in your MySQL):

1SELECT *2FROM ClinicalSpecimen3WHERE SpecimenID =CAST(4ISNULL(5 ('" & AccessionPresent & "')6 , -1-- you will get -1 for Null cases7 )8AS VARCHAR(50)9 )1011-- I splited the query to make it more readable (you can put it in one line)

Hope this will help.

Good luck.

|||

You are casting the wrong side to a varchar. The right side of your comparision is always a varchar already. It's the int side that isn't.

Try:

Dim conn as new SqlConnection(...)

Dim cmd as new SqlCommand("SELECT * FROM ClinicalSpecimen WHERE CAST(SpecimenID AS varchar(50))=@.SpecimenID",conn)

cmd.Parameters.Add("@.SpecimenID",SqlDbType.varchar).Value=AccessionPresent

Note, this also removes the SQL Injection problem you had.

|||

Motley:

You are casting the wrong side to a varchar. The right side of your comparision is always a varchar already. It's the int side that isn't......

Good catch Motley.

|||

ndinakar:

Motley:

You are casting the wrong side to a varchar. The right side of your comparision is always a varchar already. It's the int side that isn't......

Good catch Motley.

Yes, good catch MotleyYes

How we did not realise that!!Embarrassed