Stored Proc Requesting Data Via An Exchange Linked Server

Jan 7, 2004

Hello,
I have created a MS Exchange 2000 link server in my MS SQL Server 2k. I have created a stored procedure (and a view...) using info from that linked server. When I am logged on the server as the Administrator, I can call my stored proc without any problems. When I use another computer (and I am not logged as the admin of the server) and I call the stored procedure, the following error is always raised :
Server: Msg 7302, Level 16, State 1, Procedure test_proc, Line 3
" Impossible de créer une instance du fournisseur OLE DB 'exoledb.DataSource.1'. "
<== I know it is a french error but it can be translated as : "Unable to instancied the OLE DB 'exoledb.DataSource.1' provider"

I would like to know if I can make run my stored proc in the admin account or what should I do to make it work

View 1 Replies


ADVERTISEMENT

Stored Proc Using Cursors On A Linked Server

Jul 13, 2004

As part of a nightly process, I must call a stored procedure that uses cursors to update a Sybase linked server from SQL Server. The stored proc was written by someone else and is intended to interface to a finance system to upload new transactions.

The stored proc works fine most of the time but occasionally dies part-way through with the following confusing error message:

[OLE/DB provider returned message: Internally generated command failed to affect a row.]
OLE DB error trace [OLE/DB Provider 'Sybase.ASEOLEDBProvider' IRowsetChange::SetData returned 0x80004005: ].
Msg 7399, Level 16, State 1, Server ********, Procedure ********, Line 162
OLE DB provider 'Sybase.ASEOLEDBProvider' reported an error.

I initially ran this stored proc from a perl script via an ODBC link but in the futile hope of fixing this problem I tried manually executing it via isql.exe instead. Both return exactly the same error. I have also increased the OLE/DB query timeout to 15 minutes with no success in stopping the problem.

There seems to be no connection I can spot between when it succeeds and when it fails. When scheduled to run just after midnight it fails about 30% of the time (at a time when there should be a light load on the servers). When run manually it almost always suceeds (I have only managed to get it to fail through running manually once in dozens of attempts).

I can't seem to find anything relevant about this error via Google or any of my usual reference sources so hoped someone else might have a clue as to what the hell's going on. :confused:

The stored procedure uses a cursor to traverse a SELECT statement then performs several INSERTs, UPDATEs and DELETEs depending upon each row processed and attempts (but usually fails) to perform a ROLLBACK upon an error.

I'd appreciate any pointers in the right direction here. Is it because I'm performing cursor-based operations on a linked server? Is it due to the linked server being a Sybase server? Could it be due to locking problems or timeouts? Is my server in a bad mood and simply trying to taunt me? I'm tearing my hair out trying to find more information on this annoyingly intermittent problem and really appreciate any help or tales of similar errors.

Thanks in advance

View 11 Replies View Related

NH: Best Practices Approach - Call Stored Proc - Or Run It Via Linked Server?

Mar 27, 2007

what pro's cons would there be to having a linked server run a local stored proc against another sql server or create that stored proc on that other sql server and call it from there in the c# code.
i would think that calling the stored proc would be more efficient that running a linked server - but please let me know your thoughts. I'm not sure i can have permission to add a stored proc on that server, so possibly the linked server is the only solution - but if i can put a stored proc on that server should i?
thanks.
Jeff 

View 4 Replies View Related

Problem With Linked Server Stored Proc In A Maintenance Plan

Feb 12, 2007

Hello there,

I have a scenario where I need a few stored procs to auto-execute on an hourly basis so I thought it would be nicely done in a maintenance plan job list. I have experience with this in sql 2000 but I am struggling with sql 2005.

I have been struggling with my maintenance plan to successfully run the 2 jobs that it has to complete:
1) execute a stored proc that creates/updates a client in the Client table on the local server
(This step works fine without hassles)
2) execute a stored proc that synchronizes this entry with a database on another server. This stored proc works fine outside the maintenance plan, but inside the maintenance plan job it gives me an error :
Executed as user: NT AUTHORITYSYSTEM. Cannot roll back T1. No transaction or savepoint of that name was found. [SQLSTATE 25000] (Error 6401)

I have tried looking on the net and forum to see whether i can solve this but i am stuck. What do I have to keep in mind executing this stored proc as a maintenance plan? What am i missing.

Thanks for any advice
Mike

View 3 Replies View Related

Impersonate And Exchange Linked Server

