Autogenerate Reply Or ServerProc Generated Message............
Nov 20, 2006
Hello,
I got my sample application to work that I am building my proof of concept out of. I need to be able to auto generate a reply message that would normally be in the run routine. The only way I see to do this is pull it from a table but I do not want to do that. I have tried tests where I change the code to see if I can send a message back but I have to reinstall the assembly into the database which is not what I am looking for. I am looking for a way to change the message by either accessing the GUI and getting the string, calling another function to do this, or something like that. I want it so I can change the code in the run routine in VS 2005 but this does not work. I am sure their is a trick to do this but am not sure what that trick is. What is a good way to do this other than accessing a table in the database?
Extremely thanks for the reply . I am using transactional replication for the database . I will try with snapshot replication as you suggested .
You mentioned that it will work with Transactional replication only if the application uses the option ' with log ' for those transactions .
Can you let me know where can i set this option for transaction replication ? I am sorry but i am not well versed with database replication procedures and management .
I have created my production server as a distributor and a publication on that server. On my backup server I have created a pull subscription. After that I have generated SQL scripts on my backup server so I can create the pull subscription anytime.
To test my script I used sp_removedbreplication 'dbname' to remove replication on the backup server. I then used the generated SQL script to create the pull subscription again. I got this error message
Job 'ProdServName_DBName-BackServName-DBName401A48AE-D8DC-4F29-A610-13916370CD0B' started successfully. Server: Msg 208, Level 16, State 1, Procedure sp_addsubscription, Line 135 Invalid object name 'syspublications'.
What does this Error message mean and what can I do about it?
Hi I have set a field “MessageId� as primary in a Messages table. What I want is that whenever user inserts a message through my site, the MsSql should automatically generate MessageId for the new message inserted, but this is not happening. Any suggestions, advice are highly appreciated. Thank You
How do you autogenerate your own primary key in SQL. Instead of SQL generating an IDENTIY number which would be 1, 2 ,3..etc I was wanting to give it my own sequence of numbers, how exactly do I do that can anyone help??
I have a table that I am constantly updating with data. I would like to have the field SMT_ID be updated with an autonumber that is unique on creation of the record- similar to Access' "AutoNumber" feature.
Currently I am using the "Identity" DataType. This works great, but I need my field length to be more than 4. I need 12.
I cant change this in the "Design Table" properties. How do I change it?
I tried the Beta 1 of the service pack 1 to .net 3.5. If I try to add an entity (and try to save this), I get the Exception "No support for server-generated keys and server-generated values".
How can I add entities to my Sqlce- database?
I tried to give the id- column (primary key) in the database an identity, another time without identity, only primary key --> none of them worked. I always get the same error.
What do I have to change to make successfully a SaveChanges()?
Hi I would like to create an Autogenerate function which has to do the following
autogenerate field type is varchar(10). in that first 2 characters are purely character string. remaining will be numbers
i'll pass the following parameters into the function 1. tablename 2. columnname 3. 2 character string that has to build the first 2 characters eg: functionname(emp, empid, 'EM')
Here the function has to execute and return the generated no. eg: EM1 - IF RECORDS NOT AVAIL IN THE TABLE EM5 - IF ALREADY RECORDS ARE AVAIL &THE MAX RECORD NO IS EM4.
In this functioin i've to pass any tablename and corresponding field with the 2 character build string.... Already i tried. Few problems are there in passing the tablename as parameter...
I am trying to insert a row into a sql table; I set the identity to 'yes' and seed to 1, increment to 1 in sql manager. My webpage does the insert but I am receiving this error. Any help would be great. Thanks in advance! Dim mySQL As String = "Insert into Process_Master (ProcessName) values (@pname)"
Dim myConn As SqlConnection = New SqlConnection(ConfigurationSettings.AppSettings("MATRIX_CONNECTION_STRING"))
I would like the numbers 000001 to 999999 to autogenerate in a newdatabase. I will be transfering information from another database andin that database the numbers 000001 to 010000 are already taken. Theyare used as identifiers in other programs and it would be easier ifthey were stored as written. Using identity the 0's are eliminated.Is there a way to keep them?Thank you,M
I have a database that has few tables whose table Schema changes oftenly based on a flat file specification and I wanted to automate the process where I drop the table and recreate it with the new schema using an SSIS package. Any Ideas on how I can achieve this?
I have a stored proceedure that is adding a record to a database table. When the record is added using an insert statement, the ID field is autogenerated. I have a second insert statement that inserts into a second table, however, I want/need? to use that ID field in order to link this additional information to the proper record in the initial table. Is there an easy way to do a select or just pull the ID? I was thinking I could do a select before the final insert using 2 or 3 required fields of which used in a select altogether would be unique, but before I did that, I wanted to see if I was missing a better way. I posted the code below.... set ANSI_NULLS ON set QUOTED_IDENTIFIER ON go
ALTER PROCEDURE [dbo].[Add_Employee_Data] ( @LastName as varchar(100),@FirstName as varchar(100), @MiddleName as varchar(100),@Position as varchar(100), @Department as varchar(100), @DirectDial as varchar(100), @Ext as varchar(100), @Fax as varchar(100), @HomePhone as varchar(100), @CellPhone as varchar(100), @Partner as varchar(100), @TimeKeeper as varchar(100), @Notary as varchar(100), @Practice as varchar(100), @SummerAddress as varchar(250), @SummerPhone as varchar(100), @LegalNonLegal as varchar(100), @Bar as varchar(100), @OtherEmail as varchar(100), @HomeAddressComplete as varchar(100), @HomeAddress as varchar(100), @HomeCity as varchar(100), @HomeState as varchar(100), @HomeZip as varchar(100), @School as varchar(100), @Degree as varchar(100), @Status as varchar(100), @Floor as varchar(100)) AS DECLARE @Code as varchar(100)
INSERT Into tblMain2(LastName,FirstName,MI,Position,Dept,Extension,DirectDial,[FAX DID],HomePhone,CellularPhone,SpousePartner, TimeKeeper,Notary,PrGroup,SummerAddress,SummerPhone,LegalNonLegal,Bar,OtherEmail,HomeAddressComplete,HomeAddress,HomeCity, HomeState,HomeZip,Floor,Active) Values(@LastName,@FirstName,@MiddleName,@Position,@Department,@Ext,@DirectDial,@Fax,@HomePhone,@CellPhone,@Partner,@TimeKeeper, @Notary,@Practice,@SummerAddress,@SummerPhone,@LegalNonLegal,@Bar,@OtherEmail,@HomeAddressComplete,@HomeAddress, @HomeCity,@HomeState,@HomeZip,@Floor,@Status) <<<<< Put select statement here to pull in @Code where LastName = @LastName and Extension =@Ext ?? INSERT Into Education(Code,CollegeSchool,DegreeCert) Values(@Code,@School,@Degree)
Our team is new to SSRS and we are trying to figure out how to refresh the data source view, autogenerate the corressponding report model and Re-Deploy the Report Model (rewrite existing Report Model) on the server on a periodoc basis or trigger the whole action whenever there is a change in the database on some specific tables.
We prefer to do this action through a Agent job ( a diff approach is also welcome).
in sql server 2000 ,in query analyzer :for example i have a emp table ,when i execute a query ,i have to get the emp table column names with its data types...for example :empno ---intempname -- varchar like this...what is the query to get the output like this
I am not using the SA account when I log in using windows authentication it seems to pick up my domain and active directory ID which is "usapp1dxd" it appears greyed out as well as the password on the login screen so you can't change it.
If you go into the management studio and right click on the server name in the left hand pane go to properties security the radio button for sql server and Windows authentication mode is selected.
For the begining thank for your reply. I started with a new job and I was hopeless when all normaly claimed things can't be done. I asked a lot of peoples who works on MSSQL(including SWYNK) for my problems(I know that I'm beginer on MSSQL) but they didn't knows any solution. And afterall I wrote that. For your ilustration, we develope information system for Invest company. Back is on MSSQL and client is in ASP.
>So... if you need a database you need to look at what needs to be done and >pick your DBMS that meets your requirements. --I didn't resolve on which DB we will develope:((
--No named cursors I mean that in general is using curosr names bootless. And you must deal with names... In interbase: DECLARE var1,2 INTEGER; FOR SELECT column,column2 FROM TABLE WHERE ... INTO :var1,:var2 BEGIN some code in loop; END
In mssql: DECLARE .. DECLARE crs CURSOR FOR SELECT ... OPEN crs FETCH NEXT FROM crs INTO @var1,@var2 WHILE (@@FETCH_RESULT = 0) BEGIN some code in loop FETCH NEXT FROM crs INTO @var1,@var2 END CLOSE crs DEALLOCATE crs -I thing that in mssql it isn't elegant. -problem with recursive procs -you must deal with names -If you can you may use named cursors in Interbase in fact
>-it don't know create resultset's from >> stored procs asynchronously when in sp is something else then only one >> select(problem if I want check access rigths to sp. for exapmle "...AS >> CheckPrivilege( ... ) SELECT.." This is confusing if user runs large >> query & he must wait until it creates the whole recordset...Armageddon goes >> first... Here is a solution, but it isn't very elegant and in some >> cases don't exists good solution > >I'm not sure if configuring SQL Server's "cursor threshold" parameter would solve this. "When >set to -1, all keysets are generated synchronously. If the cursor threshold is set to 0, all >keysets will be generated asynchronously."
-"cursor threshold" resolves it only in single select's and procedures with only one select's -It's unacceptable when your your user runs large queries
>>-max of nested procs is 16. >That is the limit in V6.5. In V7.0 the limit is raised to 32. -cool:)
>Union operator can't be used in a Create View statement in V6.5 according to the documentation. >Does Oracle support this? It appears that V7.0 of MSSQL will support UNION in a view. -cool:))
>-It don't have good exception > handling.(something like EXCEPTION, WHEN... (oracle, Intebase)) > >There are whole sections on error handling in SQL Books OnLine depending on >how you are >accessing SQL Server. Maybe it's as good as Oracle/Interbase... maybe not. I >don't seem to have a problem with it.
-Books are very feeble:( -but I thing that it can't work with EXCEPTION blocs. Good Exception handling is important tool for fast developing of robust apps
-I used example(s) from INTERBASE because I worked more on it, but in Oracle it's alike.
For a query like below ... How do i have to select only the latest revisions, if i need to filter last current revisions of each document ... where the revision could be either alphabetical or even numerical ...
Presently I get all revisions with the below query ... Note: csd_revi is the field of CSD table for revisions.
I've gotten everything to work -- almost! Here's the scoop... I'm using SQL Server 7.0 and ColdFusion (you don't need to know anything about ColdFusion). I'm trying to get SQL Server to publish/share/etc. a database with the network so ColdFusion (our website management/creation program) can access it and use it in a webpage. Well, so far, ColdFusion can detect and access the database (called "iami"), but it cannot find any tables in the database (particularily one called "phase1"). Can anyone help me -- the sooner the better -- ???
If you reply before 4pm today and offer truly helpful advice/input, I'll send you a reward/incentive from me personally (just give me your mailing address) just for helping out!!! :-)
Can anyone help me with handy scripts/stored procedures to capture blocking info on the server? We have SQL 7.0 w/sp3. Ray replied earlier saying that I can use so_who2!!, I think everyone knows that,please reply with some valuable info!!Please.. Thanks. Sonali.
I think jthis is a bug. I have a table created and populated on its own filegroup. I backup the db(all filegroups) and the trans log then I drop the one table. When I try to restore from my backups, it insists that I back up the trans log again. I do, then do the restore of both the filegroup and the trans log. The restore finishes, but my table is still not there and I can never get it back.
What should I have done? Is there anything that can be done other than restoring from backup? How does one know if the database is really recovering or is EM just joken? I can wait 2 hours before starting the restore
I was BCPing 12 million rows into a staging table. II used the '-b' option every 20K which I thought would do a commit and clear the log in batches. After the process EM appeared to show the transaction log as empty. Upon inspecting the Bcp output file I discovered the message that the BCP did not complete because syslogs was full. I could not do a truncate transaction log or a dump database. I tried to do a truncate transaction with no_log and it appeared to just hang. I stopped the SQL Server thinking I could dump the transaction log, but could not start the Sql Server again. I then stopped the NT Server because 'if all else fails'. The SQL Server started but the user database if marked as recovering.
Hi everyone I want to know if it's possible to do a for/while-loop so i can use INSERT
Look: I've this int [] test = new test[140]; But i need to insert for every value (140) a number so normally it would be : INSERT ... (case1, case2, case3 ...) value (test[1],test[2],test[3] ...) But isn't there a way to it with a loop? SOmething Like this ?
for( int i = 0 , i< 140, i++) { INSERT case[i] value test[i] }
Can it be possible to create trigger/procedurein following case2 server server A and server BA has db1db1 has tblAB has db2db2 has tblBcan it be possible to create trigger on server A.db1.tblA asinsert/update that trigger add/update record in server B.db2.tb2thnks-----------Hitendra
How do I indicate a post answered my question? While reading a reply to your question you will notice a button with this Icon: Clicking on it will mark the post as the answer to your question
I have set up a data driven subscription for a report, and against "Reply-To" I have selected "Specify a Static Value". I have then I have entered a valid email address.
When the report is received however, and the recipient clicks reply, the reply address is filled in as the Email Address from which the report was sent.
Is this a bug with the "Reply-To" functionality? Or do I have to do this a different way?
Is there a way to do this? When I have a further question in the same thread, my only option is to reply to the one who answered the last question. How do I put forward that question to everyone? Do I have to start a new thread with the same subject?
I'm trying to import data into an SQL Server (7.0) and I'm wondering which Source (Microsoft Data Link, Microsoft ODBC Driver for Oracle, Microsoft ODBC Driver for SQL Server, etc.) -- I THINK we would use the SQL Server driver but I'm not sure... to use AND WHERE TO GO FROM THERE? So far, I get seem to get things to work in my favor. I appreciate any help :) The data I'm trying to import is from Microsoft Excell. If there is anything else you need to know, please email me at iami@iami.org Please provide email/forum-based technical support.
I have a rather odd problem that hopefully you'll be able to shed some light on (nobody else has come up with anythig sensible).
We want to back up the databases to a hard drive held on another server so I mapped the drive in explorer to the drive then went into Enterprise manager and tried to create a backup device and it won't see the mapped drive.
I've tried mapping to my PC and I can see that via enterprise managers backup stuff (infact any PC in the office works) but it won't see any of the servers even though we can map to them and access them via windows explorer.
I've tried when logged on via sa and the windows NT administrator and still no luck. In fact no matter what I type or do it fails and keeps telling me device error or device off line which it isn't.
On our test instance of SQL Sever we can backup to other servers but not the new live version!