Showing posts with label connection. Show all posts
Showing posts with label connection. Show all posts

Sunday, March 25, 2012

Basic Connection String

Could someone please show me a basic connection string, please?Tryhttp://www.connectionstrings.com as a resource.|||

I did, it can't connect.

|||We need your code and the exact error information in order to provide any meaningful assistance.|||

Ok, I've figured out the problem. I need a username and password. How would I find that?

|||You need a username and password if you are using SQL Authentication (typical when your database is hosted remotely); they are not needed if you are using Windows Authentication (typical when your database is on your network).

The system administrator should be able to provide you the required username and password credentials for SQL Authentication.|||

Thanks I got it to work.

Basic Connection

Ok. Basically I do not know how to access any database files from the SQL Server. Can someone help me please. How do I access the files from another computer.Hi,
did u give the login permissions to ur other computer?wat i mean is on the sql server-->Security-->Logins(right click)New Logins n then just write the login name of ur other computer and give urself rights to access all the files in the sql server....is it of some help?
Regards.|||Well right now I am at work, but I will try that when I get home. But basically, I do not even know how to upload files to my SQL Server. Your help is greatly appreciated.|||Hi,
you can easily upload files using the import/export wizard in sql server...and it can be done either on the system database i.e. usually master database or you can create a new database by right click on the system database-->new database and lets say we name it as Nov and in this database or any other u do right click in the options there is one option TASKS>import files or export files...somethin like that...n then an import export wizard will come and then just follow the steps n check if you want to upload from a file or from oracle database or anywhere...you can easily upload stuff...
i hope its helpful...since i m also new to sql server..i just started it some months back...
Regards.|||No. Stop it. You've been a great help.

Tuesday, March 20, 2012

Bandwidth Required For ODBC Access

Hi,
I need to setup an ODBC link over our Internet connection between MS Access
(local) and a mysql server (Remote - the local PC has the mysql ODBC driver
installed). What kind of bandwidth requirements am I looking at? Will it
function over a 64k leased line? If this would be slow, could there be any
major impact on other uses such as web and email?
Regards,
DominicIn message <c08fh8$fmc$1$8300dec7@.news.demon.co.uk>, Dominic Martin
<dominic.martin@.dplm.co.uk> writes
>Hi,
>I need to setup an ODBC link over our Internet connection between MS Access
>(local) and a mysql server (Remote - the local PC has the mysql ODBC driver
>installed). What kind of bandwidth requirements am I looking at? Will it
>function over a 64k leased line? If this would be slow, could there be any
>major impact on other uses such as web and email?
It's certainly feasible to run an ODBC connection over a 64k link, and I
have done so. You haven't really given enough information to answer the
question. You need to know how many data requests will be issued and how
much data will have to be retrieved for each request.
You may need to consider the time distribution of the requests, will
they all occur at the same time? How long are the users willing to wait
for their data? What else will be using the line at the same time? Will
those users be prepared to wait for their data?
Bernard Peek
London, UK. DBA, Manager, Trainer & Author. Will work for money.|||"Bernard Peek" <bap@.shrdlu.com> wrote in message
> It's certainly feasible to run an ODBC connection over a 64k link, and I
> have done so. You haven't really given enough information to answer the
> question. You need to know how many data requests will be issued and how
> much data will have to be retrieved for each request.
> You may need to consider the time distribution of the requests, will
> they all occur at the same time? How long are the users willing to wait
> for their data? What else will be using the line at the same time? Will
> those users be prepared to wait for their data?
>
Thank you for your response. The ODBC access will supplement web based
access, where the web server will be on the same local network as the MySQL
server. The web access will be used mostly for simple queries. The ODBC
access is to be used for more complex ad-hoc queries. So in answer to your
questions, only one person is ever likely to access the mysql database via
ODBC at a time. The reports do not need to be done instantly, so time is not
too much of a worry.
I'm assuming that these are all good answers. What number of users and level
of data did you pass over the 64k link?
Dominic