Mar 17, 2004

Hello,

On my SQL Server 2000, I have successfully created a linked server to my Exchange 2000 server (located on the same physical computer). I can't send request and everything is fine.

But now, I would like to apply the "Impersonate" setting. The big problem I've got is that Exchange doesn't use a login and password for the authentification but use the Windows credentials.

I have try things like :
login : <domain name><username> with the real password
login : <username>@<internet domain name> with the real password
but that doesn't work.


I would like to know if there is a way to "impersonate" user log on the SQL Server when they try to use the linked server to Exchange Server.

Thank a lot

Felix Pageau
fpageau@NOSPAM.str.ca



Print | Copy URL of this post



Expand All Collapse All

View 3 Replies View Related

Create Linked Exchange Server

Aug 29, 2007

I'm using sql server 2005 and exchange 2003. End result is I want to upload email attachments to a table in sql. No one seems to have any idea how do do this except with .net, which i know nothing about so not really an option for me. I found this bit of info with some extensive web searching. Can anyone help fill in the blanks? I can't get the linked server to work yet.


EXEC sp_addlinkedserver 'exchange',
'Exchange OLE DB provider',
'exoledb.DataSource.1',
'file:\.ackofficestoragemailservernamepublic folders'

Error received:The OLE DB provider "exoledb.DataSource.1" has not been registered.

View 1 Replies View Related

Access Combo Box Linked To Stored Proc

Mar 26, 2004

Does anyone for code code to link a stored procedures to a combo box in Access?

View 1 Replies View Related

Requesting It(PK) After Saving Data With Auto Prim.Key

May 26, 2006

Hi,

I have a page for saving a "home" data. As the page unloads I will
redirect the user to the page on which he can add the photos to this
"home".

Well I structured my photo adding page with first requesting the "homeID" which is an auto Integer (PK).
Because it's renaming the uploaded photos with the homeID and _01, _02...  

Because of that i need to send the user to the photo adding page with "response.redirect......aspx?homeID=.....

homeID=  ???

But I don't know how to get the homeID value, that the SQL Server automaticly selects for the data. As it is just saving it...


Thanks a lot.

View 1 Replies View Related

SQL Server Express Stored Proc Does Not Return Any Data

Jan 28, 2008

Hi!I have this table:Units  -id uniqueidentified (PK),  -groupName NVARCHAR(50) NOT NULL,  -name NVARCHAR(50) NOT NULL,  -ratio float NULL and the stored proc that simply returns all rows:ALTER PROCEDURE dbo.ilgSP_GetUnitsAS    SELECT [id], [groupName], [name], [ratio] FROM [Units] ORDER BY [groupName], [name]If I select 'Show Table Data' in Visual Studio 2005 I see all rows from the table. If I 'Execute' my stored from VS 2005 I get this:Running [dbo].[ilgSP_GetUnits].id                                     groupName                                          name                                               ratio                     -------------------------------------- -------------------------------------------------- -------------------------------------------------- ------------------------- No rows affected.(1 row(s) returned)@RETURN_VALUE = 0Finished running [dbo].[ilgSP_GetUnits].And I don't get any data in my ASP.NET application. WHY?Thanks! 

View 1 Replies View Related

Extracting Data From Exchange Into SQL Server Db

Mar 22, 2002

Has anyone been able to solve the issue with setting up a package in EM, which connects to an Exchange(.edb) database and extracts the data into a SQL Server db. Previous message posts don't offer much insight. So far, all I have is using Access 2000, to connect & move the data, then extract from here.
Thanks in advance for any help.
BV

View 1 Replies View Related

Want To Link SQL Server DB To MS Exchange E-Mail-Address Data

Mar 1, 2002

Hi all,
I'd like to link a SQL Server database / table to Microsoft Exchange Server E-Mail-Address data, for an Employee Directory project.

I've read a little about "Web Store", a little about ExOLEDB, but I've come across nothing along practical lines. I.e., I still don't know where to begin!

For example the "Web Store" should be created on the SQL server, but how do you create it? Any insights will be greatly appreciated.

Gallagher

View 1 Replies View Related

How To Call Proc On Linked Oracle Server

Sep 12, 2006



Sorry if this is very stupid question, but i've spent too long searching for the answer:

I have a linked Oracle server set up for RPC in SQL server 9 db. How do I call it? I've tried this, but gives Unspecified error:

"

