Converting Database To MS-SQLServer From PostGRESQL

Nov 23, 2006

Forgive me if this question is a bit too generic, if it is, feel free to
just not respond.

I have a database which has been running in PostgreSQL for a number of
years at this stage which I want to port into MS SQL server.

It seems that the SQL that Postgre outputs when I do a backup is not
syntactically correct within MS-SQL server.

My question is, does anyone have any documentation on how to convert a
database from the Postgre platform to SQL server? Is it possible using
an ODBC connection to import a database structure including table
definitions, views etc into SQL Server?

Failing this, does anyone have any suggestions on where I might start -
I did attempt to go through the SQL code and modify it to suit SQL
server, but it's about 3,500 lines of code excluding the insert
statements (which themselves are also wrong) and almost every line needs
something changed when comparing SQL syntax from Postgre to MSSQL server

Thanks in advance for any comments/suggestions.

Engada.

--
Posted via a free Usenet account from http://www.teranews.com

View 1 Replies


ADVERTISEMENT

Export Data From Postgresql On Linux To Ms-sqlserver 2000 On Windows

Jul 20, 2005

Hello all,I have been trying to find some information about exporting data frompostgresql on linux to ms-sqlserver 2000 on windows but have not beenable to get hold of any information. I would really appreciate ifsomeone can point me to some source of information.Thanks in advance,Nishy

View 2 Replies View Related

Converting Oracle SQL To MS-SQLServer SQL

Jul 20, 2005

