Determining A MySQL Servers Status.

Jul 20, 2005

I am using vb.net and the myoledb provider.



I've run into a problem where what I need to do is open a database
connection to a mysql server, easy. The problem arrises in that I want
to, if the server cannot be found, open from a locally stored
encrypted XML file.



Works fine when the sever is present, but when I go to open the
connection and the database cannot be found, a dialog box pops up as to
fill in the connection string information. I do not want this, is there
any way I can intercept this dialog or skip past it so my try/catch
handles it?



Thanks.


--
Posted via http://dbforums.com

View 2 Replies


ADVERTISEMENT

Mysql On Different Servers

Jul 20, 2005

Is it possible to connect to different databases on different serversso i can merge them as one.I heard there is a tool that does this but still to come accross itany help appreciated.

View 1 Replies View Related

SQL Server 2008 :: Check DB Mail Status On All Servers

Apr 23, 2015

i have 70 SQL database servers and i setup DB Mail on the 70 Servers, i want to know is there a way to find the status of all the jobs which i assigned the DB Mail and if its working/failing... is there a script i can run on powershell or SQL to find out that information

View 1 Replies View Related

MS SQL Linked Servers(Linking MySQL To MS SQL) Collation Problem.

Jun 21, 2007

Hello,I have a problem. I've linked MySql server to MsSql, in MySql I have atable with Latvian data(character set is ucs2, ucs2_general_ci) andthe problem is that when I use openquery to read data from MySQLserver, some characters are not translated correctly! I receivequestion symbols instead of Latvian special characters.Maybe someone had this kind of problem with collation?

View 2 Replies View Related

Catastrophic Failure, MSDASQL, Linked Servers And MySQL

Jun 21, 2007

When executing a query which joins against a large resultset from a linked server, SQL Server reports the following error:
Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "MSDASQL" for linked server "foo" reported an error. The provider reported an unexpected catastrophic failure.
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "foo".

This is using SQL Server 2005 with SP2, and MyODBC version 3.51.16 (although previous versions also seem to have the same behavior).

Once the error occurs any subsequent query against the linked server (even something as simple as select top 3 * From foo...users) fails with the same error message. Queries using the OpenQuery syntax also fail with this error.

I've tried to determine if there are some error logs that might give me more insight into what's going on, but the above events don't seem to log to the ODBC trace logs. And I can't seem to figure out a way to trace the MSDASQL (i.e., oledb) events.

I initially thought there might be a problem with the MySQL myODBC driver, but the ODBC layer itself does not seem to have a problem. But the following steps indicate otherwise:
1. Create a new Linked Server to MySQL. Same error as above
2. Execute a query against the ODBC DSN directly, using a shell program. This works fine

I'm trying to clearly identify if the problem is with the MySQL driver or with the MSDASQL provider. It would appear that the latter is at fault, given the error message, and the lack of any ODBC logging.

Would anyone have any insights about what might be going on here, and if there is any possible resolution?

View 3 Replies View Related

DB Engine :: Agent Jobs Status For Multiple Servers Using Powershell?

Oct 14, 2014

I am following website link:

[URL]

I require to gather status details about all the SQL Agent jobs in the environment on multiple SQL Servers.

I tried to edit the script using:

[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO")
$sqlServerName = 'localhostdeveloper'
 $sqlServer = New-Object Microsoft.SqlServer.Management.Smo.Server($sqlServerName)
 foreach($job in $sqlServer.JobServer.Jobs)
{
$job | select Name, OwnerLoginName, IsEnabled, LastRunDate, LastRunOutcome, DateCReated, DateLastModified
}

but SQL Agent jobs are not reflecting in the mail output...

View 11 Replies View Related

Linked Server To MYSQL Using OLEDB Provider For MYSQL Cherry

Feb 12, 2007

Good Morning

Has anyone successfully used cherry's oledb provider for MYSQL to create a linked server from MS SQLserver 2005 to a Linux red hat platform running MYSQL.

I can not get it to work.

I've created a UDL which tests fine. it looks like this

[oledb]

; Everything after this line is an OLE DB initstring

Provider=OleMySql.MySqlSource.1;Persist Security Info=False;User ID=testuser;

Data Source=databridge;Location="";Mode=Read;Trace="""""""""""""""""""""""""""""";

Initial Catalog=riverford_rhdx_20060822

Can any on help me convert this to corrrect syntax for sql stored procedure

sp_addlinkedserver



I've tried this below but it does not work I just get an error saying it can not create an instance of OleMySql.MySqlSource.

I used SQL server management studio to create the linked server then just scripted this out below.

I seem to be missing the user ID, but don't know where to put it in.

EXEC master.dbo.sp_addlinkedserver @server = N'DATABRIDGE_OLEDB', @srvproduct=N'mysql', @provider=N'OleMySql.MySqlSource', @datasrc=N'databridge', @catalog=N'riverford_rhdx_20060822'

GO

EXEC master.dbo.sp_serveroption @server=N'DATABRIDGE_OLEDB', @optname=N'collation compatible', @optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @server=N'DATABRIDGE_OLEDB', @optname=N'data access', @optvalue=N'true'

GO

EXEC master.dbo.sp_serveroption @server=N'DATABRIDGE_OLEDB', @optname=N'dist', @optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @server=N'DATABRIDGE_OLEDB', @optname=N'pub', @optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @server=N'DATABRIDGE_OLEDB', @optname=N'rpc', @optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @server=N'DATABRIDGE_OLEDB', @optname=N'rpc out', @optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @server=N'DATABRIDGE_OLEDB', @optname=N'sub', @optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @server=N'DATABRIDGE_OLEDB', @optname=N'connect timeout', @optvalue=N'0'

GO

EXEC master.dbo.sp_serveroption @server=N'DATABRIDGE_OLEDB', @optname=N'collation name', @optvalue=null

GO

EXEC master.dbo.sp_serveroption @server=N'DATABRIDGE_OLEDB', @optname=N'lazy schema validation', @optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @server=N'DATABRIDGE_OLEDB', @optname=N'query timeout', @optvalue=N'0'

GO

EXEC master.dbo.sp_serveroption @server=N'DATABRIDGE_OLEDB', @optname=N'use remote collation', @optvalue=N'false'



Many Thanks



David Hills



View 7 Replies View Related

Equivalent To MySQL's Password() Function? (was MySQL To SQL Server And Password())

Mar 3, 2005

I have an internal Project Management and Scheduling app that I wrote internally for my company. It was written to use MySQL running on a Debian server, but I am going to move it to SQL Server 2000 and integrate it with our Accounting software. The part I am having trouble with is the user login portion. I previously used this:


PHP Code:




 $sql = "SELECT * FROM users WHERE username = "$username" AND user_password = password("$password")"; 






Apparently the password() function is not available when accessing SQL Server via ODBC. Is there an equivalent function I could use isntead so the passwords arent plaintext in the database? I only have 15 people using the system so a blank pwd reset wouldn't be too much trouble.

View 7 Replies View Related

Determining If A Server Is 32 Bit Vs 64

Jun 11, 2007



Is there a quick and easy way to figure out if a server is 64 bit or 32 bit? I have been looking and cannot figure out an easy way. If there is a script that will figure it out could you please tell me. I am a DBA and manage over 100 servers and need a fast and easy way to figure this out. I need to know this to pick the correct upgrade version.

-Kyle

View 1 Replies View Related

Determining If A Server Is 32 Bit Vs 64

Jun 11, 2007

Is there a quick and easy way to figure out if a server is 64 bit or 32 bit? I have been looking and cannot figure out an easy way. If there is a script that will figure it out could you please tell me. I am a DBA and manage over 100 servers and need a fast and easy way to figure this out.

-Kyle

View 4 Replies View Related

Sql Report Works Fine On Internal Servers - Hosed On External Servers - Need Some Help

Nov 21, 2007

I have a report that was designed using SQL Reporting Services that sits on a SQL reporting server. It's nothing too exciting, it is essentially a three page application with legal jumbo on pages 2 and 3 and applicant data in fields on page 1.

We use rectangles to force page breaks to page 2 and to page 3.

When running the report on the report server, it shows and prints fine.

When running the report from the QA website internally, it shows and prints just fine.

When running the report from the production website from a machine internally, it shows and prints just fine.

When running the report from outside of the company network, the report is jacked. It obliterates large chunks of text, crams text together, and creates blank pages.

I need help in determining where I even begin with trouble shooting this!

View 1 Replies View Related

Determining What To Input As Server

Jun 9, 2006

I'm trying to connect to a sql database, but I don't know what myserver is in the following code.Dim strConn As String = "server=myserver;database=Northwind"I can't get the code to link up with my Northwind database.I'm running everything locally if that helps.Thanks!Jon

View 2 Replies View Related

Determining Database Size

Oct 31, 2001

Is there a system stored procedure that I can execute that will return the actual size of the database you are working with? Any information is appreciated.

View 1 Replies View Related

Determining If A Table Exists

May 2, 2000

How do I find out if a temporary table named '##test' exists? I have a stored
procedure that creates this table and if it exists another stored procedure
should do one thing, if it does not exist I want the SP to do something else.
Any help as to how I can determine if this table exists at the current time
would be greatly appreciated.

Thanks in advance for you help,
Jon

View 6 Replies View Related

Determining DB Type/Character Set

Feb 26, 2002

Can anyone tell me what command/utility i can use to determine the database type (non-unicode or unicode) as well as the supported character set?
Any help will be greatly appreciated. Thanks a lot!!

View 1 Replies View Related

Determining Last DBCC Procedure

Mar 7, 1999

Hi,
Is it possible to determine when last a DBCC statement was run on a database & what that DBCC was.

TIA
Shaun Tinline
Database Administrator
Alcatel Altech Telecoms

View 1 Replies View Related

Determining Unique Children

Nov 17, 2005

Hi,

I need to be able to identify if a parent has the same child names as another parent.

Have a look at my data (in pic)

Can you think of a SELECT that will count for each parent, the number of other parents including themselves with all the same children's names?

So you would get something like:

Bob | 2
Bill | 1
Glen | 2

thanks,
david.

View 7 Replies View Related

Determining Database Size

May 9, 2008

Forgive the easy question but I'm afraid it might be also a trick question and I'd like to hear the experts' opinion. I am using SQL Server 2005 Express edition and I know the limitation is 4GB per database. So far none of my users is anywhere near the limit but I have to be prepared for when that day finally comes. As it stands, they use a single database through a program so I have full control over it. There are no fancy backup programs on the system so no fancy recovery models and automatic shrinking can be done - data is only inserted in that database.

My question is simply how can I determine programmatically (I use ADO.Net but it can execute SQL commands just fine) the size of the database as it relates to the limitation? That is, I don't know whether it is the amount of data stored - with or without overhead, or it is simply the size of the *.mdf file (maybe together with the *.ldf file), or whether the 4GB is 4 billion bytes or 2^32 bytes - I just want the same method that the SQL Server is using so that, for example, I can bring up a warning at 90% full and lock out the user at 99% full.

I'd appreciate any insights.

Kamen

View 3 Replies View Related

Determining A Range Of Values

Mar 29, 2012

suppose you have a large table with 2 columns

create table tick
(
ID bigint identity (1,1) primary key not null
, price money not null
)

and I want to know 3 things

Starting with ID = 1 through ID = (last)
give me the low and high price (that satisfies the below WHERE clause), and the last ID
WHERE high price - low price = 0.10
and the last ID (last) is the minimum ID to satisfy: high price - low price = 0.10

So the last ID will coincide with the record containing either the low or high price, the problem is you don't know which record in that range has the corresponding high/low price, it could be the first record or the 10,000th record.

I am thinking I need to create two summary tables, maybe calculate the min(ID) that goes down 0.01 then the min(ID) that goes down 0.02, etc...
Then calculate the min(ID) that goes up 0.01 then up 0.02, etc..finally join against these two summary tables to figure out which combination of downSummary and upSummary have a difference of 0.10.

View 2 Replies View Related

Determining If SQL Statement Is A Query

Jul 27, 2007

Hi,

I have a C# server application which clients can send arbitrary SQL statements to. These can be absolutely anything - creating tables/views, selecting from tables/views, inserts, updates, deletes, you name it.

There are two return parameters from the server method which executes the SQL - a results set containing the data, and a count of the rows that were updated - (either one or the other should be populated depending on the type of command sent to it). To deal with this, what I planned on doing was (pseudocode follows..):

try
{
reader = OpenReaderCursor(statement)
}
catch
{
updatedCount = ExecuteNonQueryCommand(statement)
}

Unfortunately this doesn't really work, as OpenReaderCursor is able to execute Non Queries (eg. UPDATE/INSERT/DELETEs etc) but doesn't give me a row count, and trying the other way round, ExecuteNonQueryCommand is happy to execute SELECT statements, but I can't then of course return a results set as I don't have access to it.

My question then, if you will excuse the waffle above, is "Is there a simple way of determining if a string containing an SQL statement is a query?" - or will I have to come up with some way of dealing with this in my application code?

Please don't slate the design (ideally I would have two methods on the server, one for queries which returns results and the other for nonqueries which returns an updatecount) but there's nothing I can do, this is how it must be done (the interface was defined long long ago)

Thanks for your time, all ideas appreciated

Jim

View 1 Replies View Related

Determining What Columns Are All Null

Jul 6, 2006

Does anyone have a suggestion for how to efficiently determine what columns in a table are NULL for all rows? - Shean

View 5 Replies View Related

Determining Last Entry ID In Table

Nov 17, 2006

Not sure if this is the right place to post this but hopefully someone can help me. I would like to determine what the last automatically incremented ID is in a table I need to return it as a variable to a VB.NET program but I'm not sure what the SELECT statement would look like for this. Any help would be greatly appreciated.

View 4 Replies View Related

Determining Is A Database Is A Subscriber

Feb 1, 2006

Hi,



can anyone tell me if there is a way to determine with SMO or RMO if a database is a subscriber when using merge replication. If only have the Server and database at this point too!!

I want to provide a small app that creates a merge publication but only if the database isn't a subscriber.

Thanks for your help

Graham

View 3 Replies View Related

Determining Which Version Of SQL Is Running

Apr 12, 2007

hi peter... i have a question about, how i can see if my sql server is the version 2005 sp2 and, what is the diference with server and server agent... i've checked the updates and the machine says i have up to date... but i dont know witch is.

thank you for your help

View 1 Replies View Related

Determining The OS Version That SQL Is Running On

Apr 30, 2007

I am writing a client application that offers an UI that allows an administrator to remotely add/delete/update user accounts accross many different SQL Servers running on XP and up.



When the operating system is W2K3 or higher I want to take advantage of the "check_expiration, check_policy, must_change' arguments to create login and exclude those features when the host OS does not support them.



Is there an easy way to determine if those arguments are supported?



Thanks

Mark

View 5 Replies View Related

Development Servers, Auto-update Live Servers

Aug 21, 2001

can anyone tell me if they know of a way to automate the update process from development servers to live server, with little interference from an administrator

I have a development team that are constantly updating their databases along with their ASP code, and want to publish changes an a weekly basis. They have asked me for a way to take their new structures, tables, procedures etc, and copy them to the live servers, but NOT to interfere with existing customer data.

Funny I know – and I hate the idea btw :(

Any references, contacts, 3rd party tool recommendations welcome,

Thanx,

Darren

View 1 Replies View Related

Linking SQL 2005 Servers To SQL 2000 Servers Problems

Sep 27, 2007

I am in the middle of a major migraton project, moving from x86 SQL 2000 to IA64 SQL 2005. I have a business need to link to several legacy servers. I have a number of problems I am trying to solve.

1) Linking a Kerberos server to a non-Kerberos server.
2) Linking x64 or IA64 servers to x86 servers.
3) Linking SQL 2005 to SQL 2000.

