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

Friday, March 30, 2012

Problem with logon SQL Server (MSDE)

Hi
I am working on a replication database system, I will use SQL Server Enterprise at the main database and I'm planning to have remote databases with MSDE, I installed MSDE in a remote computer using a valid logon account for the domain in the domain controller (I had it connected for the set up). If I disconnect the computer from the network an restart the machine the Sql Server won't start with the cache information.

How can I solve this problem?MSDE Doesn't support a login from the network; only from the local computer.

Am I right?

Wednesday, March 28, 2012

Problem with job history. sql server 2005

HI

I found some issue with job history. My server name length is 32 charecters. and when we view the job history in sql management studio, some back ground script is running, there microsoft has defined servername as 30, due to this smaller definition for server server variable, i am getting error when i tried to view the job history.

what wil be the solution for this issue?

thanks

kiran

rename the server. hahaha. joke

|||

Hi Kiran,

Thanks for reporting this problem. Please file a bug using the following link https://connect.microsoft.com/SQLServer/Feedback.

Workaround:

Use the following stored procedure to get the job history

exec msdb.dbo.sp_help_jobhistory @.mode='FULL'

Link for more help on the above stored procedure:

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

Regards

Rajesh Basa

Problem with job history. sql server 2005

HI

I found some issue with job history. My server name length is 32 charecters. and when we view the job history in sql management studio, some back ground script is running, there microsoft has defined servername as 30, due to this smaller definition for server server variable, i am getting error when i tried to view the job history.

what wil be the solution for this issue?

thanks

kiran

rename the server. hahaha. joke

|||

Hi Kiran,

Thanks for reporting this problem. Please file a bug using the following linkhttps://connect.microsoft.com/SQLServer/Feedback.

Workaround:

Use the following stored procedure to get the job history

exec msdb.dbo.sp_help_jobhistory @.mode='FULL'

Link for more help on the above stored procedure:

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

Regards

Rajesh Basa

Friday, March 23, 2012

Problem with Insert statement - Arithmetic overflow