Hello,Has anyone a small tool or somekind of document which could help meto convert Oracle SQL scripts to SQL Server?Scripts are not very Oracle specified.Thanks,Below is a Script that I would e.g convert to MS SQLServer:SET SCAN ONPROMPT Enter the password and TNS name.PROMPT Enter the oracle SID for TNS name if you are running a local database.CONNECT system/&systempassword@&&tnsname-- Drop the user and all other related objects.DROP USER webstore CASCADE;-- Creating the schemaCREATE USER webstore IDENTIFIED BY welcome;-- Grant the permissions to the user.GRANT RESOURCE, CONNECT TO webstore;ALTER USER webstore DEFAULT TABLESPACE usersQUOTA UNLIMITED ON users;ALTER USER webstore TEMPORARY TABLESPACE temp;CONNECT webstore/welcome@&&tnsnamePROMPT Creating Tables-- Create the category table which contains the data for the categories.CREATE TABLE category (id NUMBER(10) CONSTRAINT pk_vsm_country PRIMARY KEY,name VARCHAR2(20) NOT NULL);-- Create category attributes table which has attributes for the categories in-- the category table.CREATE TABLE category_attributes (category_id NUMBER(10) NOT NULL,label VARCHAR2(20) NOT NULL,CONSTRAINT pk_vsm_cat_attr PRIMARY KEY(category_id,label),CONSTRAINT rk_vsm_catattr_cat FOREIGN KEY(category_id) REFERENCEScategory(id) ON DELETE CASCADE);-- Create country table to hold the country names.CREATE TABLE country (id NUMBER(4) CONSTRAINT pk_country PRIMARY KEY,country_name VARCHAR2(50) CONSTRAINT uniq_country UNIQUE);-- Create users table to hold user details.CREATE TABLE users (user_name VARCHAR2(20) CONSTRAINT pk_users PRIMARY KEY,first_name VARCHAR2(20) NOT NULL,last_name VARCHAR2(20),e_mail VARCHAR2(50) NOT NULL,address VARCHAR2(200) NOT NULL,city VARCHAR2(20) NOT NULL,state VARCHAR2(20) NOT NULL,country NUMBER(4) NOT NULL ,zip NUMBER(8) NOT NULL,phone VARCHAR2(20) NOT NULL,role VARCHAR2(10) NOT NULL,password VARCHAR2(200) NOT NULL,card_provider VARCHAR2(30),card_number VARCHAR2(200),card_expiry_date DATE ,CONSTRAINT rk_usr_cntry FOREIGN KEY(country) REFERENCEScountry(id) ON DELETE CASCADE);-- Create shops master table.CREATE TABLE shops (id NUMBER(10) CONSTRAINT pk_shops PRIMARY KEY,shop_name VARCHAR2(50) NOT NULL,user_name VARCHAR2(20) NOT NULL,description VARCHAR2(4000),category_id NUMBER(10) NOT NULL,reg_date DATE NOT NULL,status VARCHAR2(20) NOT NULL,CONSTRAINT chk_shops CHECK( status IN ('Approved', 'ApprovalPending','Rejected','Discontinued') ),CONSTRAINT rk_shop_cat FOREIGN KEY (category_id) REFERENCES category(id)ON DELETE CASCADE,CONSTRAINT rk_shop_user FOREIGN KEY(user_name) REFERENCES users(user_name)ON DELETE CASCADE);-- Create sub_category table which has the sub categories listed for each shop.CREATE TABLE sub_category (id NUMBER(10) CONSTRAINT pk_subcat PRIMARY KEY,category_id NUMBER(10) NOT NULL,shop_id NUMBER(10) NOT NULL,name VARCHAR2(20) NOT NULL,CONSTRAINT rk_subcat_cat FOREIGN KEY(category_id) REFERENCES category(id)ON DELETE CASCADE,CONSTRAINT rk_subcat_shop FOREIGN KEY(shop_id) REFERENCES shops(id)ON DELETE CASCADE);-- Create item master table.CREATE TABLE item (id NUMBER(10) CONSTRAINT PK_VSM_ITEM PRIMARY KEY,name VARCHAR2(50) NOT NULL,category_id NUMBER(10) NOT NULL,shop_id NUMBER(10) NOT NULL,description VARCHAR2(4000),unit_price NUMBER(15,2) NOT NULL,image VARCHAR2(50),CONSTRAINT rk_item_subcat FOREIGN KEY (category_id ) REFERENCESsub_category(ID) ON DELETE CASCADE ,CONSTRAINT rk_item_shop FOREIGN KEY(shop_id) REFERENCES shops(id)ON DELETE CASCADE);-- Create item_attributes table which has the item attributes for the itemsCREATE TABLE item_attributes (item_id NUMBER(10) NOT NULL,label VARCHAR2(20) NOT NULL,description VARCHAR2(4000),CONSTRAINT pk_item_attr PRIMARY KEY(item_id , label),CONSTRAINT rk_itemattr_item FOREIGN KEY(item_id) REFERENCES item(id)ON DELETE CASCADE);-- Creat inventory table which maps the quantitly against the item.CREATE TABLE inventory (item_id NUMBER(10) CONSTRAINT pk_inventory PRIMARY KEY,quantity NUMBER(4) NOT NULL,CONSTRAINT RK_INVNTRY_ITEM FOREIGN KEY(item_id) REFERENCES item(id)ON DELETE CASCADE);-- Create orders master table which stores all the completed orders.CREATE TABLE orders (id NUMBER(10) CONSTRAINT pk_orders PRIMARY KEY,order_date DATE NOT NULL,user_name VARCHAR2(20) NOT NULL,shop_id NUMBER(10) NOT NULL,ship_to_address VARCHAR2(100),city VARCHAR2(20),state VARCHAR2(20),country NUMBER(4),zip NUMBER(8),phone VARCHAR2(20),CONSTRAINT rk_ordr_usr FOREIGN KEY(user_name) REFERENCES users (user_name)ON DELETE CASCADE,CONSTRAINT rk_ordr_shop FOREIGN KEY(shop_id) REFERENCES shops(id)ON DELETE CASCADE);-- Create order_items table to store the detailed ordersCREATE TABLE order_items (order_id NUMBER(10) NOT NULL,item_id NUMBER(10) NOT NULL,quantity NUMBER(4) NOT NULL,unit_price NUMBER(15,2) NOT NULL,status VARCHAR2(20) NOT NULL,CONSTRAINT chk_oi check ( Status in ('Pending','Shipped')),CONSTRAINT rk_oi_ordr FOREIGN KEY(order_id) REFERENCES orders(id)ON DELETE CASCADE ,CONSTRAINT rk_oi_item FOREIGN KEY(item_id) REFERENCES item(id)ON DELETE CASCADE);-- Create guest_book table to store all the guest_book entriesCREATE TABLE guest_book (id NUMBER(10) CONSTRAINT pk_guest_book PRIMARY KEY,user_name VARCHAR2(50) NOT NULL,email_id VARCHAR2(50),rating NUMBER(1),comment_date DATE NOT NULL,comments VARCHAR2(4000));-- create sequences.CREATE SEQUENCE category_seq MAXVALUE 9999999999;CREATE SEQUENCE shops_seq MAXVALUE 9999999999;CREATE SEQUENCE sub_category_seq MAXVALUE 9999999999;CREATE SEQUENCE item_seq MAXVALUE 9999999999;CREATE SEQUENCE inventory_seq MAXVALUE 9999999999;CREATE SEQUENCE orders_seq MAXVALUE 9999999999;CREATE SEQUENCE guest_book_seq MAXVALUE 9999999999;

