Showing posts with label online. Show all posts
Showing posts with label online. Show all posts

Friday, March 9, 2012

MS SQL database Transfer

How can I transfer an online MS SQL Database with all data to a local machine MS SQL server. I am using Import Export Tool provided by MS SQL Enterprise manager but the referential integraity breaks (Primary and secondary key relationship). Thus the Data concurrency is lost and the database becaomes of no us.

Most of our database projects have Stored procs, Views, Triggers and contain data. Sometimes we have to take back up of the running database.

The same problem comes when we try to install an offline database with data online. We have to run the scripts through Query Analyser on the online server to install database tables, procs, triggers etc and then repopulate the database once again.

But if you see mySQL one can import the complete database with all data using phpmyAdmin tool. Most hosts provide this tool so becomes easier.

Though MS SQL has a database restoration option but 90% hosts do not allow you to automatically generate back up and download. You have to request them and then they generate the backup and upload to web server folder for us to download and restore.

Can anyone explain a solution to this daily problem..axaya

This is the DTS import/export wizard. Have you tried the "Copy objects and data Between SQL Server databases" option ?? This should copy all objects when doing the export. this copied all constraints, indexes...

Hope that helps :-)|||Any other way. DTS takes huge time and connection fails.|||How about detaching and attaching the DB, check out the link.

http://support.microsoft.com/kb/224071/

Monday, February 20, 2012

MS SQL 2000 and Windows 2003 Cluster

I installed MS SQL 2000 on a Windows 2003 server cluster (no service
packs). Both nodes are online and both domain controllers are online.

I tried to install SP3 and got the following error:

-----

Logon Account could not be validated.

No authority could be contacted for authentication.

-----

I installed SQL SP 2 and did not get the error but I do get it every
time I try to install SP3.

Does anybody have an idea that might help resolve the problem.bryan <bryanf0@.yahoo.com> wrote in message news:<8blci097aakmnppsusjrbhb27r2r5n3c6n@.4ax.com>...
> I installed MS SQL 2000 on a Windows 2003 server cluster (no service
> packs). Both nodes are online and both domain controllers are online.
> I tried to install SP3 and got the following error:
> -----
> Logon Account could not be validated.
> No authority could be contacted for authentication.
> -----
> I installed SQL SP 2 and did not get the error but I do get it every
> time I try to install SP3.
> Does anybody have an idea that might help resolve the problem.

SP2 isn't supported on Server 2003, although SP3 should install fine:

http://support.microsoft.com/default.aspx?kbid=329329

You might want to post in microsoft.public.sqlserver.clustering, in
case your issue is specific to a cluster setup. You could also call
PSS directly - if you have the resources to plan and implement
clustering then I guess the cost of a support call shouldn't be a
problem. And of course if it's a bug then you aren't charged anyway.

Simon|||On 23 Aug 2004 07:05:20 -0700, sql@.hayes.ch (Simon Hayes) wrote:

>bryan <bryanf0@.yahoo.com> wrote in message news:<8blci097aakmnppsusjrbhb27r2r5n3c6n@.4ax.com>...
>> I installed MS SQL 2000 on a Windows 2003 server cluster (no service
>> packs). Both nodes are online and both domain controllers are online.
>>
>> I tried to install SP3 and got the following error:
>>
>> -----
>>
>> Logon Account could not be validated.
>>
>> No authority could be contacted for authentication.
>>
>> -----
>>
>> I installed SQL SP 2 and did not get the error but I do get it every
>> time I try to install SP3.
>>
>> Does anybody have an idea that might help resolve the problem.
>SP2 isn't supported on Server 2003, although SP3 should install fine:
>http://support.microsoft.com/default.aspx?kbid=329329
>You might want to post in microsoft.public.sqlserver.clustering, in
>case your issue is specific to a cluster setup. You could also call
>PSS directly - if you have the resources to plan and implement
>clustering then I guess the cost of a support call shouldn't be a
>problem. And of course if it's a bug then you aren't charged anyway.
>Simon

It always pays to look at the simple stuff first. One node of the
cluster was pointing to the wrong DNS.

Never start anything like this on a Friday afternoon.

MS SQL (online) - Access(offline) system

Hi everyone,

I 've built an application which runs on a ms sql Database, now my employer want a offline database system as well. I've already implemented Access, but having difficulties with something.

I was creating a form to transfer all data from the sql database to the access database, when I experienced a problem in my first (access) data accessor. Sql gave a syntax error, when I copied the sql string with some test data to Access it obviously gave the same error but afterwards focussed on the DataTime field of my sql string. So I'm assuming the problem lies with that.

Is there a difference between the DateTime in SQL Server and Access? If so is there a way to convert from one to the other?

My SQL test string:

Code Snippet

INSERT INTO dbo_tblPerson(ID,Name,Surname,Email,Website,Address,Country,Comments,DateTime,Telephone,Mobile,Active)
VALUES (1,To,Vdb,info@.,www.,str,BE,Test,Date.Now(),0474,0474,0)

My Data Accessor:

Code Snippet

public static int addPerson(clsPerson oPerson)