OLE DB provider "OraOLEDB.Oracle" for linked server "SANSORA1" returned message "Unspecified error".

"

From this:



declare @UserName char(20) -- Current Username

declare @Password varchar(20) -- Current Password

declare @PasswordNew varchar(20) -- New Password

declare @PasswordCfm varchar(20) -- Confirm New Password

set @UserName = '900878'

set @Password = '900878'

set @PasswordNew = '777'

set @PasswordCfm = '777'

declare @return int

exec SANSORA1..PCG.USR_CHANGEPASSWORD @UserName ,@Password ,@PasswordNew ,@PasswordCfm;

--Exec ( 'SANSORA1..PCG.USR_CHANGEPASSWORD (' + @UserName + ' ,' + @Password + ' ,' + @PasswordNew + ' ,' + @PasswordCfm + ')')

View 1 Replies View Related

Can You Trace Into A Stored Proc? Also Does RAISERROR Terminate The Stored Proc Execution.

Feb 13, 2008

I am working with a large application and am trying to track down a bug. I believe an error that occurs in the stored procedure isbubbling back up to the application and is causing the application not to run. Don't ask why, but we do not have some of the sourcecode that was used to build the application, so I am not able to trace into the code.
So basically I want to examine the stored procedure. If I run the stored procedure through Query Analyzer, I get the following error message:
Msg 2758, Level 16, State 1, Procedure GetPortalSettings, Line 74RAISERROR could not locate entry for error 60002 in sysmessages.
(1 row(s) affected)
(1 row(s) affected)
I don't know if the error message is sufficient enough to cause the application from not running? Does anyone know? If the RAISERROR occursmdiway through the stored procedure, does the stored procedure terminate execution?
Also, Is there a way to trace into a stored procedure through Query Analyzer?
-------------------------------------------As a side note, below is a small portion of my stored proc where the error is being raised:
SELECT  @PortalPermissionValue = isnull(max(PermissionValue),0)FROM Permission, PermissionType, #GroupsWHERE Permission.ResourceId = @PortalIdAND  Permission.PartyId = #Groups.PartyIdAND Permission.PermissionTypeId = PermissionType.PermissionTypeId
IF @PortalPermissionValue = 0BEGIN RAISERROR (60002, 16, 1) return -3END 
 

View 3 Replies View Related

Scripting Stored Procedure Add With Linked Server Reference When Linked Server Is Not Available

Jul 18, 2006

Is there a way to bypass the syntax checking when adding a stored procedure via a script?

I have a script that has a LINKed server reference (see below) .

INSERT
INTO ACTDMSLINKED.ACTDMS.DBO.COILS ..etc.

ACTDMSLINKED does not exist at the time I need to add the stored procedure that references it.

PLEASE to not tell me to add the LINK and then run the script. This is not an option in this scenerio.

Thanks,

Terry

View 4 Replies View Related

Stored Proc Duplicating Data

Aug 15, 2006

Hi all, I have a stored proc which returns twice the result and I dontknow why. Can someone have a look at the following code?BTW, I commented the last SELECT/JOIN, cause that one doubled theresult too.CREATE procedure ent_tasks_per_user_company (@companyName as varchar(50),@resourceName as varchar(50))ASSELECTtasks.WPROJ_ID as WPROJ_ID, tasks.ENT_ProjectUniqueID asProjectUniqueID, tasks.ENT_TaskUniqueID as TaskUniqueID,tasks.TaskEnterpriseOutlineCode1ID as TaskEnterpriseOutlineCode1ID,codes.OC_NAME as OC_NAME, codes.OC_DESCRIPTION as OC_DESCRIPTION,codes.OC_CACHED_FULL_NAME as OC_CACHED_FULL_NAME,taskStd.TaskName as TaskName, taskStd.TaskResourceNames asTaskResourceNames, taskStd.TaskPercentComplete as TaskPercentCompleteINTO #myTempFROM MSP_VIEW_PROJ_TASKS_ENT as tasksINNER JOIN MSP_OUTLINE_CODES as codesON(codes.CODE_UID = tasks.TaskEnterpriseOutlineCode1IDANDcodes.OC_CACHED_FULL_NAME LIKE @companyName + '.%')INNER JOIN MSP_VIEW_PROJ_TASKS_STD as taskStdON(taskStd.WPROJ_ID = tasks.WPROJ_IDANDtaskStd.TaskUniqueID = tasks.ENT_TaskUniqueID--AND--taskStd.TaskResourceNames LIKE '%' + @resourceName + '%')WHERE (tasks.TaskEnterpriseOutlineCode1ID <-1)/*SELECT #myTemp.*, taskCode.OC_NAME as Department FROM #myTempINNER JOIN MSP_OUTLINE_CODES taskCodeON(taskCode.CODE_UID = #myTemp.TaskEnterpriseOutlineCode1ID)*/SELECT * FROM #myTemp WHERE #myTemp.TaskResourceNames LIKE '%' +@resourceName + '%'Thank you!Chris

