Best Way To Test To See If The Database Is Running?

Aug 7, 2007

Hello all-
I need to check to see if the database is running before I begin all sorts of processing and figured I would do something like this.  Any better ways to do this?  I want to check to see if the db is up and running and also check to make sure I can connect to it.

Private Function DatabaseRunning() As Boolean

'Checks to see if the database is up and running.Dim objDataConnection As SqlConnection = New SqlConnection(ConnectionString)

Try

objDataConnection.Open()Catch ex As Exception

Return False

End Try

objDataConnection.Close()

Return True

End Function

View 3 Replies


ADVERTISEMENT

DB Engine :: Replicate A Master Test Database To 100 Test Environments?

Oct 12, 2015

We are setting up a test lab environment with 100 machines.  We want one master testing db that gets replicated to each to run scripted application tests nightly.  

My goal is to minimize the amount of work to move this thing to each of the 100 test machines.  I am wondering if we need to even have the sql local and invest in a monster db server with 100 copies of the db we restore and each test machine point to their own db on that server, or if I should use db mirroring or something to get the master test db to each of those machines instead.

View 6 Replies View Related

Timeout Exception During Long Running Stress Test

Dec 5, 2006

Hi,

We have built two testing apps for sending and receiving files across the network reliably using SQL Express as the database backend. The apps seem to be working fine under light load. However during stress test, we always get the following exception:

"System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."

During stress test, both the sender and receiver are running on the same machine. Sender creates file fragments, store them in the sender database and then send out to the network. File fragments will be deleted from the sender database when the sender receives acknowledgement from the receiver. On the receiver side, file fragments will be stored in the receiver database as they are coming in from the network. Corresponding file fragments will be deleted from the receiver database when a complete file is received.

There is maximum of about 1500 updates and 1500 deletes per second on the sender database. On the receiver side, maximum is about 300 updates and 300 deletes per second. Our goal is to send 30 GB of data (it should run for about 10 hrs). As said before we never have a good completed test run, a "timeout" exception is always thrown from the sender app (when it tries to end a transaction). It could happen as early as 1.5 hrs after we started the test. Note that although we are sending 30 GB of data, but at any point in time the database shouldn't be too big (should be well within 4 GB limit) because we delete file fragments relatively soon.

Next we changed the "Query Wait" setting in the Management Studio Advanced setting from the default "-1" to a very big number, then we have a successful run of sending 30 GB of data.

- First of all, are we not doing this properly in terms of dealing with SQL Express? Is SQL Express able to handle long running heavy load transactions for hours?

- We also noticed even before we got the timeout exception, the memory usage of sqlserver.exe keeps growing. Maybe it doesn't have a chance to cleanup internally. If the app hammers SQL Express for hours, I wonder how does it handle fragmentation? I assume it needs some sort of de-fragmenation, otherwise performance will degrade significantly...

- Seems like the Query Wait setting plays an important role here, any guideline on how to pick a reasonable value? Or should we pick a relatively small number and then do re-try in our app when we get timeout exceptions?

- Is it possible that we are running into some SQL Express resource limits? Any idea of how can we tell other than the VM size of sqlserver.exe?

Any help or suggestions would be greatly appreciated!

Thanks very much
W Wong

View 5 Replies View Related

How To Copy Db From Test Server To Local Machine Running MSSQL2000 Per.

Jul 23, 2005

I am in a situation where I need to get a copy of test database that ison production server running MSSQL 2000 Standard to my local machinerunning MSSQL 2000 personel. I tried to use the copy wizard where itappears I get connected to the source server OK but when I try toindicate the destination server which is my local machine I get errorspoping up about cannot connect to (local) etc.I am NOT a DBA just a programmer trying to get a local test environmentup to be more productive.Lsumnler

View 2 Replies View Related

TempDB Log File Running Out Of Free Space While Running DBCC CheckDB On Large Database

May 28, 2015

In my environment, there is maintenance plan configured on one of the server and while running DBCC checkdb on a database of size around 200GB, log file usage of tempdb is increasing and causing the maintenance job to fail.

What can I do to make the maintenance job run successfully, size of the tempdb database is only 50GB and recovery model is set to simple. It cannot be increased as the mount point on which it is residing is 50GB.

View 3 Replies View Related

Package Executes On Test Database But Not In Production Database

Aug 24, 2006