{

try

{

string sSQL = "INSERT INTO dbo_tblPerson(ID,Name,Surname,Email,Website,Address,Country,Comments,DateTime,Telephone,Mobile,Active) ";

sSQL += "VALUES (@.ID,@.Name,@.Surname,@.Email,@.Website,@.Address,@.Country,@.Comments,@.DateTime,@.Telephone,@.Mobile,@.Active)";

int i = 0;

int iHigh = getHighestID();

clsDatabase.ExecuteSQL(

sSQL,

new OleDbParameter("@.Name", oPerson.Name),

createNullableParameter("@.Surname", oPerson.Surname),

createNullableParameter("@.Email", oPerson.Email),

createNullableParameter("@.Website", oPerson.Website),

createNullableParameter("@.Address", oPerson.Address),

createNullableParameter("@.Country", oPerson.Country),

createNullableParameter("@.Comments", oPerson.Comments),

createNullableParameter("@.DateTime", oPerson.DateTime),

createNullableParameter("@.Telephone", oPerson.Telephone),

createNullableParameter("@.Mobile", oPerson.Mobile),

new OleDbParameter("@.Active", i)

);

return iHigh;

}

catch (Exception ex)

{

return 0;

//System.Reflection.MethodBase oExceptie = System.Reflection.MethodInfo.GetCurrentMethod();

//clsLogging.logException(1, "addInput: " + ex.Message, oExceptie);

}

}

private static int getHighestID()

{

int iID;

try

{

string sSQL = "SELECT MAX(ID) from dbo_tblPerson";

try

{

iID = Convert.ToInt32(clsDatabase.ExecuteScalar(sSQL, new OleDbParameter[0]));

}

catch (Exception ex)

{

iID = 0;

}

iID += 1;

}

catch (Exception ex)

{

throw ex;

}

return iID;

}

private static OleDbParameter createNullableParameter(string sName, object oProperty)

{

OleDbParameter oPar = new OleDbParameter() ;

if (oProperty == null)

{

oProperty = System.Convert.DBNull;

}

oPar.Value = oProperty;

oPar.ParameterName = sName;

return oPar;

}

Tobias

Apparently the databasefield name 'DateTime' caused problems, so I changed it to 'dt'.
Getting a whole new problem, being "Data type mismatch in criteria expression." Can it still be the datetime value thing?

Code Snippet

public static int addPerson(clsPerson oPerson)

{

try

{

string sSQL = "INSERT INTO dbo_tblPerson(Name,Surname,Email,Website,Address,Country,Comments,dt,Telephone,Mobile,Active) ";

sSQL += "VALUES (@.Name,@.Surname,@.Email,@.Website,@.Address,@.Country,@.Comments,@.dt,@.Telephone,@.Mobile,@.Active)";

int i = 0;

int iHigh = getHighestID();

clsDatabase.ExecuteSQL(

sSQL,

new OleDbParameter("@.Name", oPerson.Name),

createNullableParameter("@.Surname", oPerson.Surname),

createNullableParameter("@.Email", oPerson.Email),

createNullableParameter("@.Website", oPerson.Website),

createNullableParameter("@.Address", oPerson.Address),

createNullableParameter("@.Country", oPerson.Country),

createNullableParameter("@.Comments", oPerson.Comments),

createNullableParameter("@.dt", oPerson.DateTime),

createNullableParameter("@.Telephone", oPerson.Telephone),

createNullableParameter("@.Mobile", oPerson.Mobile),

new OleDbParameter("@.Active", i)

);

return iHigh;

}

catch (Exception ex)

{

return 0;

//System.Reflection.MethodBase oExceptie = System.Reflection.MethodInfo.GetCurrentMethod();

//clsLogging.logException(1, "addInput: " + ex.Message, oExceptie);

}

}

|||

This helped

oPerson.DateTime.ToString("MM-dd-yyyy hh:mmTongue Tieds")

|||

I'm not sure what the definition is for "offline" system; but what about using SQL Server Express instead of Access?

|||

Then every client still has to run a server on their system .. don't they?

*edit: Anyway I 've succesfully implemented the access system already, just stuck now with how use it once distributed with Click Once. Don't know how to setup my Connectionstring for the local db.

|||

You mean an server operating system?

No, Express runs on XP(SP2) and Win2000 Pro (SP4)

|||But does the express edition act like a file or is it a running service? Because I can't ask for each client to install express on their system.|||

It runs as a service.

Sorry.

|||

That's what I thought, no worries.. glad I used the right way Smile

You don't know a solution for my connectionstring problem? Or how to copy a file with Clickonce to c:\\DB\ ..?

|||

Not much help to you there...haven't worked with Access in a number of years.

|||

It doesn't really have to do with access.. I just need to put the access mdb file to a location I know on the users system using the ClickOnce Deployment, putting it between the application files works but then the location of the file would be something like

Code Snippet

C:\Documents and Settings\Tobias\Local Settings\Apps\2.0\2LQGDKTN.0KN\J3WQXOLX.BGB\netw...exe_75bfb84bc0f378ec_0000.0009_en-gb_fc79dfd558e684a4

So basically not usuable in a connectionstring for a database.