> Bernard Peek
> London, UK. DBA, Manager, Trainer & Author. Will work for money.
>|||In message <c08skf$b2a$1$8300dec7@.news.demon.co.uk>, Dominic Martin
<dominic.martin@.dplm.co.uk> writes
>"Bernard Peek" <bap@.shrdlu.com> wrote in message
>Thank you for your response. The ODBC access will supplement web based
>access, where the web server will be on the same local network as the MySQL
>server. The web access will be used mostly for simple queries. The ODBC
>access is to be used for more complex ad-hoc queries. So in answer to your
>questions, only one person is ever likely to access the mysql database via
>ODBC at a time. The reports do not need to be done instantly, so time is no
t
>too much of a worry.
>I'm assuming that these are all good answers. What number of users and leve
l
>of data did you pass over the 64k link?
You can work out the data capacity of the link by looking at the
structure of the tables returned and the number of records retrieved.
The number of users isn't important, just the amount of data they use.
That's very difficult to predict with ad hoc reports. Either the person
creating the reports needs to understand the bandwidth they have
available or you have to find a way of saving bandwidth. Have you
considered replicating the mysql database to a local server?
Bernard Peek
London, UK. DBA, Manager, Trainer & Author. Will work for money.|||I have done some work on a database using ODBC over a 64K leased line. The
people paying the bills thought it was "acceptable", but the actual users
thought it abominable. The users didn't find it acceptable until the lines
(one each to three separate user locations) were upgraded from 64KB to T-1
(which is about 1.5MB, as I recall).
A better-written application would have performed better, but the same
people paying the bills wouldn't pay for some obvious improvements, such as
opening the main/first form on a single record rather than on an entire
15,000 record table. But only parts of the app were so poorly
designed/implemented.
Larry Linson
Microsoft Access MVP|||I have done so over ADSL lines (128k upload).
Adhoc queries that returned resonable amounts of data felt OK to me. The
important point is to send the query to the server and have it do the grunt
work - avoiding queries where raw data is returned to Access while it does
the grunt work. However the typical Access form performed substantially
worst - edge of usability.
When you try going long distances or overseas (large latency in the
internet - distance being defined as #routers, hops etc. as opposed to miles
per-se) then things become very bad, because by default Access does not take
care to minimize the amount of round-tripping. So the time is multiple
latency plus data transfer.
"Dominic Martin" <dominic.martin@.dplm.co.uk> wrote in message
news:c08fh8$fmc$1$8300dec7@.news.demon.co.uk...
> Hi,
> I need to setup an ODBC link over our Internet connection between MS
Access
> (local) and a mysql server (Remote - the local PC has the mysql ODBC
driver
> installed). What kind of bandwidth requirements am I looking at? Will it
> function over a 64k leased line? If this would be slow, could there be any
> major impact on other uses such as web and email?
> Regards,
> Dominic
>|||"Bernard Peek" <bap@.shrdlu.com> wrote in message
news:I2QLbrERt$JAFwgF@.shrdlu.com...
> In message <c08skf$b2a$1$8300dec7@.news.demon.co.uk>, Dominic Martin
> <dominic.martin@.dplm.co.uk> writes
I
how
MySQL
your
via
not
level
> You can work out the data capacity of the link by looking at the
> structure of the tables returned and the number of records retrieved.
> The number of users isn't important, just the amount of data they use.
> That's very difficult to predict with ad hoc reports. Either the person
> creating the reports needs to understand the bandwidth they have
> available or you have to find a way of saving bandwidth. Have you
> considered replicating the mysql database to a local server?
>
Yes, but the mysql server is a hosted solution, so we're limited in the ways
that we can get hold of the data. It's either CSV copies of the tables or
the ODBC read only link to the live data. Apart from setting up a SQL server
locally, I'm not sure what else we would need to do. Are you suggesting that
the local SQL server would use ODBC just to make straight copies of the data
or that we would have to download and manually import the CSV files? Under
the latter, it is more likely that we would just import the CSV files
directly into MS Access.
When you say you can work out the data capacity of the link, is there a
rough formula that can be applied. i.e. a certain number of records from a
certain number of tables would require x amount of bandwidth?
Thank you for your continuing help.
Dominic

> --
> Bernard Peek
> London, UK. DBA, Manager, Trainer & Author. Will work for money.
>|||"User" <User@.aol.com> wrote in message
news:OWEP6Y57DHA.2656@.TK2MSFTNGP11.phx.gbl...
> I have done so over ADSL lines (128k upload).
> Adhoc queries that returned resonable amounts of data felt OK to me. The
> important point is to send the query to the server and have it do the
grunt
> work - avoiding queries where raw data is returned to Access while it does
> the grunt work. However the typical Access form performed substantially
> worst - edge of usability.
Thank you for your comments. How do you ensure that the query is sent to the
server to do the work and not have the raw data returned to Access? Is it
something that you have to build into the query?
Dominic