View 3 Replies View Related

Stored Proc For Inserting Data

Jan 12, 2008

got a blank mssql 2005 express database. my table name is aspnet_IPNUmber. got two (2) columns IPNumberStart and IPNumberEnd both varchar(Max).

could somebody make a sample stored procedure for me that will insert the following records? im still learning how to make stored procs and my webhost only allow creating database in my domain but not uploading my database.



977600512
977666047

977731584
977764351

1024000000
1024032767

1024334848
1024334911

1024361504
1024361727

1024361760
1024361775

1024361792
1024361799

1024361824
1024361839

1024361984
1024362495

1024365824
1024366335

1024368128
1024368383

1024369408
1024369919

1024370688
1024371455

1024372224
1024372479

1024373248
1024373503

1024373888
1024374015

1024376192
1024376319

1024376480
1024376511

1024376832
1024393215

1025277952
1025294335

1062222976
1062223039

1062244312
1062244319

1062262784
1062263039

1064211840
1064211967

1072922624
1072922879

1072926720
1072926975

1072934400
1072934655

1072934944
1072934975

1072935680
1072935807

1072936448
1072936959

1074757800
1074757807

1077003688
1077003695

1078428256
1078428263

1079387904
1079388159

1079406080
1079406591

1081582080
1081582087

1081583216
1081583231

1081584168
1081584191

1081589104
1081589111

1091692644
1091692653

1093057408
1093057423

1103678544
1103678551

1103678656
1103678719

1104003456
1104003583

1104265216
1104265727

1104492288
1104492543

1104881088
1104881151

1105153216
1105153279

1106484352
1106484415

1106564608
1106564863

1113643148
1113643157

1113644092
1113644121

1114520064
1114520319

1114520576
1114520831

1120306176
1120306943

1120307968
1120308223

1120310016
1120310783

1120311808
1120312447

1120312576
1120312831

1121469912
1121469919

1122125979
1122125988

1139015776
1139015783

1139016000
1139016063

1211605088
1211605103

1211608032
1211608047

1247174064
1247174071

1247174368
1247174383

1254967080
1254967087

1254973664
1254973671

1266551520
1266551527

1266570304
1266570319

1432131584
1432133631

1946173664
1946173679

1946173952
1946174015

1946176512
1946176767

1949466624
1949499391

1950545920
1950547967

1950648320
1950650367

1952251904
1952284671

1960207360
1960207615

1966784512
1966792703

1969694720
1969696767

1969811456
1969815551

1984151552
1984153599

1985480704
1985482751

1986404352
1986406399

1996627968
1996630015

1998290944
1998299135

2030108672
2030125055

2033377280
2033385471

2033582080
2033614847

2033623040
2033625087

2033893376
2033909759

2036334592
2036465663

2038366208
2038374399

2046951424
2047082495

2050084864
2050088959

2050228224
2050490367

2056273920
2056290303

2072528896
2072530943

2075148288
2075150335

2079508480
2079510527

2080800768
2080817151

2081652736
2081685503

2085814272
2085847039

2087190528
2087452671

2090737664
2090745855

2094596096
2094628863

2097479680
2097545215

2101116928
2101149695

2111045632
2111078399

2113683520
2113683679

2113683744
2113684095

2113684176
2113684255

2113684272
2113684431

2113684440
2113684479

2113684544
2113684735

2113684992
2113685007

2113685024
2113685047

2113685120
2113685231

2113685248
2113686079

2113688320
2113689087

2113690112
2113690367

2113691904
2113692031

2113692160
2113692415

2113694720
2113695231

2113695488
2113695743

2704978756
2704978759

2782658560
2782724095

3231309056
3231311103

3233590784
3233591039

3233668864
3233669119

3236102144
3236106239

3262474113
3262474113

3262474143
3262474143

3262474193
3262474193

3278940156
3278940159

3278942516
3278942519

3278942612
3278942615