hi!

I am able to run the package successfuly in test database. but not in production database. It throughs up error saying

Description: Unable to load the package as XML because of package does not have a valid XML format. A specific XML parser error will be posted.
Description: Failed to open package file "D:\TAHOE\APPS\SSISPackages\Integration Services Packages\ArchiveMain.dtsx" due to error 0x80070015 "The device is not ready.". This happens when loading a package and the file cannot be opened or loaded c
orrectly into the XML document. This can be the result of either providing an incorrect file name was specified when calling LoadPackage or the XML file was specified and has an incorrect format.
End Error
Could not load package "D:\TAHOE\APPS\SSISPackages\Integration Services Packages\ArchiveMain.dtsx" because of error 0xC0011002.
Description: Failed to open package file "D:\TAHOE\APPS\SSISPackages\Integration Services Packages\ArchiveMain.dtsx" due to error 0x80070015 "The device is not ready.". This happens when loading a package and the file cannot be opened or loaded corr
ectly into the XML document. This can be the result of either providing an incorrect file name was specified when calling LoadPackage or the XML file was specified and has an incorrect format.

what is the problem here....

JAs

View 3 Replies View Related

Unit Testing For SSIS - To Test Or Not To Test?

Oct 17, 2006

Now that we have a good programming model in SSIS - the question is whether to write automated unit tests for your packages, and would it generally be a good idea for packages?

Also - if yes to write tests - then where to find more informations regarding How to accomplish that?

View 1 Replies View Related

How To Test SSis Package And What Are The Things I Need To Test It ?

Nov 27, 2007



hi every one,
i need to test SSIS pacakge which will import data from different database where record count is around 5 millions.
iam planning to test it through c# code as well as manually also.
SSIS source : consist of 7 tables
SSIS destination :consist of 7 tables
Using c# code iam trying to run ssis package through batch file.
i am putting expected rowcount, column count in an excel file and comparing same with destination tables by writing query implementing ADO.Net concept.
am i going right way ,can any one suggest best and productive way to test the ssis package .
what are the other things i need to test it.
do any one can add test cases to it.






S.No

Test Case


1

Verify all the tables have been imported.



2

Verify all the rows in each table have been imported.



3

Verify all the columns specified in source query for each table have been imported


4

Verify all the data has been received without any truncation for each column.



5

Verify the schema at source and destination



6

Verify the time taken /speed for data transfer


7

Fields truncated due to difference in length of the field at destination.
Regards
Arif shareef

View 9 Replies View Related

Create Database &%Test$

Oct 8, 2007

Hi everybody
Have you ever noticed that you can create database with strange and unusual name with Enterprise manager but not with Query Analizer and through T-SQL code!!?

for example try to create database with name &%Test$
it will be created as i said earlier throgh Database Wizard in Enterprise manager but if you Execute :

Create Database &%Test$

you will receive the following error:
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near '&'.

View 5 Replies View Related

Creating Test Database

Nov 13, 2007

I need to create a test database on the live server for performance testing.From time to time, as structural modifications are made to the livedatabase, I'd like to be able to delete the test database and replace itwith a new copy of the live database. Is there a simple way to do this witha script or other? Thanks!

View 4 Replies View Related

Test Database Copy

Jul 20, 2005

I am using SQL 2000, 2000 Server. I need to find out how to schedule adatabase export import. I have a production database that I need toeasily copy to a test database occassionaly. When I run the DTSfunction it won't import the primary keys. It errors. I need to getall the tables and views from one database into the temporary databasethat we use for testing without recreating the temp everytime. Anysuggestions?Justin

View 1 Replies View Related

Importing Into Test Database

Jul 20, 2005

SQL 2000, Windows 2000. I need to find a way to export our data fromour production database and import it into a test database. I can doit to a freshly created test database I just have trouble doing itonce the test database is already populated. Is there a script I canwrite that will automate it by1) Deleting the test database2) Creating a new one3) Exporting the production tables and views4) Importing into the new test databaseWhat are my options here?Thank you in advance.

View 2 Replies View Related

Submitting Test From Form Into SQL Database

Feb 21, 2008