View 1 Replies View Related

Converting Oracle Slq Quer To Sqlserver Query

Jan 14, 2001

Hi ,

I have a question for all , please help me out.

the question is : i have a query in Oracle like this
select count(*), to_char(ISL_FIRST_VISIT, 'Day, mm/dd/yyyy') from ISL_USERS
group by to_char(ISL_FIRST_VISIT, 'Day, mm/dd/yyyy')
order by to_char(ISL_FIRST_VISIT, 'Day, mm/dd/yyyy');

i want to convert this into SQLserver but in SQL server equlent function for TO_CHAR is Datename ..when i have given this i am getting error . please give me the tip on this issue .

thanks
shekhar

--------------------------------------------------------------------------------


|

View 1 Replies View Related

How To Transfer Data From A SqlServer Database To A SqlServer Express Database

Mar 29, 2006

Is there a way to transfer data from a SqlServer db to a SqlServer Express db. I tried to use the backup file of SqlServer, but this file is not valid for SqlServer Express. Or there any alternatives?

thanks,

Henk

View 7 Replies View Related

Trying To 'load' A Copy Of A SQLServer 2000 Database To SQLServer 2005 Express

Apr 18, 2008



I am trying to 'load' a copy of a SQLServer 2000 database to SQLServer 2005 Express (on another host). The copy was provided by someone else - it came to me as a MDF file only, no LDF file.

I have tried to Attach the database and it fails with a failure to load the LDF. Is there any way to bypass this issue without the LDF or do I have to have that?

The provider of the database says I can create a new database and just point to the MDF as the data source but I can't seem to find a way to do that? I am using SQL Server Management Studio Express.

Thanks!!

View 1 Replies View Related

Upgrade SQLServer Mobile (.sdf) Database To SQLServer 2005

Feb 9, 2006

Hello,

I have an SQLServer Mobile database, and I would like to know if there is a way to upgrade it to SQLServer 2005 (.mdf) database. My database has no records in it, just the structure (tables etc). What I am actually asking is if I can create automatically a new SQLServer 2005 Database with the same structure as my existin SQLSErver Mobile database

Thanks in advance,

TassosTS

View 1 Replies View Related

SQL Server 2k Migration To PostgreSQL

Mar 4, 2004

Hi all

I hope you can help me in some way.

Basically for the last 5 months i've developed a SQL 2k db for my company.

All of a sudden they quite fancy using Linux on the server, therefore i would be required to use PostgreSQL instead of SQL Server 2k.

I could do with some advice about how PostgreSQL and SQL Server compare? and how much work would be involved in migrating from one to the other.

Points i've found myself and may be an issue are:

I've used some of SQL Servers XML capabilites and as far as i can tell PostgreSQL doesn't support XML.

I've made extensive use of functions that return table variables etc... is there a similar idea i can use in PostgreSQL?

Extensive use of Stored Procedures and T-SQL etc...

DTS packages. Any equivalent or similar idea?