Hi
I'm trying to do a script that can combine data from different databases and
then present them in a list to for some payment purposes. I have little
problem though with a small bit of the script.
The following small part of the script works fine :
Insert into spe_temp..LonSum (Amount_, Beloeb,CVR)
SELECT SUM([Amount]), SUM([belb]), CVR
FROM Excel...Grundlag$
WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0 AND
Belb <>0
GROUP BY CVR , belb
This is part works fine - I get 1731 records inserted into my temp table.
I'd like to get the records grouped a little bit further though, so I've
tried with the modification below :
Insert into spe_temp..LonSum (Amount_, Beloeb,CVR)
SELECT SUM([Amount]), SUM([belb]), CVR
FROM Excel...Grundlag$
WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0 AND
Belb <>0
GROUP BY CVR
Here I just remove the "belb" column in the GROUP BY clause and now I get
the following error :
"Arithmetic overflow error converting float to data type numeric.
The statement has been terminated."
I don't quite understand why I get this error message since it's the same
values I'm trying to insert in both cases.
If I just do a -
SELECT SUM([Amount]), SUM([belb]), CVR
FROM Excel...Grundlag$
WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0 AND
Belb <>0
GROUP BY CVR
- I get 129 records which looks fine and looks like what I want.
The spe_temp..LonSum table is created as -
CREATE TABLE spe_temp..Lonsum (Amount_ decimal(9,2), Beloeb Decimal(9,2),
CVR varchar(10)COLLATE SQL_Danish_Pref_CP1_CI_AS ,
Periode Int, Sats int, Areal_total numeric(9,2), Areal_andelsbolig
numeric(9,2), Procent numeric(9,2), LoenSumBeloeb decimal(9,2) )
I hope that some of you can shed some light on this?
Regards
SteenThe greatest amount you can store in a decimal(9,2) column is 9,999,999.99.
Is the sum for one of the CVR's you group by greater than that?
Jacco Schalkwijk
SQL Server MVP
"Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
news:ejWLt61PFHA.3788@.tk2msftngp13.phx.gbl...
> Hi
> I'm trying to do a script that can combine data from different databases
> and
> then present them in a list to for some payment purposes. I have little
> problem though with a small bit of the script.
> The following small part of the script works fine :
> Insert into spe_temp..LonSum (Amount_, Beloeb,CVR)
> SELECT SUM([Amount]), SUM([belb]), CVR
> FROM Excel...Grundlag$
> WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0 AND
> Belb <>0
> GROUP BY CVR , belb
> This is part works fine - I get 1731 records inserted into my temp table.
> I'd like to get the records grouped a little bit further though, so I've
> tried with the modification below :
> Insert into spe_temp..LonSum (Amount_, Beloeb,CVR)
> SELECT SUM([Amount]), SUM([belb]), CVR
> FROM Excel...Grundlag$
> WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0 AND
> Belb <>0
> GROUP BY CVR
> Here I just remove the "belb" column in the GROUP BY clause and now I get
> the following error :
> "Arithmetic overflow error converting float to data type numeric.
> The statement has been terminated."
> I don't quite understand why I get this error message since it's the same
> values I'm trying to insert in both cases.
> If I just do a -
> SELECT SUM([Amount]), SUM([belb]), CVR
> FROM Excel...Grundlag$
> WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0 AND
> Belb <>0
> GROUP BY CVR
> - I get 129 records which looks fine and looks like what I want.
> The spe_temp..LonSum table is created as -
> CREATE TABLE spe_temp..Lonsum (Amount_ decimal(9,2), Beloeb Decimal(9,2),
> CVR varchar(10)COLLATE SQL_Danish_Pref_CP1_CI_AS ,
> Periode Int, Sats int, Areal_total numeric(9,2), Areal_andelsbolig
> numeric(9,2), Procent numeric(9,2), LoenSumBeloeb decimal(9,2) )
> I hope that some of you can shed some light on this?
> Regards
> Steen
>|||Hi Jacco
You're right that there could be an issue here. The biggest value seems to
be 33.213.057,179999199 but even though I change the [Amount] and [B
elb]
definition for my temp table to e.g. (Decimal 25,12) it still gives me the
error.
Regards
Steen
Jacco Schalkwijk wrote:[vbcol=seagreen]
> The greatest amount you can store in a decimal(9,2) column is
> 9,999,999.99. Is the sum for one of the CVR's you group by greater
> than that?
>
> "Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
> news:ejWLt61PFHA.3788@.tk2msftngp13.phx.gbl...|||Can you post the result of:
SELECT CVR, SUM([Amount]), SUM([belb])
FROM Excel...Grundlag$
WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0 AND
Belb <>0
GROUP BY CVR
?
Jacco Schalkwijk
SQL Server MVP
"Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
news:Oixs1L2PFHA.1176@.TK2MSFTNGP12.phx.gbl...
> Hi Jacco
> You're right that there could be an issue here. The biggest value seems to
> be 33.213.057,179999199 but even though I change the [Amount] and [
;Belb]
> definition for my temp table to e.g. (Decimal 25,12) it still gives me the
> error.
> Regards
> Steen
>
> Jacco Schalkwijk wrote:
>|||Hi Jacco
I got the problem solved - and it was the definition of the Decimal column
that wasn't big enough. First time I changed the definition I just changed
the syntax for CREATE TABLE.... - but I actually missed to re-create the
table.....doohhhh.....;-).
Thanks for you help.....it was spot on....
Regards
Steen
Jacco Schalkwijk wrote:[vbcol=seagreen]
> Can you post the result of:
> SELECT CVR, SUM([Amount]), SUM([belb])
> FROM Excel...Grundlag$
> WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0
> AND Belb <>0
> GROUP BY CVR
> ?
>
> "Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
> news:Oixs1L2PFHA.1176@.TK2MSFTNGP12.phx.gbl...

Tuesday, March 20, 2012

Problem with ghost locking...

Hi

I just now had the strangest error, for some reason a table in my DB was locked by two processes, there is no use with BEGIN TRANSACTION in the queries that execute on the DB and while it suddnely happaned no heavy process was running... I was just browsing the table with the enterprise manager.