> When you try going long distances or overseas (large latency in the
> internet - distance being defined as #routers, hops etc. as opposed to
miles
> per-se) then things become very bad, because by default Access does not
take
> care to minimize the amount of round-tripping. So the time is multiple
> latency plus data transfer.
>
> "Dominic Martin" <dominic.martin@.dplm.co.uk> wrote in message
> news:c08fh8$fmc$1$8300dec7@.news.demon.co.uk...
> Access
> driver
any
>|||In message <c0a2mq$onm$1$8300dec7@.news.demon.co.uk>, Dominic Martin
<dominic.martin@.dplm.co.uk> writes

>Yes, but the mysql server is a hosted solution, so we're limited in the way
s
>that we can get hold of the data. It's either CSV copies of the tables or
>the ODBC read only link to the live data. Apart from setting up a SQL serve
r
>locally, I'm not sure what else we would need to do. Are you suggesting tha
t
>the local SQL server would use ODBC just to make straight copies of the dat
a
>or that we would have to download and manually import the CSV files? Under
>the latter, it is more likely that we would just import the CSV files
>directly into MS Access.
MySQL supports replication, so that any changes to a master database are
automatically copied to a slave database. You would keep the master
database on the server and run all of your queries against the slave
kept on your own site. You need to talk to your hosting provider about
that, they may have other customers doing the same thing.
If your data changes slowly it may be OK to copy the data to CVS files
once per day and to copy them when the 64k bandwidth isn't being used
for anything else, perhaps overnight. That way you could run queries
against a database that is less than 24 hours old and not need to use
bandwidth during the day.

>When you say you can work out the data capacity of the link, is there a
>rough formula that can be applied. i.e. a certain number of records from a
>certain number of tables would require x amount of bandwidth?
The amount of data to transfer depends on the size of the records. List
the fields in each table and determine the number of bytes required for
each of them. Multiply that by the number of records retrieved. Decide
how long it will take to transfer that data over a 64Kbit (8Kbyte) per
second link. Take account of other people using the same link for other
purposes.
Bernard Peek
London, UK. DBA, Manager, Trainer & Author. Will work for money.

Bandwidth betwee Synchronous connection

I am looking into the different options for redunancy between locations. We
currently have a 6mb P2P between the locations. Which would be better
Database mirroring or Database replication?
Mirroring means that your "subscriber/destination database/mirror" is
inaccessible. Replication means that the subscriber database is accessible
and that you can select which tables you want to replicate.
It really depends on what you are trying to do.
http://www.zetainteractive.com - Shift Happens!
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Cindy" <Cindy@.discussions.microsoft.com> wrote in message
news:4A02CE96-43A5-4296-9A79-98DF75684C44@.microsoft.com...
>I am looking into the different options for redunancy between locations.
>We
> currently have a 6mb P2P between the locations. Which would be better
> Database mirroring or Database replication?
|||Our situation
Moved Database server to CoLo for Business Continuity. Main database will
reside on SAN. SLO requires offsite storage of backups and monthly copies
offsite.
I am looking for a live backup of the database incase of hardware failure on
SQL server or SAN. I am also looking at managing backup to tape at Corporate
Office where Mirror/Replication server will reside.
What are your suggestions?
"Hilary Cotter" wrote:

> Mirroring means that your "subscriber/destination database/mirror" is
> inaccessible. Replication means that the subscriber database is accessible
> and that you can select which tables you want to replicate.
> It really depends on what you are trying to do.
> --
> http://www.zetainteractive.com - Shift Happens!
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Cindy" <Cindy@.discussions.microsoft.com> wrote in message
> news:4A02CE96-43A5-4296-9A79-98DF75684C44@.microsoft.com...
>
>

Sunday, March 11, 2012

Bad Connection

I am getting the following error when I attempt to connect to SqlServer with the following connection string from my Web.config file:

<add name="LeanPathConnection" connectionString="Data Source=(local);Initial Catalog=VWOA1.DB;User Id=LeanPath;Password=jesus" />