(ps i've also posted this in the PostgreSQL but since no one replyed i was hoping the sql server boffs could help).

View 3 Replies View Related

Saving Picture In PostgreSql

Apr 3, 2004

can ne 1 specify, how to insert a picture into a PostgreSql DB?
pl tell which data type to use and how can i display the picture in my client app

View 1 Replies View Related

What So Special About PostgreSQL And Other RDBMS?

Jul 20, 2005

Beside its an opensource and supported by community, what's the fundamentaldifferences between PostgreSQL and those high-price commercial database (andsome are bloated such as Oracle) from software giant such as Microsoft SQLServer, Oracle, and Sybase?Is PostgreSQL reliable enough to be used for high-end commercialapplication? Thanks

View 49 Replies View Related

Possible To Access Postgresql From Sql Server Ce

Oct 12, 2006

I am wondering if it is possible to access a remote postgresql database using the sql server ce access classes. I do not want to run a postgresql server on windows ce, just access one from a mobile device.

View 7 Replies View Related

Can SQL Server 2K Connect Directly To PostgreSQL?

May 22, 2001

hello everyone!

I'm currently dumping tables from PostgreSQL 7 to SQL Server 2K and I've been wondering if it's possible to create a trigger between the two databases.
..like if there's an insert to a PostgreSQL table, the trigger inserts the same row to the SQL Server table.

If it is possible, please do send me a sample code.

Thanks!

View 1 Replies View Related

SQL Server 9.0 (2005) && PostgreSQL Data Types

Jan 5, 2006

Hi,

I´m building an aplication with VB.net and SQL Server 9, but in the future it will be compatible with PostgreSQL (by another developer), so my question is, if anyone knows what "data types" in SQL Server 9 i must use to maintain compatibility with PostgreSQL, so that when the time come for the conversion i don t have to chage the "Data Types" on each table.

Any help would be apreciated.

View 4 Replies View Related

Import Data From PostgreSQL Into SQL Server 2005

Oct 17, 2007

I am trying to import one table from postgreSQL to SQL Server 2005 using sql server import and export wizard. When i test the connection after providing data source, location, username, password in the Data Link Properties section I get the message "Test Connection Succeeded". As soon as i press next to go onto next step i get the following error.





TITLE: SQL Server Import and Export Wizard
------------------------------

Cannot get string literals from the database connection "Provider=PostgreSQL.1;User ID=sa;Data Source=localhost;Location=TestMasterMap;Extended Properties=".

------------------------------
ADDITIONAL INFORMATION:

Object reference not set to an instance of an object. (DTSWizard)

------------------------------
BUTTONS:

OK
------------------------------



I have tried all sorts of different combinations for these properties but it always fails on this step. Can anybody help me with this?

View 19 Replies View Related

REPLICATION BETWEEN MSSQL SERVER And Postgresql/MySQL/ORACLE???

Nov 27, 2006

Hi Friends,
I want to know if there are a manner of replication(two-way) between MSSQL SERVER and (postgresql or mysql or ORACLE).

Thanks

View 3 Replies View Related

General Advice Needed Regarding MS Access, MS SQL Server, MySQL/PostgreSQL

Nov 15, 2006

I am working on two versions of an application, one of which will be awindows forms application (which will need to be redistributable) andthe other will be a web application.I have MS Visual Studio 2005 (along with the developer's edition of MSSQL Server), but not MS Access. I also have MySQL, PostgreSQL, Sun'sapplication server, Tomcat and Apache web server. I am working onWindows XP Pro, and have installed the .NET 3 SDK and all relevantrelated products I could find (e.g. 2 extensions packages for VisualStudio).I have one MS Access database, to which my users should have read onlyaccess. I have, and have used, a tool for importing MS Accessdatabases into MySQL. I expect that SQL Server has a similar utilityhidden somewhere (where I haven't yet looked, though I HAVE beenlooking - obviously in the wrong places). I have located a similarutility for importing MS Access databases into PostgreSQL. I have notyet decided which servers to use for the web version, but that isanother story, for which I may raise another thread in due course (butI welcome suggestions which may reduce the effort required givenrequired effort for the windows forms app).My problem is for the windows form aplication (intended for use by asingle family). I expect to use ADO.NET. The question is, should Iimport the Access database into MS SQL, and redistribute it, along withMS SQL Server Express (or is that necessary), or distribute it just asan Access database and use the jet engine to access it. A relatedquestion is, "Does ADO.NET support creating new databases for a givenengine?" Imagine a recipe database. It is easy enough to create a SQLscript that creates all the required tables, indices, foreign keys,&c., but can I submit that SQL script to an ADO.NET object, along witha file name, and have it create, e.g., an Access database with thesupplied name. Or do I have to create a database file with nothing init other than the schema?I have more questions, but they'll have to wait.ThanksTed

View 5 Replies View Related

What The Equivalent Command IN SQL SERVER EXPRESS To POSTGRESQL BEGIN ROLLBACK And COMMIT

Jun 27, 2007

Hello,

First of all, this is my first time using SQL SERVER 2005 express, before that i'm using POSTGRESQL database.

I would like to know how what's the equivalent command for "BEGIN","ROLLBACK","COMMIT", these are the POSTGRESQL COMMAND use to start transaction, rollback transaction and commit transaction.

Example when i use this kind of command is . I need to insert data into 3 table. before insert into table1, i issue "begin", start to insert data into table1, if table1 no error, then i proceed to table 2 and table3. if table2 and table3 no error. then issue "commit" to commit the changes. but if any error happen between table1 and table 2 or table 2 and table3, i will issue "rollback" to roll any changes that i make to table1, table2 and table3.

Maybe some one can teach me how to achieve using SQL SERVER 2005 EXPRESS.

Thanks and Regards.

Beh Chun Yit

View 1 Replies View Related

Converting From Express Database To Main Sql Server 2005 Database

Jan 23, 2008

Hi,
What are the steps required to migrate or upgrade  data or database from a sql server 2005 express database to main sql server 2005 database?
Regards,Sandy

View 1 Replies View Related

How To Copy Table From Oracle Database To Sqlserver Database ?

Jul 20, 2005

Hello,I need to copy a table from an 8i oracle database to a sqlserver 2000 database.Is it possible to use the command "COPY FROM ... TO ..." ?So, what is the correct syntax ?Thanks for your helpCyril

View 1 Replies View Related

Copy Sqlce Database Structure To Sqlserver Database

Jan 6, 2008

Hi,
I have a complicated sql server mobile database (.sdf) and need to create a SQL SERVER database with the same tables. How can I do it without scripting the whole thing? I thought of using the views.information_schema databases, but it is still a lot of coding.

thanks

View 3 Replies View Related

Converting A SQLite Database To A SQL Server Database

Jun 5, 2007

Hi



I have a SQLite database. I want to convert it to SQL Sever 2005 database. Can u pls guide me how to do it?



Imalka



View 6 Replies View Related

Converting MSAccess .MDB To SQL Server Database

Apr 1, 2005

I need to switch from MS Access to SQL Server for my database. To set
up a development environment I downloaded the free Microsoft SQL Server
Express (February CTP version). I installed the required .NET Framework
v2, and then SQLExpress. The install was done using all the defaults,
and was done successfully. I also downloaded and installed the SQL
Express Manager Tool.

The SQL Server was installed on the same machine as my VS.NET
development environment. The SQL Server process is now running, and I
can connect to the server using the SQL Express Manager Tool. This
allows me to view and query the sample databases, but not much else.

To convert my Access .MDB database to SQL Server, I am trying to use
the MS Access Upsizing Wizard. The version of Access I am using is
Access 2002 on a Windows XP-Professional system. The problem is that
Access cannot get a connection to the SQL Server. I tried using the
default server name "(local)" and "Use Trusted Connection", but I
receive the following error:

Connection failed:
SQLState: '01000'
SQL Server Error: 2
[Microsoft][ODBC SQL Server Driver[]Shared Memory]ConnectionOpen (Connect()).
Connection failed:
SQLState: '08001'
SQL Server Error: 17
[Microsoft][ODBC SQL Server Driver[]Shared Memory]SQL Server does not exist or access denied.

Curiously, I get this exact same error message even if the SQL service
is stopped. So I'm pretty sure the problem is that it is not finding
the SQL server, and not a security issue.

In order to connect to the SQL server using the SQL Server Manager
Tool, you have to provide the actual instance name for the server
"COMPNAMESQLExpress". So I tried using this server name in the Access
Upsizing Wizard, but this returns the same error message as above
except the first SQL Server Error is 53. I also tried using a Login ID
and password (using the Windows administrator ID and password, and also
the "sa" ID and password) to no avail.

I am at wits end, and can't figure out why Access can't find the SQL Server. Any ideas would be appreciated.

Thanks.

View 2 Replies View Related

Converting Data To Be Inserted Into A Database

Mar 12, 2006

Hi,I am using web matrix, and I am trying to insert a data into a MSDE database. I have used webmatrix to generate the update code, and it is executed when a button is pressed on the web page. but when the code is executed I get the error:Syntax error converting the varchar value 'txtAmountSold.text' to a column of data type int.So I added the following code to try to convert the data, but i am still getting the same error, with txtAmountSold.text replaced with "test"dim test as integer
test = Convert.ToInt32(txtAmountSold.text)Here is the whole of the function I am using:Function AddItemToStock() As Integer        dim test as integer        test = Convert.ToInt32(txtAmountSold.text)                Dim connectionString As String = "server='(local)Matrix'; trusted_connection=true; database='HawkinsComputers'"        Dim dbConnection As System.Data.IDbConnection = New System.Data.SqlClient.SqlConnection(connectionString)        Dim queryString As String = "INSERT INTO [stock] ([Catagory], [Type], [Name], [Manufacturer], [Price], [Weight"& _            "], [Description], [image], [OnOffer], [OfferPr"& _            "ice], [OfferDescription], [AmountInStock], [AmountOnOrder], [AmountSold]) VALUES ('CatList.SelectedItem.text', 'txtType.text', 'txtname.text', 'txtmanufacturer.text'"& _            ", convert(money,'txtPrice.text'), 'txtWeight.text', 'txtDescription.text', 'txtimage.text', 'txtOnOffer"& _            ".text', convert(money,'txtOfferPrice.text'), 'txtOfferDescrip"& _            "tion.text', 'txtAmountInStock.text', 'txtAmountOnOrder.text', 'test')"        Dim dbCommand As System.Data.IDbCommand = New System.Data.SqlClient.SqlCommand        dbCommand.CommandText = queryString        dbCommand.Connection = dbConnection        Dim rowsAffected As Integer = 0        dbConnection.Open        Try            rowsAffected = dbCommand.ExecuteNonQuery        Finally            dbConnection.Close        End Try        Return rowsAffected    End FunctionAny help in solving this problem would be greatly appreciated, as I am really stuck for where to go next.

View 2 Replies View Related

Opening/Converting Unknown Database

Feb 14, 2008

Hi there I dunno if this is the correct place to ask this.I got this database that is part of application, I need to convert/migrate it to any other current database like SQL server, the problem is that I dunno the database type, with his current application I know it got stored names and address, from the application I can only export 9999 records at the same time.The database is a 300mb DAT file.I have never done anything like this before so Any help or suggestions would be apreciatte, ty.Database opened with Index Data Suite:http://b.imagehost.org/0096/index_data_suite.jpgDatabase opened with Hex Editor:http://b.imagehost.org/0096/hex_pic.jpg

View 11 Replies View Related

Trouble Converting Datatype For Database Insert

Dec 7, 2004

Hi,
I need to take a value from a textbox and insert it into a field in my database which takes decimals. My problem, no matter what I try I cannot convert the value so that the database will accept it. This all happens when the submit button is hit on my webpage. Here is the cmdSubmit_click sub code:

Dim surveyNum As Decimal = Decimal.Parse(txtSurveyNum.Text, Globalization.NumberStyles.Number)
myCmd.CommandText = "INSERT INTO survey(ID) VALUES('" & surveyNum & "')"
myCmd.Parameters.Add("surveyNum", SqlDbType.Decimal)
myCmd.Parameters("surveyNum").Value = System.Convert.ToDecimal(txtSurveyNum.Text)

myConn.Open()
Try
myCmd.ExecuteNonQuery()
lblMessage.Text = "Record successfully updated"
Catch
lblMessage.Text = "Query error: " & Err.Description
End Try
myConn.Close()

Thnx in advance, any help would be greatly appreciated.

View 1 Replies View Related

Converting An Existing Database(ASCII) To Unicode UTF 8

Oct 6, 2006

Adedoyin Akinnurun writes "i have a database that is running using regular ascii characters.. i am trying to migrate this database to support several other languges(globalization). I need ideas on how to migrate this database to UTF 8 .
Someone suggested converting all the varchar and char to nvarchar and nchar .. but i have a lot of data on the system and this might take a lot of time..
Any ideas would be appreciated !!!!"

View 1 Replies View Related

How To Look All The Table In A Database In Sqlserver

Feb 27, 2001

how to look all the table in a database in sqlserver,
and what are the maintanance jobs that needed to be run either daily or weekly.

K

View 1 Replies View Related

Configuring A Database In Sqlserver?

Jun 9, 2006

I am learning dotnet thru Microsoft Official Curriculum and I got stuck up at one point. That is I couldn't configure the required databases according to the sql server I have installed and configured. I created a doctors database and while configuring using the below code I couldn't know what is 'ASPNET' in "SELECT @s = @@servername + 'ASPNET'"
Also what is 'webuser'



---Configure Doctors
USE doctors

GO

DECLARE @s varchar(50)
SELECT @s = @@servername + 'ASPNET'
EXECUTE sp_grantlogin @s

EXECUTE sp_grantdbaccess @s, 'webuser'

GO

GRANT EXECUTE ON [getUniqueCities] TO webuser
GRANT EXECUTE ON [getDrSpecialty] TO webuser


GRANT SELECT ON [specialties] TO webuser
GRANT SELECT ON [doctors] TO webuser
GRANT SELECT ON [drspecialties] TO webuser

GO


Can anyone help me how to solve my problem?
Your help would be very much appreciated

Thanks and Regards

Kavitha

View 1 Replies View Related

Distributing SQLServer Database

Mar 27, 2007

Good Day!



I want to know how to distribute a database in SQL Server from one computer to another?



Thnx!

Kapalic

View 1 Replies View Related

I Cannot Connect To SQLSERVER Database

Jul 23, 2007

In SQLserver Admin, ANDONASPNET is setup as a 'Server Admin'



****************************************************************************

Connection string is set in the web.config file.

<configuration>



<connectionStrings>

<add name="SqlServerEx"

connectionString="Data Source=LOCALHOSTSQLEXPRESS;Initial Catalog=DB2;Integrated Security=SSPI;"

providerName="System.Data.SqlClient;"></add>

</connectionStrings>



<appSettings/>



<system.web>

.......................................................................







protected void Button2_Click(object sender, EventArgs e)

{

string connStr = WebConfigurationManager.ConnectionStrings["SqlServerEx"].ConnectionString;

SqlConnection con = new SqlConnection(connStr);

TextBox3.Text = connStr;

try

{

con.Open();

TextBox2.Text = "<b> Server Verison::</b>" + con.ServerVersion;

TextBox2.Text += "<br /><B>Connection Is::</B> " + con.State.ToString();

}

catch (Exception err)

{

TextBox2.Text = "Error reading Database. ";

TextBox2.Text += err.Message;

}

finally

{

con.Close();

TextBox2.Text += "<BR><B>CONNECTION::" + con.State.ToString() + "</B>";

}

}

****************************************************************************



This is the error message I am getting:

"Error reading Database. Instance failure."

View 1 Replies View Related

Converting A SQLite Database To A SQL Server 2005 Databse

Jun 5, 2007

Hi



I have a SQLite database. I want to convert it to a SQL Server 2005 database. Can u guide me how to do it?



Imalka

View 1 Replies View Related

Help With Sqlserver Database -- On Migrate To Another Server

Aug 11, 2006

I made a website with sqlserver membership
when i migrate the website to another server i can not connect to the database aspnetdb
how i can add a user to this data base in the visual web developer
 
Thnakis

View 1 Replies View Related

Copying SqlServer Database From Web Host

Mar 14, 2007

Hi,
I have a hard time copying my db (or instance?) from a SQL Server 2000 db which resides at my web host. I have Sql Server 2005 Express and Sql Server Management Studio Express on my computer and, well, there is no "ftp-like" option so I don't have a clue about how to proceed. I've read many posts on the net on this matter but nothing seems to apply to this, in my mind, rather common, configuration.
I have receieved Excel docs that should be appended to tables in my db. I have successfully installed DTS (see http://mobiledeveloper.wordpress.com/ for details - it's really simple but takes two hours) so I have a wizard for the actual import from Excel. My plan is now to
1. download/detach/whatever my table/db/part of the web host's db and download it to my computer. Then
2. fill the tables with the data from Excel. And finally, to
3. upload/attach/whatever my local db or table to the web host again.
I'm sooo confused, please, please help me out here!
Pettrer

View 1 Replies View Related







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