Replication problem


i have a repication problem,
the error of the ditribution agent is:
{Call sp_MSins_Lane(1,'1',0,3,240)}
imossible to find the stored procedure 'sp_MSins_Lane'
error number 2812
can you help me.
Posted On: Tuesday 20th of November 2012 12:34:36 AM Total Views:  137
View Complete with Replies

RELATED TOPICS OF Microsoft SQL Server PROGRAMMING LANGUAGE




Upsizing problems

Sorry if this is a dumb question but I'm new to SQL and am tearing my hair out. I have upsized an Access DB I have imported a load of queries but they don't work. In Access they are cross tab queries, I assume that I need to change the query in some way the current code that works in Access is: TRANSFORM Count(Qry_Orders12Months.OrderStatus) AS CountOfOrderStatus SELECT Customers.CustomerID FROM Customers INNER JOIN (Orders INNER JOIN Qry_Orders12Months ON Orders.OrderID = Qry_Orders12Months.OrderID) ON Customers.CustomerID = Orders.CustomerID GROUP BY Customers.CustomerID PIVOT Qry_Orders12Months.OrderStatus In ("Current","Dormant"); I also have a problem with another query that uses the If Function as well the current code is: SELECT Orders.OrderID, Orders.OrderDate, Date() AS StartDate, DateSerial(Year([StartDate]),Month([StartDate])-12,Day([StartDate])) AS 12Months, IIf([OrderDate]>=[12Months],"Current","Dormant") AS OrderStatus FROM Customers INNER JOIN Orders ON Customers.CustomerID = Orders.CustomerID;
VIEWS ON THIS POST

131

Posted on:

Tuesday 20th November 2012
View Replies!

Multiple identity column problems

I'm currently designing a system for use by a small chain of stores and am trying to make use of the advances in broadband availability to create an 'almost realtime' system. The system controls stock, sales, etc and will be used in 23 stores. The system is being programmed in VB6 using MSDE in each of the stores for the DB and MSSQL2000 on the central server. Data is sychronised with the server via XMLHTTP on a regular basis. So here's the problem: we have a customer registration table that can be filled in at any store and we want to make available in all stores. in each store i have 'store_id' and 'customer_id' fileds which combined make the key. the customer_id field is an identity column and obviously each store has a unique id. If i set the customer_id field to not be an identity field on the server, i can receive all data and maintain uniqueness, but the problem arises when i try to send the data out to all stores. Obviously i can't insert over an identity field! So how do i maintain uniqueness in my keys! Is there a way to make an int field autoincrement if no value is passed into it I'm stuck - HELP!
VIEWS ON THIS POST

276

Posted on:

Tuesday 20th November 2012
View Replies!

ASP SQL installation error problem

Error installing aspportal.net on godaddy SQL database: "Microsoft OLE DB Provider for SQL Server error '80040e37' Invalid object name 'siteoptions'. D:\HOSTING\xxxxx\CONTENT\HOME\../../content/stats/incstats.asp, line 4 " Please help. We're stuck!
VIEWS ON THIS POST

273

Posted on:

Tuesday 20th November 2012
View Replies!

Sub Query column problem

Hi I was wondering if anybody could help me out here. This is for an App in ASP(classic) and MS SQL A Quick explanation... I have 3 tables called ADMIN_SUB, ADMIN & STAFF. What I want to do is depending on a particular row value in table ADMIN, either populate a field with either the forename + surname from ADMIN_SUB or the forename + surname from STAFF. (see EXAMPLE 1) EXAMPLE 1 "SELECT ADMIN.admin_id, CASE WHEN ADMIN.staff_id IS NULL THEN ADMIN_SUB.forename ELSE STAFF.forename END AS forename, CASE WHEN ADMIN.staff_id IS NULL THEN ADMIN_SUB.surname ELSE STAFF.surname END AS surname FROM ADMIN LEFT OUTER JOIN STAFF ON ADMIN.staff_id = STAFF.staff_id LEFT OUTER JOIN ADMIN_SUB ON ADMIN.admin_id = ADMIN_SUB.admin_id" (The above works fine and I can just access them as forename and surname, but when i use this as a sub query i can no longer get to their values.) BUT I need to try and use this as a SUB QUERY and the problem is I can't get at the values of forename and surname output-ed by EXAMPLE 2. You can see how EXAMPLE 1 is placed inside EXAMPLE 2. The columns I need from EXAMPLE 2 are ward_id, ward_name, phone, main_contact, notes, forename, surname I have the following SQL (accessed as an ADO recordset) EXAMPLE 2 rs.open "SELECT ward_id, ward_name, phone, main_contact, notes FROM WARD WHERE EXISTS (SELECT ADMIN.admin_id, CASE WHEN ADMIN.staff_id IS NULL THEN ADMIN_SUB.forename ELSE STAFF.forename END AS forename, CASE WHEN ADMIN.staff_id IS NULL THEN ADMIN_SUB.surname ELSE STAFF.surname END AS surname FROM (ADMIN LEFT OUTER JOIN STAFF ON ADMIN.staff_id = STAFF.staff_id LEFT OUTER JOIN ADMIN_SUB ON ADMIN.admin_id = ADMIN_SUB.admin_id) WHERE ADMIN.admin_id = main_contact) ORDER BY ward_name" Can anybody help
VIEWS ON THIS POST

157

Posted on:

Tuesday 20th November 2012
View Replies!

Some problem with T-sql

Here is my store procedure.. Code: if @PartnerID = '0' begin SET @SQLStatement1 = '' end else begin sET @SQLStatement1 = 'where (PartnerGuideID =' + @PartnerID +')' end SELECT @SQLStatement2 = 'SELECT * FROM PartnerGuide ' + @SQLStatement1 EXEC(@SQLStatement2) it return the error Microsoft OLE DB Provider for SQL Server (0x80040E07) Conversion failed when converting the varchar value 'where (PartnerGuideID =' to data type int. when i change Code: sET @SQLStatement1 = 'where (PartnerGuideID =' + @PartnerID +')' to Code: sET @SQLStatement1 = 'where (PartnerGuideID = 60)' its ok..
VIEWS ON THIS POST

131

Posted on:

Tuesday 20th November 2012
View Replies!

HELP!!! Connect problem to sql server

Can anyone help me configure Visual Web Developer so that I can connect to my providers SQL 2005 server. I get the following error when trying to us the login page that was created.__An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
VIEWS ON THIS POST

172

Posted on:

Tuesday 20th November 2012
View Replies!

Connection problem

Hi Everybody, One of my colleagues is working on a project that is in VB.Net.He is using SQL server for database. The project is complete and working well on our systems. But when we are installing the setup on clients system it is giving the error "Specified module could not be found." Same set up is working on our other systems. For connection he has used SQLDataAdapter. Can anyone of you help us.. I know you people can. Its urgent..
VIEWS ON THIS POST

83

Posted on:

Tuesday 20th November 2012
View Replies!

Attach DB problem

I am attempting to attach a database and I am getting the following error: Server: Msg 823, Level 24, State 2, Line 1 I/O error (bad page ID) detected during read at offset 0x000001f3400000 in file 'c:\code\data\ikb36pmm_data.mdf'. I've tried adding/connecting/attaching it several different ways with no luck. I get the same message above using enterprise manager's Tasks Attach and using sp_attach_db. Thoughts
VIEWS ON THIS POST

123

Posted on:

Tuesday 20th November 2012
View Replies!

sql text/memo field type problem

Hi all, I am new to the SQL server and had transferred data from an Access database. went well except one field - a memo type. Scenario: I had copied-and-pasted MS Powerpoint slide text to database. (Didn't want to retype data) As you know (from a MS user standpoint)this causes a minor problem with extra spaces and the curly quotes. The database formats these 2 things as question marks. Not too many to retype; however, on larger text fields I am "locked" out of the records that are relatively large. I am confused as to why I am able to alter the smaller (but same memo tyoe field data) I have it set up for nvchar 4000. These are Powerpoint texts. The text is no where near 4000 but I wasn't able to edit the larger input Please tell me where I am going wrong. I am used to a simple Access datase with either 1. text field or 2. a 64k memo field. What should I set this field to and perhaps I am missing some other setting on SQL server.
VIEWS ON THIS POST

284

Posted on:

Tuesday 20th November 2012
View Replies!

calcuation problem

I need some help into how to approach this problem I have 4 tables and based on the results in table A and B I need to do a query that will first take the name of the hobby in table A and match them with each customerid hobby in Table C. The table above is the Hobbies table A, Hobbyid Clientid hobbyname statename 1 1 swimming GA 2 1 jogging CO 3 1 dancing NY 4 1 swimming SC 5 2 swimming NY 6 3 swimming NY table B is just a sample of the income table B hobbyid minsalary(10) expectedsal(10) 1 20000 100000 2 30000 400000 3 40000 500000 4 50000 600000 5 60000 200000 6 70000 700000 C customerid State(10) cminsalary(5) cexpsalary(10) hobby 1 GA 20000 100000 swimming 2 NY 20000 30000 jogging 3 SC 30000 10000 dancing 4 CO 10000 30000 swimming D customerid stateSchools (10) StateBirth (20) PreferredState (10) 1 GA NY SC 2 NY NC GA 3 SC GA CO 4 CO CO GA The tables already have the data and i would like to compare tables A and b with tables C and D so anything that is a state in table C and D is compared to the statename in table A and if the states match they will be given points I would then like the sum of the points , this category will be called geography. Table B minsalary and expectedsalary will be compared to table C CSalary and cexpsalary and put in a category called income a match will be given points. The points allocated are in brackets next to each field. Once I have a total points for each category I want to add them together and then add them to the table below. TABLE E customerid hobbyid finalscore so if customerid 1 filled out a questionare the hobby is swimming so the first thing will be to select all the hobbies that equal swimming from table A once we have all the hobbies that = swimming ie( hobbyid 1,4,5,6) then the statename for ( hobbyid 1,4,5,6) will be compared to the values that have state in them in tables C AND D e.g stateSchools, StateBirth , PreferredState,etc and if the statename matches any of these feilds e.g table A Statename for hobbyid 1 GA is a match for customerid 1 stateschools GA so points will be allocated for a match and no points if no match. i then want to get the total points from all the questions and then put them in a table called total score (Table D) which will hold the custermerid, the hobbid and TOTAL score so the results will look like this based on the mactches for each categorgy TABLE D customerid hobbyid score 1 1 40 1 4 10 1 5 10 1 6 10 the clientid and customerid are different.
VIEWS ON THIS POST

113

Posted on:

Tuesday 20th November 2012
View Replies!

SQL Reporting Services Printing problems

, I have a problem with printing from the SQL Reporting Services. I am sure that I have the correct print settings, and everything prints off fine from other applications. But when I print from SQL Reporting Services using the ActiveX Control print button, the setting goes back to the wrong print setting and then I have to go to properties and change it to the correct setting. I have to do that every time I print something. I tried to reinstall the printer driver but still no luck. Anyone have idea why
VIEWS ON THIS POST

115

Posted on:

Tuesday 20th November 2012
View Replies!

sql server 2000 on win2k VS 2k3 problem

Hi all, I'm running into a problem that has me absolutely stumped. In my environment, we have 3 locations, and thus 3 file servers and 3 sql servers. 2 of these locations are on 2k advanced, and the third is on 2003 server. The problem i'm having is involving an ASP script. To make a lot of code short, -asp page passes in vars to a store procedure -stored procedure populates a temp table and uses a sysobjects temp table as well -temp table is then joined to a View In the view lies the problem. in alter mode, it looks like this: Code: ALTER view dbo.vw_DSHistory_1 as select top 100 percent datepart(hour,calltime) as HourOfCall, cast(left(callTime,11) as datetime) as DayOfCall, agent, reason, finishcode, resultcode, status, c.job_name from SJ4005_CallHistory as h join SJ4005 as c on h.i3_rowID = c.i3_rowID where calltime between '08/03/2004 8:00:00' and '08/03/2004 23:59:59' order by cast(left(callTime,11) as datetime), datepart(hour,calltime) The dates and 'SJ4005' is a dynmaically written view passed in vars to the store procedure. Code: insert into @tempResults (fields) --values in a select: select . . . . from vw_DSHistory_1 h group by h.Job_Name, h.DayOfCall, h.HourOfCall order by h.DayOfCall, h.HourOfCall, h.Job_Name This all works 100% on two of our servers. word for word copy paste onto our 3rd, on 2k3, and the view is not updating the variable fields. Is there a setting im missing does 2k3 have some kind of permission issue with passing a var from more than one thing (asp -> sp -> vw)
VIEWS ON THIS POST

285

Posted on:

Tuesday 20th November 2012
View Replies!

hi i m having problem

i m using MSDE i m trying to use session object to work with it. i dont know how to do it can someone help.....here is what i have written: ALTER PROCEDURE reportjobposted ( @emuser varchar (20) ) AS SELECT Jobs.jid, Jobs.joposted, Jobs.jocutoff, Jobs.jotitle, Jobs.jostatus, count(Applications.causer) as "# of Applicants" FROM Jobs, Applications WHERE Jobs.jid=Applications.jid and @emuser="Session("EmployerName")" group by jobs.jid, jobs.joposted, jobs.jocutoff, jobs.jotitle, jobs.jostatus order by Jobs.jid i have passed the value in the "EmployerName" in the session from a text box in another page. i m trying to diplay in a data grid all the above fields where table jobs and table applications jid is equal and the emuser field in Jobs table = to what the session holds. Please help me Thank you Shams
VIEWS ON THIS POST

354

Posted on:

Tuesday 20th November 2012
View Replies!

help with variable problem in IF statement?

hi, i'm completely stumped with this one. It is a simple test (via IF) for booking where it decides which path to follow. Or not so simple, even.. It keeps taking me to same bit. Have tried putting form value into variable. Tried rearranging various ways. The available is definatley being calculated properly and have it displayed. What can be going wrong with form (just added 'id' there too) Is there something missing or do i have to convert to integer format or something The two "booked" and "places" fields are long integers, no indexing, not autoincrements or anything. Have tried for ages with this and is holding me back from the rest of code and final few pages of my site...which is VERY frustrating.
VIEWS ON THIS POST

166

Posted on:

Tuesday 20th November 2012
View Replies!

date problem

... here is my code Set con = server.creteobject ("ADODB.Connection") con.Open "mydb" resultupdate = "INSERT INTO db (date) VALUES (#"&now()&"#)" con.Execute resultupdate But it give error -- Syntax error in INSERT INTO statement. any idea\t thx
VIEWS ON THIS POST

140

Posted on:

Tuesday 20th November 2012
View Replies!

SELECT string truncation problem!

Hi Pals, Need some help. I have big sql which is more than 4000 characters. Basically the sql is formed by UNION operator. For that reason i have declared the datatype as VARCHAR(MAX). and then tried to assign the value to a variable. and when i am trying to print the SQL using PRINT / SELECT , the sql is getting truncated. What i have done is instead of printing i have used SELECT LEN('SELECT ..........'). Then i am getting output as 8000 chars which can easily be accomodated by VARCHAR(MAX) datatype (i.e 2^31 chars.) Why is the sql is getting truncated What could be the problem How could we resolve this problem Do we need to take 2 string variables and do that or else do we have any other solution for this. Basically i am inserting the result fetched by the big SELECT stmt inside my stored procedure. Any Thoughts Any suggestions will be greatly appreciated.
VIEWS ON THIS POST

179

Posted on:

Tuesday 20th November 2012
View Replies!

Any recommendation for good SQL Server replication software?

I'm looking for software that does SQL Server replication. The current replication software that we use replicates corrupted databases. Which really defeats the purpose of replication. Anyway, I'm looking for software that will recognize that the database being replicated has been corrupted. If this situation occurs, then the replication software should NOT replicate the corrupted database. Any suggestions
VIEWS ON THIS POST

90

Posted on:

Tuesday 20th November 2012
View Replies!

wanna check whether dbs is in replicationmode

wanna check whether dbs is in replicationmode so i thought that calling dim tester as string server.ExecuteWithResultsAndMessages("sp_helprepli cationdboption 'dbsname' ", , tester) would help me but tester is always "" even if the dbs is in replication mode, howto get a result from a stored procedure help would be great greets nobby
VIEWS ON THIS POST

163

Posted on:

Tuesday 20th November 2012
View Replies!

How to solve sudden replication problem...

We're running a replicationprocess for months now, and 2 days ago it broke down, for no appearant reason I can detect. The setup is this: A SQL2K server has a publication defined on a database, consisting of several dozen tables. It is a transactional publication, running continuously. There is 1 subscriber, a SQL2005. Both servers run with Win2003 and all have the latest servicepacks. Up until 2 days ago there was hardly a problem. Then I received errormessages on being unable to load into a specific table. That table had been changed on that day, namely, 1 column was changed from CHAR(13) to CHAR(12). I do not know if this has any relation with the problem we experience. Currently the databases are structural the same. I could not get the replicationprocess to work and deleted all, publication on server1 and subscription on server2. I tried to setup a new transactional publication, which is not a problem, however, I cannot create a succesful subscription. I receive the message: The process could not bulkcopy into table 'Tablename', where tablename is the changed table... Again, both tables in publisher and subscruiber are the same in all respects. When I remove the offending table from the publication, the same message now with another tablename... Removing this table will result in again this message with another tablename... I am really flabbergasted. Any idea where to look at TIA FreeHansje
VIEWS ON THIS POST

151

Posted on:

Tuesday 20th November 2012
View Replies!