Two of the errors I am encountering are:
------------------------------
TCP Provider: An existing connection was forcibly closed by the remote host.
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
OLE DB provider "SQLNCLI" for linked server "SCDC250DB" returned message "Communication link failure".
(Microsoft SQL Server, Error: 10054)
------------------------------
And
------------------------------
The OLE DB provider "SQLNCLI" for the linked server "SCDC250DB" reported an error. Authentication failed.
Cannot initialize the data source object of OLE DB provider "SQLNCLI" for linked server "SCDC250DB".
OLE DB provider "SQLCLI" for linked server "SCDC250DB" returned message "Invalid authorization specification".
(Microsoft SQL Server, Error: 7399)

If someone has worked through these problems before, I would appreciate it if you could direct me to the relevant documentation to resolve these issues.

Thanks!


Brandon Forest

Database Administrator

Data & Web Services Team

Sutter Connect Information Technologyforesb@sutterhealth.org

View 2 Replies View Related

Determining Null Values In Columns

Sep 7, 2004

How to find out that there is a null value in a column rather than a valid integer, DateTime or bool value, for strings I use 'as' operator to cast the column value and it returns null when column value is null, but for value types using 'as' operator causes compile error and using simple casting causes runtime error, for example:


int count = (int)row["Count"];

and

int count = row["Count"] as int;


