I want to create local a database in SQL Server 2008 R2 using AS/400 schema...how can i do that..i don't know what is AS/400 schema in SQL...i tried to search on internet but not able to find any helpful link.
Please help me.
You would need to extract the file structures from the AS/400 and manually create, I know of no automated method, the corresponding SQL tables.
Related
I need to generate a database diagram automatically from a database script I have.
I have run the sql script and it worked. Right now I need to generate a database diagram using the script I ran.
I am working with Oracle Application Express web based and I googled it but I couldn't find anywhere how to do it. Does anyone know how I can generate automatically a database diagram with the SQL script I have in Oracle Application Express.
Below is my dashboard where do I need to click to generate my database diagram automatically?
APEX does not create a database diagram as you describe. Instead, you should use Oracle SQL Developer, which is a free tool for creating and editing SQL And PL/SQL and Oracle database structures. Included with SQL Developer is a Data Modeler that can reverse engineer a database connection to generate diagrams.
I have a particular table in access which I am trying to migrate it to SQL Server, the problem is that I am trying to create a table in sql server with the required fields and there are around 200 variables. Hence I am trying to find out if there is any easy way of copying the access data type in the sql server migration assistant.
If not I will have to manually type in the access data type in the create table sql query.
For moving tables from Access to SQL Server, I have had good luck with the SQL Server Upsizing Wizard that's built into Access itself:
For detailed instructions on how to use it, check the following link
Use the Upsizing Wizard - Access - Office.com
I currently have two servers. One is a server with .dbf files that get updated very frequently, and the other is a server with SQL Server workgroup edition on it.
Problem: I need to update the SQL Server tables from these remote .dbf files, how is it done? I need these files to be pulled automatically from the server every X amount of hours.
Research thus far:
I believe I understand how to update tables having the .dbf file on the same server as the SQL Server database, you would use the DTS management studio provided with SQL Server. I don't believe this solution would work trying to pull these .dbf files remotely. I have looked into a Linked Server, but don't understand what that really is. These .dbf files come from a visual foxpro server. As far as i know visual foxpro has no interface like SQL? If anyone has any advice in order to point me into the right direction, this would be much appreciated. I can usually find the answers, but feel pretty helpless on this one... Thanks in advance for any effort put into this problem.
A linked server is basically just a pointer that lets the code within your database interact with external data sources as if they were also within your database/instance. There are some examples here for creating linked servers to FoxPro DBFs:
http://fox.wikis.com/wc.dll?Wiki~VisualFoxProDataFromSQLServer
So for example if you had a linked server to a FoxPro database called MyFoxProDB you could run a query within SQL Server like this:
UPDATE t
SET t.foo = x.bar
FROM dbo.LocalTable AS t
INNER JOIN MyFoxProDB...TableName AS x
ON t.key = x.key;
You could also consider using OPENROWSET as described in this question:
Import DBF files into Sql Server
(But personally I think the linked server will be a lot more flexible.)
i just want to ask if how can i backup my database from sql server 2005 using sql server management studio express? i want a backup it using sql file (.sql and not .bak or .mdf) from creating database (if not exist), tables and even the records on the table..thanks in advance :)
This is not possible with one command. You can script single objects, but I'm not aware of a way to do this in SSMS. We use SQL Compare from redgate here - it's pretty great.
You can try powershell.
Docs here.
I have a SQL Server 2008 DB. I want to extract SOME tables (and associated schema, constraints, indexes, etc) and create a SQL Server Express DB. It isn't a sync of the target, we stomp on it.
We ONLY need to do this in the file system (not across the wire). We are not fond of the synchronization stuff and at this point don't know how to run SSIS. We are a C# shop and a little code is ok. Like using the C# bulk import stuff, but that won't create the schema.
Suggestions?
My suggestion:
Back up the database
Restore under new name and file
Detach restored database from SQL Server
You now have a standalone file that you could use with SQL Server Express.
We use a tool from Red-Gate called SQL Compare to generate schema-complete SQL scripts. It's about $400, but well worth it. You pick the objects you want (users, tables, views, functions - whatever) you want, and it will generate a SQL Script to re-create them in your new database. Essentially, it's the same as Right-Click -> "Script To... New Window" in SSMS, but all at once, and it has a number of other features your shop might find useful as well.
As Scott pointed out (I couldn't figure out how to comment on his post), you can do a backup and restore, detach and attach from one server version to another assuming that the database is less than 4GB.