How Can I Generate Variables Automatically?
Dec 20, 2007
Hi there
I need to generate some variables , like var1, var2, var3 ....
It's determined by how many records in my database.
I want to write a for() to do this. But how?
For example
for(int i=0; i<datatable.rows.count; i++)
{
String vari = new String;
}
This is not a right way in C#, does anyone know how to?
Thanks!!!
View 1 Replies
ADVERTISEMENT
Feb 21, 2008
I generate SQL scripts on a regular basis for my database and it's objects.
Is it possible to run a job in SQL or make windows do this automatically on a periodic basis?
Anyone done this before?
View 3 Replies
View Related
Sep 27, 2007
Hi,
How can I generate rows automatically?
The number of rows is generated according to an input from the user!
Thanks,
View 8 Replies
View Related
Apr 18, 2008
Is there a tool that can automatically generate each stored procedures in the database into a separated sql file with the stored procedure name?
thanks
View 6 Replies
View Related
May 2, 2006
Hi, all,
I have a question about adding a unique key column to an existing table.
what i trying to do is that: I have already created a table, now i wanna add a ID column to this table, and generate the values for ID column from 1 to the existing row number. How can I get this done?
Thanks a lot in advance for any guidance.
View 6 Replies
View Related
Jul 25, 2007
Hello!
I'll try to explain what I'd like to do. On my SQL Server 2005, SSAS contains a mining model (In fact a cluster one).
I'd like to show a detailed diagram build from this model on a web site. This diagram (and this is why I need automation) would depend on the user who's consulting it.
For example, a firm A will see the number of its customers in each cluster, and this information will be different for another firm B
So, I thought about several steps to perform:
1) Feed the model with the data for each firm
2) Build a Visio diagram from the previous data using the DM addins for Visio 2007
3) Generate HTML using the Visio export wizard
4) Publish HTML
And (important) this should be done automatically.
I made some experiments:
Step 1 is easy to perform with SSIS
Step 3 is also easy to do with the Visio SDK (using, among others, the exportAsHtml control) and Step 4 is trivial
I failed to perform stage 2, even with the SDK, since creating a diagram from a DM template requires the user to fill a wizard. By code, I'm able to create a document from a DM template, Drop a DM Stencil but when the wizard appears I'm unable to get a handle on it. And even if I was, I dunno if it would be a "clean" way of doing.
So my question is: first of all: isn't there an easier way to generate HTML from Mining Models automatically? And if my approach to this problem is the best (or the "least bad"), how to generate datamining Visio diagrams from code automatically?
View 5 Replies
View Related
Jul 21, 2015
last couple of months we're getting automatically generate jobs under sql server job event. causing occupy the resources.
in daily basis i've to remove mannualy. i've do disable the job no of times from properties, but it generates again.
how to remove it permanently. following are the job which generates automatically-
15559-cook.exe,
15564-dbdotas
15565-dbdotas2
15552-ftpbacks.exe
15554-install.exe
15555-kills.exe
15557-kugou2010
15558-macs.exe
15553-pdoors.exe
15561-regs.exe
15562-regsa.exe
View 9 Replies
View Related
Sep 17, 2015
I am trying to use variables to generate the command:
USE DATABASE
GO
Code below:
DECLARE @DBName_Schema varchar(500)
SET @DBName = 'Test'
EXEC ('USE ' + @DBName )
GO
It does not seem to be working.
View 5 Replies
View Related
Dec 3, 2013
How can I generate the following result using nested loop and variables :
col1col2
15
16
17
25
26
27
35
36
37
45
46
47
View 5 Replies
View Related
Sep 4, 2006
Hi,
I am not comfortable with DTS 2000 but I need to execute a encapsulated DTS 2000 package from a SSIS package. The real problem is when I need to pass SSIS variables to DTS 2000 package. The DTS 2000 package have 3 global variables that I can identify on " Execute DTS 2000 Package Task Editor - Inner Variables ". I believe the SSIS variables must be mapped on " Execute DTS 2000 Package Task Editor - OuterVariables ". How can I associate the SSIS variables(OuterVariables ) to "Inner Variables"? How can I do it? Much Thanks.
João
View 8 Replies
View Related
Jan 24, 2006
Hi,
I would like to design a SSIS package, which have couple of variables. It loads a xls file specified in a variable [varExcelFileFullPath] .
I will run it by commands: exec xp_cmdshell 'dtexec /SQL ....' (pls see an example below).
It seems it does not get the values passed in for those variables. I deployed the package to a sql server.
are there any grammar errors here? I copied it from dtexecui. It worked inside Dtexecui not in dos command.
exec xp_cmdshell 'dtexec /SQL "LoadExcelDB" /SERVER test /USER *** /PASSWORD ****
/MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING EW
/LOGGER "{6AA833A1-E4B2-4431-831B-DE695049DC61}";"Test.SuperBowl"
/Set Package.Variables[User::varExcelFileName].Properties[Value];"TestAdHocLayer"
/Set Package.Variables[User::varExcelWorkbookName].Value;"Sheet1$"
/Set Package.Variables[User::varExcelFileFullPath].Value;"D: estshareTestAdHocLayer.xls"
/Set Package.Variables[User::varDestinationTableName].Value;"FeaturesTmp"
/Set Package.Variables[User::varPreSQLAction].Value;"delete from FeaturesTmp"
'
thanks,
Guangming
View 2 Replies
View Related
Mar 3, 2008
Hello everybody,I was configuring a SqlDataSource control using SQL Authentication mode.I first added a database file (testdb.mdf) through Solution Explorer-Add New Items. Then through Database Explorer I created a table named "info"Then while configuring the SqlDataSource control I used the SQL Authentication mode and attached the "testdb.mdf" database file.Test Connection showed success. But when I hit the Ok button of the wizard it displayed the following error message:Failed to generate a user instance of SQL Server. Only an integrated connection can generate a user instance.While configuring the SqlDataSource control I clicked "New Connection". Under Data Source section I tried both Microsoft SQL Server and Microsoft SQL Server Database File. And in both the cases I attached a databese file(testdb.mdf). Plz enlighten me on this.Thanks and Regards,Sankar.
View 1 Replies
View Related
Mar 15, 2007
In my table have two field
Ex
TableName===> Details
-----------
No ===========>int primary key
Name =========>Char(50)
---------
i need automatically add value in first field(No)..
Once execute insert command using only second field
after automatically generated first field value
Result
--------
No Name
1 dfgd
2 dgdg
.......
--------
View 2 Replies
View Related
Mar 28, 2006
Hi Guys,
I have a website with multiple pages and when a user signs in it puts a 1 in the database and their online status is shown to the rest of the members, if they use my signout button which I have on each page, it signs them out and updates the database with a 0 in the process, so shows them as then offline, my problem is some people forget to sign out and just close the browser window or begin surfing elsewhere.
Is there a way to have sql server 2000 automatically change the field in the database after 30 minutes of inactivity.
Or is there a way to automatically sign users out as they either click on the X in the browser window, or as they leave my site.
Any help would be appreciated.
Cheers
View 4 Replies
View Related
Sep 28, 2001
Some of my jobs hang at FTP step for several hours until some one kills the FTP (it's a perl process) on the box. Is there a way to find how much time a particular step of the job is executing? and know it by somehow if it's hanging at that step?? If we know this,I want to kill the perl process(FTP) on the box in an automated way whenever the job hangs! Any ideas welcome!! Thanks. :-)
Di
View 3 Replies
View Related
May 7, 2007
hi
This is Elangovan. How to automatically run the SSIS (SQl SERVER2005 )
plz help me
bye
elangovan
View 4 Replies
View Related
Mar 17, 2008
Hi All,
Is there a way to modify the configuration file to allow the Report manager to rendering the report to PDF file automatically?
Thanks
Micror
View 2 Replies
View Related
Nov 12, 2006
How can I delete tables in a SQLServer Database automatically (at the moment I just do it using Micorosft SQl Management Studio Express manually) But its important that I can do that automatically, the best thing would be if I can do that from a .NET programm. thanks in advance,mulata
View 6 Replies
View Related
Feb 11, 2007
in sql server I want to update the "UpdatedDate" field automatically when I change ANY other field in that specific record.it has to be set to the current server time.
View 2 Replies
View Related
Mar 8, 2007
i am using visual web developer 2005 and SQL Express 2005 with VB as the code behindi have a button and in the button click event i have written codes to INSERT to a database table - it has one primary keyso when i click the button, if there is already a row with primary key fields value as 10 and if i try to INSERT with the same value in the primary key field there will occur primary key constraintso , if i try to INSERT with the already existing primary key fields value, instead of INSERTing it should be UPDATEd without generating any errorplease help me
View 1 Replies
View Related
Jul 31, 2002
I need to setup an automated process to delete all the files older than a month in a particular directory on a network drive, how is that possible? Any help is greatly appreciated.
thanks.
Sheila.
View 1 Replies
View Related
Aug 23, 2001
I have a problem with a server where for some reason when it is rebooted the SQLAgent service does not start automatically. You have to go into control panel, services and start it, even the it is set to Automatic.
Thanking in advance for any ideas??
View 1 Replies
View Related
Aug 30, 2001
Hai,
My database shutsdown automatically after 2 hours , when i start to run a jobs from a queue.
Can someone suggest me a way for monitoring it, so that i can find the possible causes.
Thanks
Balaji
View 1 Replies
View Related
Sep 13, 2001
I have table A and table B. i want if table A add records, automatically table b add records too.
thanks,
andi
View 1 Replies
View Related
Jul 21, 2000
I have an sql 7.0 database with an Access 97 front end. We need to run a
process every night to update the database. However, not all users disconnect
from the front end and we get lock conflicts. It is not acceptable to have a
person stay till the evening to manually kill all the spid's and i can't find
any way to force all users off the database as you can in DB2. Also,
we can't change the front end. Any idea how to force all users off of
an sql server database (kill all spid's?) in an automated way. Thanks
View 4 Replies
View Related
Aug 2, 2000
Is there a way to automatically delete tables in a database? I want to delete tables with a specific prefix in their names (that I assign to them) based on their age. Is there a way to do this automatically while keeping the tables that I don't want to touch?
joe
View 3 Replies
View Related
Apr 10, 2000
Does anyone know at what point SQL Server 7.0 decides to grow the database when the autogrow option is set? Our site just went down for 45 minutes because the growing process was taking too long as compared to the data coming in, so the device filled up.
Ray? Craig? You guys seem to know all, so jobs.com appreciates your input...
View 7 Replies
View Related
Nov 2, 2000
I'm looking for a way to get the name of the server on which the DTS package lives.
I copy packages between servers. The problem is that everytime a package is copied
to different server, I have to change the reference in the connection strings to point
to the new server name. I'd like to find an automatic way to interrogate the server
name where the package currently lives and dynamically change connection strings
from within an ActiveX task. That would cut maintenance way down.
View 1 Replies
View Related
Jan 8, 2004
Hello everyone,
I have 45 GB db with
-Automatically grow file by 10 %
- full recovery
-log shipping every 5 minutes.
-full backup every 24 hrs
database grown from 33GB to 45 GB for 1 year period
4-5 times a year massive insert
done to database(no specific dates)
if I change autogrow to by 300MB or 4%
1.how would it affect insert process ?
2.how it affect daily performance ?
Thank you
Alex
View 3 Replies
View Related
May 7, 2002
I installed SQL Sp2 and at the same time took Carbon Copy off. No when the machine comes up neither SQL Server or the Agent will not come up. If I go to Service manager I can start both just fine. Nothing in either log to show why. Anyplace or any thoughts
View 2 Replies
View Related
Aug 30, 2001
when i start to run a jobs from a queue to the database, after 2 hours the database shutsdown automatically.
This problem is reproducable, Running a trace on it from profiler is what comes to my mind. Is there any other suggestion.....
Thanks
Balaji
View 1 Replies
View Related
Dec 27, 2004
Hi,
I have a table that contains 2 columns. The first column has the datetime, and the second has a value (see the "Before" table). In my SELECT query I want to select all records like 0:00:00 <= Date <= 0:40:00. However the missing 10-minutes value 0:30:00 should be automatically inserted with value = NULL.
Before:
Code:
Date Value
------------------- -------------------
13/12/2004 0:00:00 15
13/12/2004 0:10:00 17
13/12/2004 0:20:00 21
13/12/2004 0:40:00 12
13/12/2004 0:50:00 13
After:
Code:
Date Value
------------------- -------------------
13/12/2004 0:00:00 15
13/12/2004 0:10:00 17
13/12/2004 0:20:00 21
13/12/2004 0:30:00 NULL
13/12/2004 0:40:00 12
Can anyone help me? Thanks.
View 6 Replies
View Related
Jul 5, 2005
When writing an INSERT statement, what code do I pass to the SQL database to automatically truncate a value to fit in to the database if it contains more characters than the field the data is being entered into?
View 7 Replies
View Related