After viewing the processes with sp_lock I found the two processes that caused the locking and killed them, this fixed the problem, but I would like to know what caused it...
When viewing the process info with sp_who the status was "sleeping" and in sp_lock in one process the type was "key" and the status was "wait" (mode "s").

Any ideas ?
I'm using SQL-Server y2k + sp3.

Thanks,
Inon.Mode S means that the 2 processes where doing SELECT with default TIL (READ UNCOMMITTED) while you were trying to UPDATE the table (maybe accidentally you hit a key while browsing the table in EM?) UPDATE is not allowed on a table that has shared lock placed on it.

Monday, March 12, 2012

problem with exports

HI

I was trying to export a report which i created in sql 2005 businees studio to excel..the problem is that the report is in drill down format and excel doesnt show the information quiete well when i export it to excel..i really need the drill down version to b exported in excel...wat shall i do?

The Excel rendering extension handles drilldowns by writing hyperlinks in worksheet cells. The content of the drilldown report does not appear in the output of the main report.

-Chris

|||

hi Chris,

what you mean by the report does not appear in the output of the main report?

is that mean we need to create multiple report and then export them into excel for each page. then only use hyperlink to link all the report to show it have the effect of drill down?

Problem with Enterprise manager and authentication

Hi
I recently upgraded my infrastructure to Active Directory 2003.
Since then I'm having two problems when I start Enterprise Manager and
connect on 2003 sever member with SQL2000 sp3a:
1 On non-member machine, I use SQL authentication to register the server and
in the security log I keep getting dozens of Event ID 529 (unkown username
or bad password) every minutes.
The user in the event is the local account logged on the workstation.
2 on member machines, I have three successfull events (logoff/privilges
assigned/logon) every 10 seconds
In the first case, why does it try to log on with the local account ?
In the second case why does it logoff/logon every 10 seconds ?
I can't remove this audit (international group security policy...) and the
security logs are full in about 2 weeks with 600,000+ events!! I can't
manage that!
Thanks in advance for your help.
Regards,
Christophe Niel
Thats an odd one, have you seen http://support.microsoft.com/?kbid=890477 ?,
looks similar to your problem.
Peter
"Facts are stupid things."
Ronald Reagan
"Christophe Niel" wrote:

> Hi
> I recently upgraded my infrastructure to Active Directory 2003.
> Since then I'm having two problems when I start Enterprise Manager and
> connect on 2003 sever member with SQL2000 sp3a:
> 1 On non-member machine, I use SQL authentication to register the server and
> in the security log I keep getting dozens of Event ID 529 (unkown username
> or bad password) every minutes.
> The user in the event is the local account logged on the workstation.
> 2 on member machines, I have three successfull events (logoff/privilges
> assigned/logon) every 10 seconds
> In the first case, why does it try to log on with the local account ?
> In the second case why does it logoff/logon every 10 seconds ?
>
> I can't remove this audit (international group security policy...) and the
> security logs are full in about 2 weeks with 600,000+ events!! I can't
> manage that!
> Thanks in advance for your help.
> Regards,
> Christophe Niel
>
>
|||Both are probably due to polling services that is
automatically set to check every 10 seconds.
In the first case, because you are logged in as the local
account and it is trying to poll the services from the
workstation using that account.
In Enterprise Manager, go up to the menu to Tools, Options.
You can deselect the checkbox to poll the services.
-Sue
On Wed, 9 Mar 2005 11:25:01 +0100, "Christophe Niel"
<Christophe.niel@.removetomail.fr.abnamro.com> wrote:

>Hi
>I recently upgraded my infrastructure to Active Directory 2003.
>Since then I'm having two problems when I start Enterprise Manager and
>connect on 2003 sever member with SQL2000 sp3a:
>1 On non-member machine, I use SQL authentication to register the server and
>in the security log I keep getting dozens of Event ID 529 (unkown username
>or bad password) every minutes.
>The user in the event is the local account logged on the workstation.
>2 on member machines, I have three successfull events (logoff/privilges
>assigned/logon) every 10 seconds
>In the first case, why does it try to log on with the local account ?
>In the second case why does it logoff/logon every 10 seconds ?
>
>I can't remove this audit (international group security policy...) and the
>security logs are full in about 2 weeks with 600,000+ events!! I can't
>manage that!
>Thanks in advance for your help.
>Regards,
>Christophe Niel
>
|||Wow! it worked!!
and "Doh!"... I've been using enterprise manager for years and I had never
seen an "option" menu (or let's say the polling option didn't strike me as
the cause of my problem)
Well, as I said: it worked and my logs are clean again.
Thanks a lot
Christophe
"Sue Hoegemeier" <Sue_H@.nomail.please> a crit dans le message de news:
3dtt21pbu974t8584n2ae5tifdhca95st0@.4ax.com...
> Both are probably due to polling services that is
> automatically set to check every 10 seconds.
> In the first case, because you are logged in as the local
> account and it is trying to poll the services from the
> workstation using that account.
> In Enterprise Manager, go up to the menu to Tools, Options.
> You can deselect the checkbox to poll the services.
> -Sue
> On Wed, 9 Mar 2005 11:25:01 +0100, "Christophe Niel"
> <Christophe.niel@.removetomail.fr.abnamro.com> wrote:
>

Problem with Enterprise manager and authentication

Hi
I recently upgraded my infrastructure to Active Directory 2003.
Since then I'm having two problems when I start Enterprise Manager and
connect on 2003 sever member with SQL2000 sp3a:
1 On non-member machine, I use SQL authentication to register the server and
in the security log I keep getting dozens of Event ID 529 (unkown username
or bad password) every minutes.
The user in the event is the local account logged on the workstation.
2 on member machines, I have three successfull events (logoff/privilges
assigned/logon) every 10 seconds
In the first case, why does it try to log on with the local account ?
In the second case why does it logoff/logon every 10 seconds ?
I can't remove this audit (international group security policy...) and the
security logs are full in about 2 weeks with 600,000+ events!! I can't
manage that!
Thanks in advance for your help.
Regards,
Christophe NielThats an odd one, have you seen http://support.microsoft.com/?kbid=890477 ?,
looks similar to your problem.
Peter
"Facts are stupid things."
Ronald Reagan
"Christophe Niel" wrote:

> Hi
> I recently upgraded my infrastructure to Active Directory 2003.
> Since then I'm having two problems when I start Enterprise Manager and
> connect on 2003 sever member with SQL2000 sp3a:
> 1 On non-member machine, I use SQL authentication to register the server a
nd
> in the security log I keep getting dozens of Event ID 529 (unkown username
> or bad password) every minutes.
> The user in the event is the local account logged on the workstation.
> 2 on member machines, I have three successfull events (logoff/privilges
> assigned/logon) every 10 seconds
> In the first case, why does it try to log on with the local account ?
> In the second case why does it logoff/logon every 10 seconds ?
>
> I can't remove this audit (international group security policy...) and the
> security logs are full in about 2 weeks with 600,000+ events!! I can't
> manage that!
> Thanks in advance for your help.
> Regards,
> Christophe Niel
>
>|||Both are probably due to polling services that is
automatically set to check every 10 seconds.
In the first case, because you are logged in as the local
account and it is trying to poll the services from the
workstation using that account.
In Enterprise Manager, go up to the menu to Tools, Options.
You can deselect the checkbox to poll the services.
-Sue
On Wed, 9 Mar 2005 11:25:01 +0100, "Christophe Niel"
<Christophe.niel@.removetomail.fr.abnamro.com> wrote:

>Hi
>I recently upgraded my infrastructure to Active Directory 2003.
>Since then I'm having two problems when I start Enterprise Manager and
>connect on 2003 sever member with SQL2000 sp3a:
>1 On non-member machine, I use SQL authentication to register the server an
d
>in the security log I keep getting dozens of Event ID 529 (unkown username
>or bad password) every minutes.
>The user in the event is the local account logged on the workstation.
>2 on member machines, I have three successfull events (logoff/privilges
>assigned/logon) every 10 seconds
>In the first case, why does it try to log on with the local account ?
>In the second case why does it logoff/logon every 10 seconds ?
>
>I can't remove this audit (international group security policy...) and the
>security logs are full in about 2 weeks with 600,000+ events!! I can't
>manage that!
>Thanks in advance for your help.
>Regards,
>Christophe Niel
>|||Wow! it worked!!
and "Doh!"... I've been using enterprise manager for years and I had never
seen an "option" menu (or let's say the polling option didn't strike me as
the cause of my problem)
Well, as I said: it worked and my logs are clean again.
Thanks a lot
Christophe
"Sue Hoegemeier" <Sue_H@.nomail.please> a crit dans le message de news:
3dtt21pbu974t8584n2ae5tifdhca95st0@.4ax.com...
> Both are probably due to polling services that is
> automatically set to check every 10 seconds.
> In the first case, because you are logged in as the local
> account and it is trying to poll the services from the
> workstation using that account.
> In Enterprise Manager, go up to the menu to Tools, Options.
> You can deselect the checkbox to poll the services.
> -Sue
> On Wed, 9 Mar 2005 11:25:01 +0100, "Christophe Niel"
> <Christophe.niel@.removetomail.fr.abnamro.com> wrote:
>
>

Friday, March 9, 2012

problem with dtexec

Hi

I have a SSIS package which pulls files from a network share and loads data into SQLServer Database. When I execute the application using DTExecUI , It runs fine without any issues , but where as when I run it using the command line arguments, It seems to go in sleep mode and nothing happens. I need to kill the package from Task manager.

Following is the command I use to run my application

Dtexec /FILE "N:\Temp\LoadFirewallData.dtsx" /CONFIGFILE "N:\Temp\LoadFirewallData.dtsConfig" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING EWCDI /SET "\Package.Variables[User::RunID]";41

Regards

Meghana

Are you running DTExecUi and DTExec on the same machine, same use? is the DTExec command line exactly the same as that for DTExecUI (look at the Command Line page in DTExecUI if you have not already)?|||

I ran to similar problems. My package has several variables. When I passed them to DTExec, it does not work and it always takes the values I set when I design the package.

Should I design the package differently? No configurations?

Guangming

|||I am using the exact same command line which shows up in dtexecui. It is not working.|||I'm afraid I cannot see why you should get any problems between the two like this, so I assume it is the package. The only other idea I have is to turn on some detailed logging in the package and see what happens prior to it getting stuck.|||

Following is the error which occurs before it gets hung. The variable is of type string. This error occurs on multi proc machine when executed using dtexec. But the same does not happen when we execute it with dtexecui.

The variable "User::stripfilename" is already on the read list. A variable may only be added once to either the read lock list or the write lock list.

Also, when executed through dtexec command line, it is not consistent enough to show the same error, sometimes it runs through fine and sometimes it errors and hangs till we kill the job from task manager

It seems like couple of other folks are also facing the similar issue

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=222351&SiteID=1

Please let us know if there is any way to resolve this as this is very crucial part of our project.

Regards

Meghana

|||have you tried running the tasks in sequence, rarther than parallel? Have you tried MaxConcurrentExecutables? Seems there is a bug here, but in the meantime one of those should allow you to get going again.|||If it's an issue with variables, and you're not using this in the script, try using

Public Shared Function getVar(ByVal varName As String) As String
Dim vars As Variables
Dts.VariableDispenser.LockOneForRead(varName, vars)
Return vars(varName).Value.ToString()
End Function

rather than referencing the variable in the script properties.

|||

Finally I found the problem:

The way to put the command string is not right after "dtexec /SQL. "

If there is not ENTER and all commands in one line (as it is a dos command), everything is OK!

Is it COOL!?

Guangming

Wednesday, March 7, 2012

Problem with Drop Table and Field name chage

Hi!
I had two servers of SQL 2000 with distributor and publisher mode for replications. I wanted to change one field name of a table, I did the following:
1. stopped publishing,
2. Stopped distribution
3.Re-started the servers.