3325562880
3325566975

3326118524
3326118527

3326119248
3326119251

3326122972
3326122973

3334995968
3335000063

3389001728
3389005823

3389020928
3389021183

3389092352
3389092863

3389259776
3389263871

3389579264
3389587455

3389788416
3389788927

3389936896
3389937663

3391663104
3391664127

3391722240
3391722495

3391906816
3391907839

3392109824
3392110335

3392110592
3392111103

3392111360
3392112127

3392112640
3392114175

3392446464
3392450559

3392741376
3392765951

3392799232
3392799487

3392856064
3392864255

3392931840
3392933887

3393011712
3393019903

3393302528
3393306623

3393560576
3393568767

3393609728
3393613823

3393695744
3393699839

3393744896
3393748991

3393822720
3393830911

3393910784
3393911807

3394079232
3394079743

3394125824
3394142207

3394279424
3394281471

3394347008
3394355199

3394507776
3394508799

3394527232
3394535423

3394682880
3394686975

3394832384
3394834431

3394879488
3394883583

3394910208
3394912255

3394928640
3394936831

3395002368
3395006463

3395059712
3395067903

3395280896
3395284991

3397027072
3397027327

3397070848
3397074943

3397156864
3397165055

3397263360
3397267455

3397394432
3397402623

3397763072
3397771263

3397793792
3397794303

3398004736
3398008831

3398074368
3398090751

3398612992
3398613503

3398638096
3398638111

3398638120
3398638135

3398638160
3398638167

3398638192
3398638207

3398638432
3398638447

3398638528
3398638575

3398638592
3398638655

3398638720
3398638847

3398638880
3398638911

3398639008
3398639231

3398639248
3398639263

3398639424
3398639455

3398639488
3398639615

3398646784
3398647039

3398902272
3398902783

3399655424
3399659519

3399729152
3399745535

3399786496
3399794687

3399826432
3399826943

3399924736
3399925759

3400336384
3400336639

3400337152
3400337407

3400515584
3400531967

3400998912
3401003007

3406565888
3406566143

3407987712
3407987967

3408066048
3408066303

3409396480
3409396735

3410804736
3410821119

3411052544
3411054591

3411152896
3411154943

3411156992
3411161087

3411212288
3411212799

3411320832
3411329023

3411509248
3411542015

3411806208
3411808255

3412251104
3412251119

3412322304
3412324351

3412606976
3412615167

3413106688
3413110783

3413262336
3413270527

3413344256
3413360639

3413574656
3413575679

3414155520
3414155775

3414230016
3414230527

3414376448
3414409215

3415803392
3415805951

3416131584
3416133631

3416301568
3416317951

3416473728
3416473855

3416487424
3416487487

3416719360
3416727551

3416735744
3416752127

3416850432
3416851455

3416981504
3416982527

3416983040
3416983551

3417047040
3417055231

3417178112
3417179135

3417243648
3417244671

3417374720
3417440255

3418163200
3418165247

3418243072
3418251263

3418326528
3418327039

3418396784
3418396799

3418399232
3418399359

3418399440
3418399455

3418401536
3418401599

3418401632
3418401647

3418401720
3418401727

3418401888
3418401903

3418649888
3418649951

3418652160
3418652163

3418652168
3418652171

3418652184
3418652207

3419412480
3419414527

3419783168
3419791359

3419881472
3419897855

3419924480
3419926527

3448257792
3448258047

3453373136
3453373143

3453374568
3453374583

3453374792
3453374807

3459338496
3459339263

3460948736
3460948799

3463602688
3463602943

3465438208
3465438463

3465475072
3465475583

3465476352
3465476607

3466044904
3466044911

3468076000
3468076031

3468085192
3468085199

3468085552
3468085567

3468096768
3468096895

3470660008
3470660015

3470660896
3470660903

3473096193
3473096447

3474193408
3474193663

3474193920
3474194431

3480605440
3480605695

3480605952
3480606207

3481029376
3481029631

3481032960
3481033727

3481039360
3481039871

3486607872
3486608127

3486615296
3486615551

3486624000
3486624255

3489738752
3489740799

3494454129
3494454158

3496290760
3496290767

3496292320
3496292335

3504922624
3504923391

3505119232
3505119487

3508082688
3508082943

3508098304
3508098559

3508100608
3508100863

3508281344
3508281599

3508286912
3508286927

3508337152
3508337663

