I need to transfer my database from one server to database on another server every 24 hours. I can create windows application but it will be cumbersome to write bulk of code . So can u suggest me some service or any other way through query or stored procedure or by job scheduling which can run every 24 hours and move my data from one database on one server to another sql database. Both database systems are sql server 2000 but servers are diffeerent so how to connect them while transferring dbs. ? Any help is appreciated.
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. this is the source error for this error An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) please any one can help me?
I want move data from informix to SQL server 7.0 every 10 seconds. I do not know what is the best way. It seems that I need create a DTS package and schdule the task from SQL server Agent, but can the task be schduled to reoccurred every 10 seconds?
I have to made a change and want to see it this is possible. The column IDPRT# is used here as MAX. THe user wants to exclude a few of the items which skews the average. Can i also select the IDPRT# a second time? and then in the CRystal reports I can select not =? but will this mess up the MAX line in any way?
SELECT "OEIND94"."IDDOCD" AS INV_DATE, "OEIND94"."IDORD#" AS ORD_NUM, "OEIND94"."IDORDT" AS ORD_TYPE, "OEIND94"."IDPRLC" AS PROD_FAMILY, "OEIND94"."IDPR$C" AS PRICE_CODE, "OEIND94"."IDCOM#", MAX("OEIND94"."IDPRT#") AS ITEM_REF, "ICPRT1"."IARCC4" AS PROD_TYPE,
My week starts on Monday rather than on Sunday which is default(US, English) in SQL Server and would like to change the same so I would get proper weeknumber and dayindex using DATEPART.
I am looking at different ways of setting DATEFIRST(SET DATEFIRST 1) in SQL Server 2005.
I could set in a stored procedure, but this isn't a feasible way for me because I am using .nettiers to generate by business objects and stored procedures. I need to alter the sp's everytime I newly generate the code and sp's.
I couldn't set it in a function which I was hoping initially. I understand this datefirst is stored in one of the sys table in MASTER DB and I couldn't find a straight forward way to change this.
Can anyone suggest me a way to set the DATEFIRST either at a database level or at a server level(probably by changing the sys table in MASTER DB).
I have I rather complex query and need to display a Sum in different ways. Now I'm wondering if the performance improves if you nest the queries in the described way. To me it looks, as if the sum just has to be calculated once?
select SUM(tiempo) as time_minutes, CONVERT(varchar(5), dateadd (minute,sum(tiempo),'1900-1-1 0:00'), 114) as time_hours, SUM(time)* 0.95 as time_discount from table
Select tiempo as time_minutes, CONVERT(varchar(5), dateadd (minute,tiempo,'1900-1-1 0:00'), 114) as time_hours, tiempo * 0.95 as time_discount From ( Select Sum(tiempo) as tiempo from table)a
I'm trying to simplify a SQL Stored Procedure.The query accepts an int, @ItemTypeID intI have the Query:SELECT ... FROM ItemList WHERE ItemTypeID = @ItemTypeIDor, if @ItemTypeID is 0,SELECT ... FROM ItemList Is there a way to do this query without doing:IF @ItemTypeID = 0BEGIN ...SELECT QUERY...ENDELSEBEGIN ...SELECT QUERY...END?
Hey - I am trying to create a procedure that will retrieve information from multiple SQL Servers. For example, I want to use a select statement on a systems table. Instead of running it from each server, I would rather run it from one and get info on all the servers. To do this, I know that i can 'link' a Server and then make select calls to that server. Some of the other administrators have expressed concern with this. Are there issues that I should research before linking servers. Is there a better way to do what I want to do? Any Input would be appreciated.
I need to know which are the best ways to connect to a remote SQL SERVER 2000 from inside a VB6 application. By remote I mean on a dedicated server outside my LAN that I can access by IP address.
Dear All, i've tried with indexed views, but because the view is referenceing another view, i was unable to create a clustered index on that view. so please let me know how can i improve the performance of the view.
thank you very much
Vinod Even you learn 1%, Learn it with 100% confidence.
Hi all, I am just wondering is there any other ways to execute an integration service package other than using sql server agent, dos command and manually execute the package in BIDS? I am thinking of running the package on web, is this possible? What I am trying to do is let user to run the integration service when they need to, so instead using SQL Server Management Studio to run the task being set in SQL Server Agent, I am thinking of something where user can log into a website (like the report server) and then run the integration, so that the data for the report server's reports are being update. Please help out if any know a solution to it. Thanks in advance.
Hello.I would like to learn all the possible ways that we can access and modify data in ASP .net 2.0 programmatically.for example one way would be like this: StringBuilder sql = new StringBuilder();sql.Append(" SELECT *"); //count the total number of recordssql.Append(" FROM dbo.tblJobTitle "); //get the connection string from web servicesstring strConnection = new sqlconnection.SQLConnection().GetSQLConnectString(sqlconnection.SQLDSN.SCIC);//Use the Microsoft.practices SqlDatabase object to execute our sql.SqlDatabase SqlHelper = new SqlDatabase(strConnection);SqlDataReader reader = (SqlDataReader)SqlHelper.ExecuteReader(CommandType.Text, sql.ToString());the i can loop through reader and get the data OR I can create a DataSet like this: SqlDatabase db = new SqlDatabase(strConnection); DbCommand dbCommand = db.GetSqlStringCommand(sql.ToString()); DataSet dst = db.ExecuteDataSet(dbCommand);I want to know if there is a comprehensive book explainaning all these possible ways to access and modify data using C# under ASP .net 2.0I really really apreciate this.Thank you very much.
I am learning the Optimizer from the book "Querying Microsoft SQL Server 2012" for certificate exam 70-461. I really cannot understand how it explains the number of possible ways to execute a query joining three tables. the pseudo-query is:
SELECT A.col5, SUM(C.col6) AS col6sum FROM TableA AS A INNER JOIN TableB AS B ON A.col1 = B.col1 INNER JOIN TableC AS C ON B.col2 = c.col2 WHERE A.col3 = constant 1 AND B.col4 = constant2 GROUP BY A.col5;
The book says:"Start with the FROM part. Which tables should SQL Server join first, TableA and TableB or TableB and TableC? And in each join, which of the two tables joined should be the left and which one the right table? The number of all possibilities is six, if the two joins are evaluated linearly, one after another."
Q1: How could it be six possibilities? From my understanding, lets say, if the SQL Server has to join A and B first, and then join C, in this case I can think of 4 possibilities, which are:
1. When A Join B, Left: A, Right: B. When Join C, Left: result of A join B, Right: C
2. When A Join B, nbsp; When Join C, nbsp;When A Join B, nbsp; When Join C, nbsp;When A Join B, nbsp; When Join C, "line-height:13.5px;">
Q2: The section following the previous question says there are 4 different types of join.."This already gives four options for each join. So far, there are 6 x 4 = 24 different options for only the FROM part of this query."
How can it be 6 x 4? My understanding is 4 is only for 1 join, but in our case, there are 2 joins, so it should be 6 x 4 x 4.
Hi guys , is there any ways/suggestions for strengthen up the security for SQL server 2005 ? Due to several attacks from unknown places to my database's server , so I would like to get a way for increase the SQL security. Hope able to gather some info from web as well. Thx a lot guys.
I have a table (F_POLICY_TRANSACTION).This table has a couple of million rows in it.I am using a column named POLICY_TRANSACTION_BKEY to select records to delete (approximately 750k using the code below)This column has a non-clustered index applied..This is the code I have used:
WHILE 1 = 1 BEGIN DELETE TOP(50000) FROM F_POLICY_TRANSACTION with (tablockx)
[code]....
Problem is, it takes around 10 minutes to run.Is there any way it can be made more efficient?I have tried varying the rowcount with no success
I have an application that creates a new database during installation,and I've noticed some strange behavior. Once I've created thedatabase, I am able to immediately create tables and populate lookupdata, provided I remain connected to the server. If, however, Idisconnect and attempt to reconnect immediately, I'll get an errorsaying that my login is invalid for the new database.I can get around this by having my code simply wait 5 seconds beforeattempting to reconnect, but I'm curious to see if anybody here cangive an explaination for why this is happening. Here is a bit ofpseudo code to explain what I'm seeing:open new connectioncreate databasecreate tablespopulate tablesclose connection// open new connection /* can't do this yet, as it would break */for (int a=0; a<5; a++){Thread.Sleep(2000)try{open new connectionbreak;}catch{Debug("still waiting...");}}Running my version of this code, I'll see that "still waiting..."message go past 2-3 times before SQL Server wakes up and realizes thatI'm allowed to connect to it. Anybody know why?Thanks,Jason KesterExpat Software Consulting Serviceshttp://www.expatsoftware.com/---Get your own Travel Blog, with itinerary maps and photos!http://www.blogabond.com/
I was able to connect to the SQL Database Pension with table clients with table values: ID, State, Name.'Create(connection)Dim conn As New Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString)'open connectionconn.Open()However, I'm not sure how to insert a new row with an incremental ID number and a new State and Name.Sorry, I'm really new with VWD.
Sorry for the less then descriptive post title but I didn't find a better way to describe it. I'm developing an app in the express editions of VB and SQLserver. The application is a task/resource scheduler. The main form will have a datepicker or weekly overview and show all tasks scheduled per day. The problem is, I've got one or more people assigned to tasks and I wonder what's the best way to design this. Personally, I'd go for one Task table, a People table and a table that provides a link between them (several record per task, one for each person assigned linking TaskID and PplID). However, I don't see a nice way of showing this data to the end user, allowing him to edit/add etc on ONE screen.
To fix that the only way I see is just add columns to the Task table for every person with select boxes. This way everything can be done on one simple screen. This obviously does present some future issues.
On top of this, which people are available on a day varies and there should be an option to allow a user to set who is available on a specific day. Which would lead me to my first idea and add another table that would provide this. but then I'm having design issues again for the form.
I'm kinda stuck atm, can anyone shed some light on this. I'm sure there is an elegant way of doing this but I'm failing at finding it.
I am new to windows apps in .net 2.0. I am trying to create a windows service that will connect to a database and email info out to people that have had status changes. Right now, I can not connect to the database. Here is the connection string: Private cnn As New SqlClient.SqlConnection("Data Source=IPAddress;Initial Catalog=TheServer;Persist Security Info=True;User ID=userid;Password=password provider=SQLOLEDB.1;connect timeout=3600") This is how I am trying to connect: cnn.Open() myCMD.CommandTimeout = 0 dr = myCMD.ExecuteReader
I keep getting an error message that I can not be logged on. I know that the credentials are correct because I use them for the web app. Something has to be wrong with my connection string, but what? Thanks, enak
I'm using Visual Web Developer and SQL 2005...It Guives me this error...: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) I'm tired of guetin and search solution for this errorI've tried everything that i searched over the "net"...made all the configurations possible in sql server 2005 and nothing...Is this right? Or do i need to put some more code in this line or in server is it "localhost:****...: ...connection = New SqlConnection("Server=servernameWebSite1uid=sa;pwd=1234;database=cdcollection")connection.Open()...... Don't know why in sql server i have two object explorer connections when i start the sql server...one is "servername"...two is "servernamesqlexpress" (but when trying to connect with "servernamesqlexpress" it won't let me, only with "servername")...i use the windows authentication......when i had the VB.NET 2003 and SQL Server 2000, it was much easy to do this... In ASP.NET config i still have the C:inetpubwwwroot path but the files don't go there...now they go to my documentsVisual studio 2005 by default of Visual Web Developer prog. Do i need to change the location? Please help...i'm really desperate...with this...
I am developing my first website for my boss. I am trying to connect to an access database which I have created a DSN for on the server. I am using the following code sample.... //Connection String 1string dsn_name = "access_WALLINVEN.dsn";string sDSNDir = Server.MapPath("_dsn");string connectstr = ("Data Source="+ (sDSNDir + ("\" + dsn_name)));//Connection String 2string connectstr = "Data Source=/jwallpaint/_dsn/access_WALLINVEN.dsn;Uid=jwallpaint;Pwd=J2512wall;";string commandString = "Select * from Inventory";//Pass strings to sqlDataAdapter constructorSqlDataAdapter dataAdapter = new SqlDataAdapter(commandString, connectstr);//Create a datasetDataSet dataSet = new DataSet();//fill the dataset objectdataAdapter.Fill(dataSet, "Inventory");//Get the table from the datasetDataTable dataTable = dataSet.Tables["Inventory"];//Bind to the gridviewGridView1.DataSource = dataTable;GridView1.DataBind();For Connection String 1 I get the error of...An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) For Connection String 2 I get the error of...An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) I am not sure which connection string to use either....It is strange to me that I get this error talking about SQL Server when I am trying to reach my Access database......Any Help?? Thanks....
Hi, I'm on lesson 7 of the Bob Tabor video tutorial called 'Data binding to user interface controls'. Whenever I try to add an SQL database (add new item/sql database) I get the following error message: TITLE: Connect to Server ------------------------------
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1) I have VWD installed, sqlexpress installed, everything really. Any help would be appreciated. MD
I am attempting to connect to a database that has been uploaded to my server from my webpages on the server. This is the connection string that is currently used: connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|Restaurants.mdf;Integrated Security=True;User Instance=True" When attempting to connect to the database I receive this error message: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) I realize that I cannot make a remote connection using SQL Server 2005 Express Edition, but cannot find the proper connection string for it to connect to the uploaded database. Accessing the database doesn't require a log on by the user as all the information is public. The authentication mode in the web.config file is set to "Forms". If there is any other information required so that this problem can be solved, please ask for it. Thank you in advance, Me