Hi,
I'm not very asp.net savy and could not find any solid examples of what I need done. I have one text box on my page and one submit button. I would like the information entered from the text box to go into a SQL database when clicking on the submit button. I'm not sure what the exact coding should be in order to get this operating the way I want. I'm coding in VB, this is what I have so far:<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server"><title>Untitled Page</title>
<script language="javascript" type="text/javascript">
// <!CDATA[function Submit1_onclick() {
}
// ]]></script>
</head>
<body>
<form id="form1" runat="server">
<div>
<input id="Text1" type="text" /><br />
<input id="Submit1" type="submit" value="submit" onclick="return Submit1_onclick()" /></div></form>
</body>
</html>
Thanks,
Derek
 

View 1 Replies View Related

Test Database In Sted Of Try Catch

Nov 4, 2005

I want to insert datas in a MS SQL databases but if it fails   i want to insert others datas
actually i am using

try

runcommand(datas)

catch

try

runcommand(otherdatas)

catch

runcommand(finaldatas)

end try

end try

is there another way more .... normal ?

thank you

View 4 Replies View Related

Inserting Test Data In To The Database

Jan 3, 2001

How can i insert test Data in to the Database,I want to insert one million records in to the table,This is to test Database Performance.
Can anyone help me in this regard,Do we have any scripts for this purpose???
thanks
Mar

View 4 Replies View Related

Create A Test Copy Of The Database?

Feb 8, 2007

Hi,

I have a database on the server which is in production and I would like to create another copy and use it for testing purpose. so the application can point to the test database for testing purpose.

What is the best way to do? I guess I have to name the test one with different name right?

can I do it without detach the production one? or just copy the database - tables structures from the currnet one?

Thanks!

View 2 Replies View Related

Refresh My Test Sql Server Database

Dec 17, 2007

I currently have a test sql server database and I am trying to refresh it with the production sql server data - to get the production current data.

If I copy the production database.mdf file and the database.ldf file from the from the production server and replace it with the test database database.mdf file and database.ldf files and then restart the database, would this give me the production current data, please advise. - If not could you please advise on how I could get the productions current database.

Many thanks for your help.

View 9 Replies View Related

Log File Of Test Database Bloating

Jul 20, 2005

A test database that we used in one of our implementation pilots wasabandoned around 4 months back. The database when abandoned had a logfile size of less than 500MB. The log file has been steadily bloating(just came to my attention) and has reached 8.5GB. The database hasnot been used since abandoned 4 months back at 500MB. Considering thefact that our live DB has a combined (data + log) file size of lessthan 2GB I do not want to delete the database before exploring thecause.Any ideas??? Thanks and appreciate your helpSQL Server 2000

View 1 Replies View Related

Test Database Log Filling Up, Replication Problem?

Jan 13, 1999

I have phrased this question here once before but no one could answer it, so please let me know if you think you know what the problem is.

I have a Test Environment on Server2 restored from the production environment on Server1. Production is publishing to a subscriber on Server3. The problem is that even though I have truncate on checkpoint = TRUE set for the Test environment, the log fills up (all the way, not even truncate transaction with no_log fixes it).

The log size is 750MB, with a data portion of about 3GB. Is this somehow related to the fact that SQL Server still thinks the tables in the test environment are marked for replication? I have noticed it believes this becuase I am not allowed to drop tables on Test, even though Test is not even set up as a publishing database.

Other information:
1) The recovery interval on Server2 is 3 minutes.
2) I am frustrated

Thanks in advance.

Jim Craddock mailto:jcraddock@solarc.com

View 4 Replies View Related

Comparing Development, Test & Production Database

Aug 2, 2001

Hi,

We're using SQL Server 2000 as back end in our web project. The problem is we've 3 different copies of same database - one each for Development, Test and Production sitting in 2 different machines.

My question is - is there any tool for comparing the objects (tables, stored procedures, etc) ?

Thanks,
Harish

View 2 Replies View Related

SQL Server Test To Production Database Migration

Feb 25, 2006

Hi,



Is there any tool available to migrate the data from the SQL Server
test database to SQL Server production database. Data Migration should
be based on a condition which can be given as an input for a table by
the user. The dependant tables also should be migrated based on the
condition. i.e data subsetting based on the matching conditions.



Ex : Salary > 2000



The rows of the table which matches the condition alone need to be
migrated for the corresponding table. Also its dependant table's
rows should be migrated based on the given condition. Please help me
with a tool which can automate this.



Thanks,

Smitha

View 5 Replies View Related

