Showing posts with label double. Show all posts
Showing posts with label double. Show all posts

Monday, March 12, 2012

Reverse log shipping

We are in the planning stage of a redundant SQL environment and had a
question about log shipping.
We would like to double our use of the standby server and use it as a
pre-production server from time to time. Meaning, we would like to import
and test data on our standby server and then be able to log ship the changes
over to the primary server. Is this possible/recommended? If so, how would
it be done ?
Thanks
Nick
No.
Your better option is to move the DDL changes by script, or by using a 3rd
party tool such as Red Gate's SQL Compare.
You can move data using Script, DTS/SSIS, Red Gate's SQL Data Compare, etc.
You cannot change the data/schema in a Log Shipping Destination server
(whether its the Prod box or the standby) without Recovering it first, which
stops the Log Shipping part.
Kevin Hill
3NF Consulting
http://www.3nf-inc.com/NewsGroups.htm
Real-world stuff I run across with SQL Server:
http://kevin3nf.blogspot.com
"N." <larosan@.yahoo.com> wrote in message news:wR6wh.1$_i4.0@.newsfe09.lga...
> We are in the planning stage of a redundant SQL environment and had a
> question about log shipping.
> We would like to double our use of the standby server and use it as a
> pre-production server from time to time. Meaning, we would like to import
> and test data on our standby server and then be able to log ship the
> changes over to the primary server. Is this possible/recommended? If so,
> how would it be done ?
> Thanks
> Nick
>

Friday, March 9, 2012

ReturnProviderSpecificTypes

Is it possible to set this in Analysis Services 2005?

I am going against an oracle number and Analysis Services is picking Double as the datatype but it is not working?

I am getting the following as the error- 'Errors in the high-level relational engine. The following exception occurred while the managed IDataReader interface was being used: Arithmetic operation resulted in an overflow..'

If I cast the column to number(28) it works which is the size of system.decimal

Moved to SQL Server Analysis Services forum.

For AS group -- ReturnProviderSpecificTypes is a setting on the DataAdapter that allows the DataReader to return column types that more closely align with the underlying backend types, rather than standard CLR types. For example, OracleNumber instead of Decimal or Double.

DataAdapter.ReturnProviderSpecificTypes Property
http://msdn2.microsoft.com/en-us/library/system.data.common.dataadapter.returnproviderspecifictypes(d=ide).aspx

Thanks,
Sarah

|||Is there anything i can do in analysis services to accept the number(38) that oracle is sending instead of casting to number(28)?|||

What provider you are using to connect to Oracle?

You have 2 options: Microsoft OLEDB provider and .NET native Oracle client.

If you are using one, try the second option, see if it works for you.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

Wednesday, March 7, 2012

Returning TSQL Results straight to file.

Hi All
I'm creating a stored procedure to pull a report every morning for my
manager. The thing is she just wants to double click and open a file. I
want to run a schedule every morning before she gets in, I want the
stored procedure to write it directly to the file. Is this possible or
is there another way to do it?
Thanks
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!
You could possibly do something with xp_cmdshell, but it probably wouldn't
be a great idea (for all sorts of reasons relating to security,
maintainability, etc.)
How are you currently calling the SProc - presumably there's some sort of
client application? Could you adapt that?
If not, your best bet might be to create a simple client app (even just a
simple VB Script app) that connects to the database, runs the SProc, and
writes the results to a file.
Here's a simple example that executes a SPROC called GetReport (which
returns a FOR XML query):
Const DBGUID_SQL = "{C8B522D7-5CF3-11CE-ADE5-00AA0044773D}"
Const adExecuteStream = 1024
Const adCmdStoredProc = 4
Dim conn
Set conn = CreateObject("ADODB.Connection")
conn.Provider = "SQLXMLOLEDB.3.0"
conn.ConnectionString = "DATA PROVIDER=SQLOLEDB;" & _
"SERVER=(local);DATABASE=northwind;INTEGRATED SECURITY=sspi;"
conn.Open
Dim cmd
Set cmd = CreateObject("ADODB.Command")
Set cmd.ActiveConnection = conn
'Set the dialect
cmd.Dialect = DBGUID_SQL
'Create DOMDocument object for results.
Dim xmlDoc
Set xmlDoc= CreateObject("MSXML2.DOMDocument")
'Assign the output stream.
cmd.Properties("Output Stream") = xmlDoc
'Specify the command
cmd.CommandText = "GetReport"
cmd.CommandType = adCmdStoredProc
'Specify the root tag
cmd.Properties("xml root") = "ReportData"
'Execute the command returning the data to the DOM
cmd.Execute, , adExecuteStream
'Save the report
xmlDoc.Save "C:\Report.xml"
MsgBox "Report Saved!"
Cheers,
Graeme
Graeme Malcolm
Principal Technologist
Content Master Ltd.
"Da Olive" <doliver@.mailbox.co.za> wrote in message
news:eTM2xElEEHA.3748@.TK2MSFTNGP11.phx.gbl...
> Hi All
> I'm creating a stored procedure to pull a report every morning for my
> manager. The thing is she just wants to double click and open a file. I
> want to run a schedule every morning before she gets in, I want the
> stored procedure to write it directly to the file. Is this possible or
> is there another way to do it?
> Thanks
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!
|||"Da Olive" <doliver@.mailbox.co.za> wrote in message
news:eTM2xElEEHA.3748@.TK2MSFTNGP11.phx.gbl...
> Hi All
> I'm creating a stored procedure to pull a report every morning for my
> manager. The thing is she just wants to double click and open a file. I
> want to run a schedule every morning before she gets in, I want the
> stored procedure to write it directly to the file. Is this possible or
> is there another way to do it?
Write a DTS script and schedule it to run every morning:
http://www.sqlxml.org/faqs.aspx?faq=10
Bryant