3509834208
3509834223

3509836872
3509836879

3512562944
3512563071

3512563968
3512564095

3512565248
3512565503

3512577600
3512577631

3512590976
3512591103

3512592896
3512593151

3512598272
3512598527

3518895720
3518895727

3523297280
3523317759

3523477504
3523493887

3523502080
3523510271

3523559424
3523575807

3524132864
3524145151

3524263936
3524266495

3524266752
3524274175

3524274432
3524296703

3524747264
3524755455

3524763648
3524781791

3524781824
3524788223

3535380480
3535388671

3537190912
3537240063

3570076944
3570076951

3624298496
3624299519

3628154240
3628154303

3632480608
3632480615

3632481288
3632481295

3632483856
3632483863

3632484080
3632484087

3632485632
3632485647

3632490688
3632490695

3632494560
3632494567

3680124928
3680133119

3715719168
3715727359

3732799488
3732832255

3732865024
3732930559

View 7 Replies View Related

SQL Stored Proc Not Returning Any Data In The Web Page

Feb 26, 2007

Hi
I have coded the simple login page in vb .net  which calls the stored proc to verify whether the user login details exists in the database.  The stored procudure returns data back when I execute it in the SQL SERVER Management studio. But when I  execute the stored proc in the 'Run stored Proc' wizard' , it is not retuning any data back. Connection string works fine as another SQL select command returns data in the same page.. I have included the VB code . Please help me to sort out this problem.Thank you.
 
If Not ((txtuser.Text = "") Or (txtpassword.Text = "")) Then
 
 
Dim conn As New SqlConnection()
conn.ConnectionString = Session("constr")
conn.Open()
 
Dim cmd As New SqlCommand("dbo.CheckLogin", conn)
cmd.CommandType = CommandType.StoredProcedure
' Create a SqlParameter for each parameter in the stored procedure.
Dim usernameParam As New SqlParameter("@userName", SqlDbType.VarChar, 10)
usernameParam.Value = Trim(txtuser.Text)
 
Dim pswdParam As New SqlParameter("@password", SqlDbType.NVarChar, 10)
pswdParam.Value = Trim(txtpassword.Text)
 
Dim useridParam As New SqlParameter("@userid", SqlDbType.NChar, 5)
Dim usercodeParam As New SqlParameter("@usercode", SqlDbType.VarChar, 10)
Dim levelParam As New SqlParameter("@levelname", SqlDbType.VarChar, 50)
 
'IMPORTANT - must set Direction as Output
useridParam.Direction = ParameterDirection.Output
usercodeParam.Direction = ParameterDirection.Output
levelParam.Direction = ParameterDirection.Output
 
'Finally, add the parameter to the Command's Parameters collection
cmd.Parameters.Add(usernameParam)
cmd.Parameters.Add(pswdParam)
cmd.Parameters.Add(useridParam)
cmd.Parameters.Add(usercodeParam)
cmd.Parameters.Add(levelParam)
 
Dim reader1 As SqlDataReader
Try
If conn.State = ConnectionState.Closed Then
conn.Open()
End If
Try
reader1 = cmd.ExecuteReader
Using reader1
 
If reader1.Read Then
Response.Write(CStr(reader1.Read))
Session("userid") = reader1.GetValue(0)
Session("usercode") = CStr(usercodeParam.Value)
Session("level") = CStr(levelParam.Value)
Server.Transfer("home.aspx")
Else
ErrorLbl.Text = "Inavlid Login. Please Try logging again" & Session("userid") & Session("usercode") & Session("level")
End If
End Using
Catch ex As InvalidOperationException
ErrorLbl.Text = ex.ToString()
End Try
Finally
If conn.State <> ConnectionState.Closed Then
conn.Close()
End If
 
End Try
 
Else
ErrorLbl.Text = "Please enter you username and password"
 
 
 
End If
 

View 5 Replies View Related

Problems W/ Data Passed To Stored Proc

Oct 4, 2000

SQL 7.0 running in 6.5 mode