the first one throws an exception when Count is null and the second doesn't compile at all since 'as' applies to reference types, so what is the way other than exception handling to determine null value in a column?

View 6 Replies View Related

Determining What Tables Do Not Have Primary Keys

Aug 14, 2001

Does anyone have a script that will roll through the tables in a database and identify tables without primary keys defined? I did not see any in the online script database.

Thanks,
Rick

View 1 Replies View Related

Determining Last Time A Table Was Updated (6.5, 7.0, 2k)

May 28, 2002

I am trying to find a global way of when the last time a row in one of my tables was updated or data inserted. I say global because I don't want to drill down through each table looking for modified rows.

I am a DBA of several hundred databases and want to retire those no longer being used.

Is there a column of a system table that has this info.

View 1 Replies View Related

Determining If A Local Variable Exists

Jun 11, 2007

Is there a way to determine if a local variable exists or not?

There's a parameter I often use in code called @guid_batch that is usually declared in the parameter of a stored proc, but when in debugging it would be nice to have it available without having to change code.

Is there something that I could do similar to the following


Code:


IF VARIABLE_ID('@guid_batch') IS NULL
BEGIN
DECLARE @guid_batch UNIQUEIDENTIFIER
SELECT @guid_batch = NEWID()
END



Thanks in advance,
-MBirchmeier

View 8 Replies View Related

Determining MDAC And Service Pack

May 14, 2004

I am new to MS SQL 2000 and have a couple of questions. First, how do you check the version of MDAC that Windows 2003 server is running and second, how do you determine what service pack that SQL is at.

I am having issues of extreme slowness using ODBC. I checked to see that tracing was not enabled and found that it wasn't. I am using TCP/IP for the connection.
Thanks

View 6 Replies View Related

SQL 2012 :: Determining Which Polygon Contains A Point

Nov 5, 2015

I have a table that contains spatial points and the name of the polygon they belong to (geography and varchar columns). I need to write a function to accept a point and determine which polygon contains that point. How can I write the query so that it will search through each polygon (derived from the geography points found in the table) and return the name of the polygon that contains that point?

View 2 Replies View Related







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