I have made LeanPath a user at the Security level of the server. His default database is VWOA1.DB. I have given him db_owner rights. The following contains the exception detail I get. I don't see how he could NOT have a trusted SQL Server connection!!!!!!

System.Data.SqlClient.SqlException was unhandled by user code
Message="Login failed for user 'LeanPath'. The user is not associated with a trusted SQL Server connection."
Source=".Net SqlClient Data Provider"
ErrorCode=-2146232060
Class=14
LineNumber=65536
Number=18452
Procedure=""
Server="localhost"
State=1
StackTrace:
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at DbConnection.Open() in c:\Documents and Settings\sarogers\My Documents\Visual Studio 2005\Projects\VWOA\LRS\App_Code\DbConnection.cs:line 21
at MyBase.Execute() in c:\Documents and Settings\sarogers\My Documents\Visual Studio 2005\Projects\VWOA\LRS\App_Code\DbStoredProc.cs:line 63
at MyReturn.RetValParamInt(String ParamName) in c:\Documents and Settings\sarogers\My Documents\Visual Studio 2005\Projects\VWOA\LRS\App_Code\DbStoredProc.cs:line 328
at DbStoredProc.PER_Validate(String LoginName, String Password) in c:\Documents and Settings\sarogers\My Documents\Visual Studio 2005\Projects\VWOA\LRS\App_Code\DbStoredProc.cs:line 1215
at Login.btnLogin_Click(Object sender, EventArgs e) in c:\Documents and Settings\sarogers\My Documents\Visual Studio 2005\Projects\VWOA\LRS\Login.aspx.cs:line 43
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Hi,

you only have Windows Authentication enabled at your server, therefore the SQL Server tries to logon the user with WIndows Authentication. I guess that the LeanUser is a SQL Server User right ? Therefore you will have to use and enable SQL Server authentication first. See my Screencast on my site for more information how to switch from Windows Auth. to Mixed Auth. (SQL Server & Windows Auth).

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

Friday, February 10, 2012

Backup to Location over VPN

Hi,
I am having problems with creating a backup onto a machine that is connected to the domain via a VPN connection.
When i do the back up it does not recognize the directory that I have specified, yet when i use Windows explorer I can copy and paste to my hearts content.
I was just wondering if the backup of a database can be done to a location over a VPN.
Thanks in Advance
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.
Backups are done under the account that SQL Server runs under, not the
account you are using when you log in to QA or EM. SQL Server is most
likely running under the local service account which knows nothing of the
VPN or the Domain.
Andrew J. Kelly SQL MVP
"SqlJunkies User" <User@.-NOSPAM-SqlJunkies.com> wrote in message
news:uhIiucxbEHA.252@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I am having problems with creating a backup onto a machine that is
connected to the domain via a VPN connection.
> When i do the back up it does not recognize the directory that I have
specified, yet when i use Windows explorer I can copy and paste to my hearts
content.
> I was just wondering if the backup of a database can be done to a location
over a VPN.
> Thanks in Advance
> --
> Posted using Wimdows.net NntpNews Component -
> Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine
supports Post Alerts, Ratings, and Searching.

Backup to Location over VPN

Hi,
I am having problems with creating a backup onto a machine that is connected
to the domain via a VPN connection.
When i do the back up it does not recognize the directory that I have specif
ied, yet when i use Windows explorer I can copy and paste to my hearts conte
nt.
I was just wondering if the backup of a database can be done to a location o
ver a VPN.
Thanks in Advance
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine sup
ports Post Alerts, Ratings, and Searching.Backups are done under the account that SQL Server runs under, not the
account you are using when you log in to QA or EM. SQL Server is most
likely running under the local service account which knows nothing of the
VPN or the Domain.
Andrew J. Kelly SQL MVP
"SqlJunkies User" <User@.-NOSPAM-SqlJunkies.com> wrote in message
news:uhIiucxbEHA.252@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I am having problems with creating a backup onto a machine that is
connected to the domain via a VPN connection.
> When i do the back up it does not recognize the directory that I have
specified, yet when i use Windows explorer I can copy and paste to my hearts
content.
> I was just wondering if the backup of a database can be done to a location
over a VPN.
> Thanks in Advance
> --
> Posted using Wimdows.net NntpNews Component -
> Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine
supports Post Alerts, Ratings, and Searching.