Database Mail - Send Test Email

Nov 23, 2006

i've got a brand new server and just installed SQL 2005.

when i try to send a test email, i get the following error message:

The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 5 (2006-11-23T11:49:34). Exception Message: Could not connect to mail server. (No connection could be made because the target machine actively refused it). )

I have checked all items from troubleshoot and eveything is ok...any help ?

thanks



View 2 Replies View Related

Interface To Connect To Database To Test TSQL

Jan 22, 2008



Hi
I am looking for an interface connect to 'SQL Server 2000 enterprise' so that my TSQL can be executed. I am using 2003 Excel but there is a limitation of 65k records only can be loaded. Can I use 'SQL server express' 2000 or 2005, Acess?
If I want to use client of 'SQL server 2000' do I need to buy it? Which interfact has the query analyzer ?
Thanks in advanced
Daniel

View 3 Replies View Related

Kindly Advice On How To Test Faulty Connection To Database?

Jun 2, 2008

Hello,
I have an asp.net application which connects to SQL Server 2005 database.
One out of 15 times (approx) the applicaiton does not make connection to the database and an exception is thrown.
I am not sure how to debug this. Should I write some code which can make connections in a loop to test how much stress the sever can handle?
Kindly suggest some ideas. Thanks.

View 3 Replies View Related

SQL Security :: Database TEST Is Already Open And Can Only Have One User At A Time

Apr 30, 2015

Database 'TEST' is already open and can only have one user at a time.

I also tried this command but having the same error.

Use Master
GO
Select * from master.sys.sysprocesses
Where spid > 50
            And dbid=DB_ID (‘StuckDB’))  -- replace with your database name

View 8 Replies View Related

SQL 2000 Test Server Database Recovery Bombed

Feb 3, 2008

I am a SQL lightweight and I tried to update the data on the test SQL server with the data on the production server and now the test SQL server won't start.

I was trying to move a sql database from our production server to our test server and things got mucked up. I think where I went wrong is that I tried to backup the database on the Production server and then restore it to the test server. I think I should have backup the production server and then detached the databases from the test server and then attached the backups. I got in a hurry and had an attitude that SQL is so good that if I mess up, I can recover.

These are the databases I recovered to test server:

Builder
CSales
CIB
Master
Model
MSDBdata

Now SQL server won€™t start and I get the error message that the database Model is in the middle of being restored. We are on SQL 2000. I tried to start from a command line with the €“f switch and it still can€™t come up.

Should I reinstall SQL and then attach the databases?

Do I need to bring over the Master, Model and MSDBdata data bases from the production servers.

View 7 Replies View Related

EXECUTE Permission Denied On Object 'Test', Database 'DI', Owner 'dbo'

Jun 8, 2005

hi,I use DataGrid in name UserTable.I use this code:
SqlCon.Open()
UserTable.DataSource = SqlCom.ExecuteReader(System.Data.CommandBehavior.CloseConnection)
UserTable.DataBind()and i get this error: EXECUTE permission denied on object 'Test', database 'DI', owner 'dbo'I craete stored prcedure in name Test with the simple SQL code:CREATE PROCEDURE [dbo].[Test] ASselect Users.*from UsersGOIf instead i put the SQL code : select Users.*    from Usersin my command as a text i get the error : SELECT permission denied on object 'Users', database 'DI', owner 'dbo'i have already create a local premmision for my DB & tables as MYMACHINE/ASPNETHow i can solve this problem?Thanks, Moshe

View 2 Replies View Related

SQL 2012 :: Creating Test DB From A Full Backup Of Production Database

Jul 23, 2014

I am attempting to create a Test db from a full backup of the production db. With 2012, I cannot do it the the way i had done it in previous versions (and now i understand why because of Logical names).

The Test db runs in the same instance as Prod db.

I attempted to run this but come up with errors. This is what i executed:

RESTORE DATABASE TEST FROM DISK = 'E:<path>FULL.BAK'
WITH REPLACE, RECOVERY,
MOVE 'PROD' TO 'E:<path>TEST.MDF';

The errors are all cannot execute due to PROD is in use.

View 9 Replies View Related

SQL Server Test Database To SQL Server Production Database -- Data Migration

Feb 25, 2006

Hi,