I have a stored proc that is pulling varchar data from a column and trying to use it in the rest of the proc. The problem is that in some of the data there is a single quote (ie Dave's). How can I pass this data in a useable form.

Thanks in advance,

Will Anderson

View 2 Replies View Related

Inserting Data Into A Table Using A Stored Proc

Apr 17, 2008



Hi All,
I want to insert data using a stored proc. Can anyone tell me the correct syntax for inserting data into a table using a stored proc?
Thanks

View 6 Replies View Related

Execute Stored Procedure Y Asynchronously From Stored Proc X Using SQL Server 2000

Oct 14, 2007

I am calling a stored procedure (say X) and from that stored procedure (i mean X) i want to call another stored procedure (say Y)asynchoronoulsy. Once stored procedure X is completed then i want to return execution to main program. In background, Stored procedure Y will contiue his work. Please let me know how to do that using SQL Server 2000 and ASP.NET 2.

View 3 Replies View Related

How Can I Get Data From MS Exchange Server Using DTS In SQL Server?

May 23, 2001

How can I get data from MS Exchange server using DTS in SQL Server?

View 2 Replies View Related

Stored Proc - Calling A Remote Stored Proc

Aug 24, 2006

I am having trouble executing a stored procedure on a remote server. On my
local server, I have a linked server setup as follows:
Server1.abcd.myserver.comSQLServer2005,1563

This works fine on my local server:

Select * From [Server1.abcd.myserver.comSQLServer2005,1563].DatabaseName.dbo.TableName

This does not work (Attempting to execute a remote stored proc named 'Data_Add':

Exec [Server1.abcd.myserver.comSQLServer2005,1563].DatabaseName.Data_Add 1,'Hello Moto'

When I attempt to run the above, I get the following error:
Could not locate entry in sysdatabases for database 'Server1.abcd.myserver.comSQLServer2005,1563'.
No entry found with that name. Make sure that the name is entered correctly.

Could anyone shed some light on what I need to do to get this to work?

Thanks - Amos.

View 3 Replies View Related

Stored Proc Question : Why If Exisits...Drop...Create Proc?

Jun 15, 2006

Hi All,Quick question, I have always heard it best practice to check for exist, ifso, drop, then create the proc. I just wanted to know why that's a bestpractice. I am trying to put that theory in place at my work, but they areasking for a good reason to do this before actually implementing. All Icould think of was that so when you're creating a proc you won't get anerror if the procedure already exists, but doesn't it also have to do withCompilation and perhaps Execution. Does anyone have a good argument fordoing stored procs this way? All feedback is appreciated.TIA,~CK

View 3 Replies View Related

Import Data From Text File Into A Temp Table In Stored Proc

Oct 1, 2001

Hey,
can one of you please show me how to import data from a text file into a temp table in a stored proc.
thanks
Zoey

View 1 Replies View Related

How Can I Retrieve Sql 2000 Encrypted Column Data From SQL 2005 Stored Proc?????

Aug 4, 2006



Hi...

I want to retrieve SQL 2000 Encrypted Column Data From SQL 2005 strored proc. My Stored Procedure was on SQL 2000 and it works fine....Then I restore Database From SQL 2000 to SQL 2005. The Following Statement is on my store proce.

select user_id , Encrypt(user_pass) from OpenRowset('SQLOLEDB','myserver';'sa';'mypass',databasename.dbo.users) as a

The Following Error I get When I execute the above statement.



Msg 195, Level 15, State 10, Line 1

'Encrypt' is not a recognized built-in function name.



Thank you.



Bal.

View 9 Replies View Related

Soap Message Exchange Between .NET Webservice And Stored Procedure

Aug 16, 2007

Hello,

is message exchange between a .NET Webservice and a SQL stored procedure possible?
And if, could you please explain me how? Or give me a tip where i can get more informations
and maybe samples?
thanks for your help

regards
pamelia

View 30 Replies View Related

ASP Cannot Run Stored Proc Until The Web User Has Run The Proc In Query Analyzer

Feb 23, 2007

I have an ASP that has been working fine for several months, but itsuddenly broke. I wonder if windows update has installed some securitypatch that is causing it.The problem is that I am calling a stored procedure via an ASP(classic, not .NET) , but nothing happens. The procedure doesn't work,and I don't get any error messages.I've tried dropping and re-creating the user and permissions, to noavail. If it was a permissions problem, there would be an errormessage. I trace the calls in Profiler, and it has no complaints. Thedatabase is getting the stored proc call.I finally got it to work again, but this is not a viable solution forour production environment:1. response.write the SQL call to the stored procedure from the ASPand copy the text to the clipboard.2. log in to QueryAnalyzer using the same user as used by the ASP.3. paste and run the SQL call to the stored proc in query analyzer.After I have done this, it not only works in Query Analyzer, but thenthe ASP works too. It continues to work, even after I reboot themachine. This is truly bizzare and has us stumped. My hunch is thatwindows update installed something that has created this issue, but Ihave not been able to track it down.

View 1 Replies View Related

Map Resultset From Executing A Stored Proc Into Input Columns Of A Data Flow Task

Jul 30, 2007



I need to loop the recordset returned from a ExecuteSQL task and transform each row using a Data Conversion task (or a Script Task).

I know how to loop the recordset returned by an ExecuteSQL task:

http://www.sqlis.com/59.aspx

I loop the returned recordset (which is mapped to a User variable of type System.Object) and assign the Variable Mappings in the ForEach Loop to different user variables which map to the Exec proc resultset (with names and data types).

I assume to now use these as the Available Input columns for the Data Conversion task, I drag a Data Flow task inside the For Each Loop container and double-click it, then add a Data Conversion task.

But the Input columns (which I entered in the Variable Mappings in the ForEach Loop containers) dont show up in the Available Input columns of the Data Conversion task.

How do I link the Variable Mappings in the ForEach Loop containers from the recordset returned by the Execute SQL Task to the Available Input columns of the Data Conversion task?

.......................

If this is not possible, and the advice is to use the OLEDB data flow as the input for the Data Conversion task (which is something I tried too), then the results from an OLEDB Command (using EXEC sp_myproc) are not mapped to the Available Input columns of the Data Conversion task either (as its not an explicit SQL Statement and the runtime results from a stored proc exection)

I would like to use the ExecuteSQL task to do this as the Package is clean and comprehensible. Which is the easiest best way to map the returned results from a Stored proc execution to the Available Input columns of any Data Flow transformation task for the transform operations I need to execute on each row of data?

[ Could not find any useful advice on this anywhere ]

thanks in advance!

View 4 Replies View Related

Requesting Null Value

Jul 8, 2006

if (paramNum1_cel.Value == null)
this.gerentes_beneficios.numCelular = // what do i put here
else
this.gerentes_beneficios.numCelular = (int) result ["Num1_cel"];
 
i need something to define a resultset, this field can be null or not
thanks a lot

View 1 Replies View Related

Exchange Data Between Databases On Two Servers??

May 29, 2007

Dear all
 
I have tow server on the same intranet. One server has a sql server 2000 database and the other one has SQL server 2005 databse.
 The sql 2000 database has a table called employee. When ever a new employee is inserted in the database i would like the same values to be sent to the sql 2005 database. But this cant be done on the application level. It has to be done in the database. The application level can not be changed.
I was thinking a trigger but how to achieve the writing from one database to another. If they were on the same server then it would be easier but because they are on different servers i dont know how to do it.
 Has anyone had similar issue before?
Any help is apreciated.
 
Sincerely
Dan

View 2 Replies View Related

Extract Exchange 2003 Data

Aug 14, 2006

I have searched everywhere for an answer and seems I am either blind or there is no simple solution. Basically I have a need to report on data stored in an Exchange 2003 data store. There is mention of a OLE DB for Exchange 2000 but nothing for Exchange 2003. For example, A company report on time spent on various categories in a staff's calendar, etc. I would like to use SQl 2005 SSIS to extract and reporting services to report. Why is this so difficult? I come from a Lotus Notes / Domino background and there are numerous articles and ways to do this? Please can some MS guru please give me some direction on where to look?

Cheers

Damien

View 3 Replies View Related

SQL Server Stored Proc Question

Jul 26, 2004

Can anyone help me? I'm trying to assign @totalvisits the sum of visits.totalvisits in the example below. I keep getting errors concerning the line

"@totalvisits= Sum(visits.totalvisits) AS SumOfTotalVisits"

I can't figure out how to write it out correctly so the sum fills @totalvisits.

--------------------------------------------------

DECLARE @email varchar (50)
DECLARE @totalvisits int

SELECT
@email = users.email,
@totalvisits= Sum(visits.totalvisits) AS SumOfTotalVisits
LEFT JOIN visits ON users.username = visits.username
GROUP BY users.username HAVING ((users.username) = @username)

--------------------------------------------------

Any help would be appreciated!

View 1 Replies View Related

Connect To Another Server From A Stored Proc

Sep 21, 2004

I have a stored proc that receives the connection string detials like servername, dbname, tablename,userid, pwd as parameters. how do i connect to that particular database on that server with the userid and pwd details ?

thanks
D.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved