Showing posts with label hii. Show all posts
Showing posts with label hii. Show all posts

Sunday, March 11, 2012

"Stored Procedure" working every 5 minute, how?

hi
i working on SQL2000, and want to make "Stored Procedure" that's working
every 5 mibute, without making any calling.
how i can make that ?
--
Best Regards
Tark M. Siala
Development Manager
INTERNATIONAL COMPUTER CENTER (ICC.Networking)
Mobile: +218-91-3125900
E-Mail: tarksiala@.icc-libya.com
Messenger: tarksiala@.hotmail.com
Web Page: http://www.icc-libya.com
Blog: http://spaces.msn.com/tarksiala
======================================Hi Tark
You can set up a job to run the stored procedure on a 5-minute schedule.
Look up How To Create a Job.
(I also suggest you don't include quite so many newsgroups in your list.
What does this question have to do with clustering anyway? You included the
msde group also, does that mean you are running on msde? If so, you should
say that.)
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"Tark Siala" <tarksiala@.icc-libya.com> wrote in message
news:eH4GDSyXGHA.3936@.TK2MSFTNGP05.phx.gbl...
> hi
> i working on SQL2000, and want to make "Stored Procedure" that's working
> every 5 mibute, without making any calling.
> how i can make that ?
> --
> Best Regards
> Tark M. Siala
> Development Manager
> INTERNATIONAL COMPUTER CENTER (ICC.Networking)
> Mobile: +218-91-3125900
> E-Mail: tarksiala@.icc-libya.com
> Messenger: tarksiala@.hotmail.com
> Web Page: http://www.icc-libya.com
> Blog: http://spaces.msn.com/tarksiala
> ======================================
>
>

"SQL Server does not exist or access denied." after installing XP SP2

Hi!

I just installed Windows XP Service Pack 2 on my pc and I cannot make my asp.net applications access any database any more.

I tried starting the application up from the debugger in vs.net, but I got the same behaviour: I can open the login page but as soon as the application tries to connect to SQLServer I get the "SQL Server does not exist or access denied." error message.

I'm trying to connect with trusted_connection.

Can you guys help me out?Try this Microsoft KB article:

http://support.microsoft.com/default.aspx?kbid=839269|||Hi TechMickey,

Did you find a solution to the problem? As you remember I have the same problem and it is still not working.|||Hi bws,

no, I just removed sp2 :-(|||So you took the drastic step. I disabled the firewall but without improvement. I will do like you, get rid of the whole sp2-thing. until I see a solution.

"SQL Server does not exist or access denied" error when trying to connect from a Windows S

Hi!

I understand that this topic is one of the most discussed topics ever. However i could not find the relevant information after going through (almost) all the posts so far. Hence this post.


I am getting the 'SQL Server does not exist or access denied' error when I am trying to access SQL Server from a WINDOWS SERVICE. SQL Server and the Windows service are running on two different machines. (When they are on the same machine, it works). All the solutions I found so far are related to web apps. What should I do in the case of a windows service? My connection string uses SQL server authentication. (I tried with windows authentication. Its not working either.). Under what login does windows services run and how can I add it to valid SQL server logins?

what version of sql server you are using SQL 2000 or SQL 2005. If sql 2005 have you enabled remote connection on sql server|||I am using SQL Server 2000. My Connection String is "Data Source=Proficio3;Initial Catalog=PRO-TMS_2.5;User ID=service_login;Password=service"|||

Hi,

Please try to check if the SQL Server you're connecting to is the default instance on that server. If not, you will need to add instance name after the server name like:

Data Source=Proficio3\SQLInstance

Thursday, March 8, 2012

"SELECT DISTINCT and ORDER BY"-problem

Hi!

I can't seem to get my query to work. It returns (translated from Swedish):

Microsoft JET Database Engine (0x80004005)
The ORDER BY-instruction (myDate)..."doesn't work with"...DISTINCT.

This is my query (somewhat simplified):

set rs=Server.CreateObject("ADODB.recordset")
sql="SELECT DISTINCT DATEPART(year, myDate) AS 'myColumn_alias' FROM myDB"
sql=sql & " WHERE myName='" & myName & "'"
sql=sql & " ORDER BY myColumn_alias"
rs.Open sql,conn

Is it because I have a WHERE-clause? If so, how should I design my query (I need only the years to populate a "select from" dropdownbox)? Or is it something else?

ThanksI don't think you can refer to a column alias the samw way you refer to a column.

Try:

ORDER BY DATEPART(year, myDate)|||I've tried that, but then I get the message that too few parameters are given and that 1 is expected.

:(|||All I had to do was to use YEAR(myDate) instead of DATEPART(year, myDate). Now it works!

"SA" Insuffient Permission

Hi!
I just set up an alert to know when someone try to use the SA account.
This morning I received the alert in my inbox. Is working fine.
Do you know if there is any way that I can Know WHO is the user or computer
trying to use the SA account?
You help will be really aprecitated.
Kind Regards.
Hernan VilarHi,
Alert can fire a task which will search the sysprocesses table and
insert into a audit table (Normal table) with the below info,
HOSTNAME,
NTusername,
GETDATE()
Thanks
Hari
MCDBA
"Hernan Vilar" <hvilar@.corin.co.uk> wrote in message
news:0FE5FF70-C4F2-457B-8A68-F916DF6E3550@.microsoft.com...
quote:

> Hi!
> I just set up an alert to know when someone try to use the SA account.
> This morning I received the alert in my inbox. Is working fine.
> Do you know if there is any way that I can Know WHO is the user or

computer trying to use the SA account?
quote:

> You help will be really aprecitated.
> Kind Regards.
> Hernan Vilar
|||If the connection using SA is actually made this method will work. If the
connection fails then the method will not work bedause there is no entry in
sysprocesses. If the connection fails, I am not aware of a method to
determine who attempted the connection.
Rand
This posting is provided "as is" with no warranties and confers no rights.|||I would be carefull of this , I have 2 different servers that get hit
10-20,000 a night, it could get messy.
I would consolidate the logins or you may get a few emails 8-)..
Don
"Hernan Vilar" <hvilar@.corin.co.uk> wrote in message
news:0FE5FF70-C4F2-457B-8A68-F916DF6E3550@.microsoft.com...
quote:

> Hi!
> I just set up an alert to know when someone try to use the SA account.
> This morning I received the alert in my inbox. Is working fine.
> Do you know if there is any way that I can Know WHO is the user or

computer trying to use the SA account?
quote:

> You help will be really aprecitated.
> Kind Regards.
> Hernan Vilar

Saturday, February 25, 2012

"Login failed for user MyPC/ASPNET"

Hi

I created my DB in SQL 2005 Express in VS IDE. I have my app in IIS. When I try to use the DB (e.g. try to login a user in the app) it gives me the following error:

Cannot open database "cvRepository" requested by the login. The login failed.
Login failed for user 'MyPC\ASPNET'.

My guess was that I had to give permissions to ASPNET user so I did in SQL Server Management. Still not working! Checked my Connection string and I think it's fine...

connectionString="Data Source=.\SQLEXPRESS;Database=cvRepository;Integrated Security=True;User Instance=True"

Still not working!

Can anyone explain me what's wrong and to solve this?!

Try replacing Database=cvRepository withAttachDBFileName=|DataDirectory|cvRepository.mdfin your connectionString.

Hope this helps.

Mike

|||Do you have a database namedcvRepositoryon your SQL server? Or you're using a database file attached at runtime? Anyways you have to ensure the ASPNET account has login permission to the SQL server, as well as access permissions on the required database.|||

Hi

Tried using the AttachDBFileName but nothing:

<

addname="cvRepositoryConnectionString"connectionString="Data Source=.\SQLEXPRESS;AttachDBFileName=|DataDirectory|cvrepository.mdf;Integrated Security=True;User Instance=True"providerName="System.Data.SqlClient" />I don't understand much of this but I'll shoot out something... When running the app in debug mode (http://localhost:2431/cvRepository/Default.aspx) it creates an instance of the SQL Server but when not doing so (http://localhost/cvRepository/Default.aspx) it doesn't, that's why I can't access the DB. Is this correct? If so, how to solve it?

Any explanation/article would be helpful!

Thx

|||Try to add the ASPNET login to a member ofsysadminordbcreatorserver role.|||

Hi

Instead of using User Instances I defined a particular user to access the DB. Used this:

connectionString

="Server=.\SQLEXPRESS;Database=cvrepository;User ID=user1;Password=user1pass"

Thx for your help

Cheers

Friday, February 24, 2012

"Invalid distribution command" in transaction replication

HI
I had a replication working nicely for long time. SQL 2k, SP3.
One day it stoped working with the error "Invalid distribution command." and
last action is: insert into "ponim" ("tz_pone.
Transaction sequence number and command ID of last execution batch are
0x0000829800000ABB000100000000 and 1.
I think maybe that day I added a new column using sp_repladdcolumn.
I want to say that the same script I run for that replication I ran for
another 3 similar replication and they all still work prefectly.
Any Ideas what I can do?
Please take in consider that I have lots of data in the publication that
couldn't be send to the subscriber becouse of the above error.
Thanks
use sp_browsereplcmds to identiy this command. Then apply this command
on the subcriber.
Then update msreplication_subscripions with the xaxct_seqno for this
command. This will cause it to skip this command.

"Invalid distribution command" in transaction replication

HI
I had a replication working nicely for long time. SQL 2k, SP3.
One day it stoped working with the error "Invalid distribution command." and
last action is: insert into "ponim" ("tz_pone.
Transaction sequence number and command ID of last execution batch are
0x0000829800000ABB000100000000 and 1.
I think maybe that day I added a new column using sp_repladdcolumn.
I want to say that the same script I run for that replication I ran for
another 3 similar replication and they all still work prefectly.
Any Ideas what I can do?
Please take in consider that I have lots of data in the publication that
couldn't be send to the subscriber becouse of the above error.
Thanksuse sp_browsereplcmds to identiy this command. Then apply this command
on the subcriber.
Then update msreplication_subscripions with the xaxct_seqno for this
command. This will cause it to skip this command.

"Invalid distribution command" in transaction replication

HI
I had a replication working nicely for long time. SQL 2k, SP3.
One day it stoped working with the error "Invalid distribution
command." and
last action is: insert into "ponim" ("tz_pone.
Transaction sequence number and command ID of last execution batch are
0x0000829800000ABB000100000000 and 1.
I think maybe that day I added a new column using sp_repladdcolumn.
I want to say that the same script I run for that replication I ran for
another 3 similar replication and they all still work prefectly.
Any Ideas what I can do?
Please take in consider that I have lots of data in the publication
that
couldn't be send to the subscriber becouse of the above error.
Thanks
Please enable logging as per this article:
http://support.microsoft.com/?id=312292 to get more details about the
failing command.
sp_browsereplcmds could also be used to find these details.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .

"Invalid distribution command" in transaction replication

HI
I had a replication working nicely for long time. SQL 2k, SP3.
One day it stoped working with the error "Invalid distribution command." and
last action is: insert into "ponim" ("tz_pone.
Transaction sequence number and command ID of last execution batch are
0x0000829800000ABB000100000000 and 1.
I think maybe that day I added a new column using sp_repladdcolumn.
I want to say that the same script I run for that replication I ran for
another 3 similar replication and they all still work prefectly.
Any Ideas what I can do?
Please take in consider that I have lots of data in the publication that
couldn't be send to the subscriber becouse of the above error.
Thanks
use sp_browsereplcmds to identiy this command. Then apply this command
on the subcriber.
Then update msreplication_subscripions with the xaxct_seqno for this
command. This will cause it to skip this command.

Sunday, February 19, 2012

"Input string was not in a correct format" when trying to searcg

hi

i have a database with some data in it and iam using full-text-search to search through my data and the search query works fine in sql server manamgnet studio. so my problem is in my web application, i have a textbox where i enter e.g car and click the search button, the button executes the search query but i recive an error"Input string was not in a correct format". here is the code that the button executes:

ProtectedSub searchButton_Click(ByVal senderAsObject,ByVal eAs System.EventArgs)

searchSqlDataSource.SelectCommand =

"Select ID, title, FROM myTable WHERE CONTAINS(description, @.search)"

searchSqlDataSource.SelectParameters.Add(

"search", searchTextBox.Text)

searchSqlDataSource.DataBind()EndSub

tnx in advac

can you set the value of a label for instance to the value of the input string so that you can see the actual string? or have you tried stepping through the code and see what the actual string is that is getting sent. if you have access to a sql management studio, you can post the string into the query window and see what is incorrect with the syntax. give those a try and good luck! -- jp|||

I often get that error message when the text contains a semicolon ";". i.e. searchTextBox.text = "johnny went home; vivi left town."

My only resolve was to filter for the semicolon, but I'm sure there's a better way to do it.

Johnny

Thursday, February 9, 2012

"can grow" option in subreports

Hi

I m using a sub report in one of my reports. In the subreport, I have selected the "Can grow" option.

I have the subreport in the details section of the report. But if the length of the subreport is long then it overlaps on the group footer section.

How can I avoid this ?

Thanking in advanceDid you set "Keep sections together" option?