Is there any tool available to migrate the data from the SQL Server test database to SQL Server production database. Data Migration should be based on a condition which can be given as an input for a table by the user. The dependant tables also should be migrated based on the given condition. i.e data subsetting based on the matching conditions.

Ex : Salary > 2000

The rows of the table which matches the condition alone need to be migrated for the corresponding table. Also its dependant table's rows should be migrated based on the given condition. Please help me with a tool which can automate this.

Thanks,
MiraJ

View 4 Replies View Related

SQL Server Admin 2014 :: How To Set A Database To Suspect Mode For Practical Test HA

Jan 14, 2015

I Want to test for Automatic switch between primary and secondary.

How do i do it ?
or
I need this for some purpose : How to set suspect mode for a database ?

View 1 Replies View Related

Database Mail Sends Test Mails Successfully, But Sp_send_dbmail Fails

Apr 15, 2008



Hi all,

I am having a few problems with Database Mail and wondered if anyone could assist. It sends test mails fine, but when I run the following script:

(I've changed my email address in this post to test@test.com they are accurate in the scripts.)


EXEC msdb.dbo.sp_send_dbmail

@profile_name = 'Test Mail',

@recipients = 'test@test.com',

@body = 'Sent by sp_send_dbmail',

@Subject = 'SQL Server Email Test Email';


It gives the following errors.

(from the above script)


mailitem_id = 16
profile_id = 2
recipients = test@test.com
copy_recipients = NULL
blind_copy_recipients = NULL
subject = SQL Server Email Test Email
body = Sent by sp_send_dbmail
body_format = TEXT
importance = NORMAL
sensitivity = NORMAL
file_attachments = NULL
attachment_encoding = MIME
query = NULL
execute_query_database = NULL
attach_query_result_as_file = 0
query_result_header = 1
query_result_width = 256
query_result_separator =
exclude_query_output = 0
append_query_error = 0
send_request_date = 2008-04-15 10:50:03.827
send_request_user = COMPANYTest.Test
sent_account_id = NULL
sent_status = failed
sent_date = 2008-04-15 10:50:04.000
last_mod_date = 2008-04-15 10:50:04.513
last_mod_user = sa


(from the test mail)


mailitem_id = 11
profile_id = 2
recipients = test@test.com
copy_recipients = NULL
blind_copy_recipients = NULL
subject = Database Mail Test
body = This is a test e-mail sent from Database Mail on UKDEVSQL1
body_format = TEXT
importance = NORMAL
sensitivity = NORMAL
file_attachments = NULL
attachment_encoding = MIME
query = NULL
execute_query_database = NULL
attach_query_result_as_file = 0
query_result_header = 1
query_result_width = 256
query_result_separator =
exclude_query_output = 0
append_query_error = 0
send_request_date = 2008-04-15 09:51:46.530
send_request_user = COMPANYTest.Test
sent_account_id = 4
sent_status = sent
sent_date = 2008-04-15 09:51:46.000
last_mod_date = 2008-04-15 09:51:46.610
last_mod_user = sa


sysmail_event_log gives this error for mail item 16 (the scripted email):

The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 4 (2008-04-15T10:11:41). Exception Message: Cannot send mails to mail server. (Mailbox unavailable. The server response was: 5.7.1 Requested action not taken: message refused). )

View 2 Replies View Related

Built Database With SQL Server Management Studio Express, How Can I Quikly Add Test Data?

Apr 13, 2006

I've built my SQL Server Express database with SQL Serevr Management Studio Express, and now I want to enter some seed data to assist in building tha app around it. I cannot find an option to manage the data in SQL SMSX, like I used to with Enterprise Manager.
I don't want to have to write an app just to get test data in. Seems like this should be a common need. Am I missing something obvious here? Can't find any reference to this in a search of the forums.
Please help.
 

View 1 Replies View Related

SQL 2012 :: Database Mail - Test Email Works But Jobs Won't Send Out Notifications

Oct 19, 2015

I am trying to send out notifications when jobs complete (fail or succeed). I have database mail working fine on my DEV server, but I am having issues with it on my PROD server. I am currently having people look into if McAfee may be blocking it.

I am able to send out a test email from SSMS>Management>Database Mail, but when I set a Notification for a job, the job will complete and in the history, it will say "NOTE: Failed to notify 'User' via email."

I have created an Operator and set up Profiles and Accounts, just as I did on my DEV server.

View 2 Replies View Related







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