But when I want to save the changed field name i am getting this error

"/*

Saturday, October 18, 2003 12:59:08 PM

User: sa

Server: SSD-SQL2

Database: PAIFORWEB

Application: MS SQLEM - Data Tools

*/

'CC02' table
- Unable to rename column from 'INWARD' to 'INWARDxyz'.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot rename the table because it is published for replication.
"

I am getting the same error while dropping the database toout when I checked the replication there is no distribution and publication is existing.

Please help, it is most urgent to me.

Thanks in advance.

Sabyasachi Sensearch for "manually removing replication" in google prior to proceeding with object rename.

Problem With Distinct clause

Hi

I have the following tables:

Suppliers:
SupplierID int not null primary key auto_increment
SubscriptionTypeID int not null
SubscriptionExpDate Date

Products:
ID int not null primary key auto_increment
SupplierID int not null as foreign key
ProductCode varchar(30) not null
productName varchar(255) not null
ImageID int not null as foreign key

Images:
ImageID int not null primary key auto_increment
Image blob not null

Whats is the correct SQL syntax to retrieve the disticnt Image and ProductName where ProductName is LIKE some user defined string and SubscriptionExpDate >= Date() order by SubscriptionTypeID DESC.

The above query will retrieve multiple records for the same Image if there are multiple suppliers for that product. How do I retrieve the distinct Image? The only other way i can think of solving this is to redesign the table and include the productName in the Images table. However all images are unique but product names supplied by the supplier for a particular image/product can be different. hence to increase the posibility of retrieving a match I have included it in the products Table!

Any help will be appreciated.what does "the distinct image" mean?

if a single product is supplied by multiple suppliers, and you have a query where you join product to suppliers, then why aren't you asking about returning "the distinct product" too?

that is where your difficulty lies ;)|||Basically I want to check if there is a product that matches the user defined search string on product name, for an item supplied by a supplier whos subcription to the database is still valid. If there is I only want to display one image and product name. Hence I want to retrieve distinct name as well. But that is not possible becuase the product name for a given product is different for each supplier yet it is for the same product. i dont think there is any other way round this than the way I metioned. By including product name in the images table aswell!

You may be wondering what is the purpose of such a query. well it is to be implemented on a web page. The above query should display all items which match the search string but onyl display unique images and any one name. At present I get duplicate images and names per row.

If you have any other suggestions I would be glad to hear them.|||here's the important part of what you just said --Basically I want to check if there is a product that matches the user defined search string on product name, for an item supplied by a supplier whos subcription to the database is still valid. If there is I only want to display one image and product name.so my question is, which one? the item with the shortest name? the supplier with the latest registration date?

to pick one from among many, you need a way to say which one

answers that are not allowed include "any one," "the first one," and "you pick one"

:)

Saturday, February 25, 2012

Problem with default schema

Hi

I have a user database say Solumina. There is a login defined on the instance of sql 2005 server , say XYZ. There is also a user defined XYZ in the database mapped to the login 'XYZ' with the default schema as 'sfmfg' (Assume that 'sfmfg' schema already exists).

My question when I try to create a random table with the following syntax it gets created in the dbo schema instead of the sfmfg schema (I am using sfmfg login credentials).

create table t1(id int)

Can some 1 please help out.

Regards

Imtiaz

Is sfmfg a member of db_owner role? It is always safer to use 2-part names in your objects so that you know explicitly the schema for the object.

problem with default path for osql

Hi!
I have a following problem:
When I run osql from cmd prompt it is running fine, however if I have to run
osql from another osql session by using xp_cmdshell 'osql ...'. It can not
find the osql file.
I 've checked both PATH variable as well as registry
HKEY_LOCAL_MACHINE\Software...\80\Tools\ClientSetu p\SqlPath are set to proper
value. What is missing
I've seen this on machines that didn't reboot since installation. I worked around it by checking
registry entries for SQL server and build the bath based on that.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"kimi" <kimi@.discussions.microsoft.com> wrote in message
news:84B0A2D8-17CA-449A-A012-B939B672465A@.microsoft.com...
> Hi!
> I have a following problem:
> When I run osql from cmd prompt it is running fine, however if I have to run
> osql from another osql session by using xp_cmdshell 'osql ...'. It can not
> find the osql file.
> I 've checked both PATH variable as well as registry
> HKEY_LOCAL_MACHINE\Software...\80\Tools\ClientSetu p\SqlPath are set to proper
> value. What is missing
|||Are you suggesting that I should hardcode path to osql if reboot does not help?
"Tibor Karaszi" wrote:

> I've seen this on machines that didn't reboot since installation. I worked around it by checking
> registry entries for SQL server and build the bath based on that.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "kimi" <kimi@.discussions.microsoft.com> wrote in message
> news:84B0A2D8-17CA-449A-A012-B939B672465A@.microsoft.com...
>
|||Reboot did not help. Any ideas?
"kimi" wrote:
[vbcol=seagreen]
> Are you suggesting that I should hardcode path to osql if reboot does not help?
> "Tibor Karaszi" wrote:

problem with default path for osql

Hi!
I have a following problem:
When I run osql from cmd prompt it is running fine, however if I have to run
osql from another osql session by using xp_cmdshell 'osql ...'. It can not
find the osql file.
I 've checked both PATH variable as well as registry
HKEY_LOCAL_MACHINE\Software...\80\Tools\ClientSetup\SqlPath are set to prope
r
value. What is missingI've seen this on machines that didn't reboot since installation. I worked a
round it by checking
registry entries for SQL server and build the bath based on that.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"kimi" <kimi@.discussions.microsoft.com> wrote in message
news:84B0A2D8-17CA-449A-A012-B939B672465A@.microsoft.com...
> Hi!
> I have a following problem:
> When I run osql from cmd prompt it is running fine, however if I have to r
un
> osql from another osql session by using xp_cmdshell 'osql ...'. It can not
> find the osql file.
> I 've checked both PATH variable as well as registry
> HKEY_LOCAL_MACHINE\Software...\80\Tools\ClientSetup\SqlPath are set to pro
per
> value. What is missing|||Are you suggesting that I should hardcode path to osql if reboot does not he
lp?
"Tibor Karaszi" wrote:

> I've seen this on machines that didn't reboot since installation. I worked
around it by checking
> registry entries for SQL server and build the bath based on that.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "kimi" <kimi@.discussions.microsoft.com> wrote in message
> news:84B0A2D8-17CA-449A-A012-B939B672465A@.microsoft.com...
>|||Reboot did not help. Any ideas?
"kimi" wrote:
[vbcol=seagreen]
> Are you suggesting that I should hardcode path to osql if reboot does not
help?
> "Tibor Karaszi" wrote:
>

Monday, February 20, 2012

Problem with Date query

Hi!

I'm trying to query an Informix linked server to import data into a SQL database.

The OLE DB Provider is ifxoledbc. I can do general queries such as

Select * from openquery(INFLINKMON, 'SELECT * FROM mydatabase:mytable_t ')

but when I try to add the where clause

Select * from openquery(INFLINKMON, 'SELECT * FROM mydatabase:mytable_t where mydatabase:mytable_t.d_thisdate = "04/12/2006"')

I get the error:

Msg 7321, Level 16, State 2, Line 1

An error occurred while preparing the query "SELECT * FROM mydatabase:mytable_t where mydatabase:mytable_t.d_thisdate="04/12/2006"" for execution against OLE DB provider "Ifxoledbc" for linked server "INFLINKMON".

Does anyone know what I am doing wrong? I can do a where query on other fields but not on date.

Thanks for any input that you can give.

Does the query run on the native system, without executing it through the linked server ?

HTH, Jens K. Suessmeyer.

http://www.sqlserver0205.de
|||

Thanks for responding...

Yes, the query runs on the native system, unix, by typing the select query on the command line exactly the same as the select in single quotes SELECT * FROM mydatabase:mytable_t where mydatabase:mytable_t.d_thisdate = "04/12/2006" .

Thanks Again for any input!